qq974969638 / simple Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/simple
Automatically exported from code.google.com/p/simple
I think it's easy to adapt the code to privide function that
the program run directly on android platform without compile.
It's look like early BASIC ,program run on an VM .
When we get a new program ,the only thing we need to do ,it's copy the file to
android machine ,and use Simple VM to run it !
Original issue reported on code.google.com by [email protected]
on 26 Dec 2010 at 11:21
' Dynamic Table with a few buttons
Event Coltest.Initialize()
ViewHistoryButtons()
End Event
Event buttonObj1.Click()
End Event
Event buttonObj2.Click()
End Event
Event buttonObj3.Click()
Finish()
End Event
' Declare some global vars
Dim table2 As Panel
Dim count As Integer
Dim rows As Integer
Dim cols As Integer
Dim i As Integer
Dim buttonObj1 As Button
Dim buttonObj2 As Button
Dim buttonObj3 As Button
Sub ViewHistoryButtons()
table2 = New Panel On Coltest
table2.Layout = 2
table2.Layout.Columns = 5
table2.Layout.Rows = 1
table2.Height = 40
table2.Width = 320
buttonObj1 = New Button On Coltest ' Add button to form.
buttonObj1.Text="Back"
buttonObj1.Row = 1
buttonObj1.Column = 2
buttonObj2 = New Button On Coltest ' Add button to form.
buttonObj2.Text="Test"
buttonObj2.Row = 1
buttonObj2.Column = 3
buttonObj3 = New Button On Coltest ' Add button to form.
buttonObj3.Text= "Exit"
buttonObj3.Row = 1
buttonObj3.Column = 4
End Sub
' Begin Properties
$Properties
$Source $Form
$Define Coltest $As Form
Layout = 1
Layout.Orientation = 1
Scrollable = True
$End $Define
$End $Properties
What is the expected output? What do you see instead?
All buttons should be on row 1, Instead the all buttons act as if there
is a CRLF and the buttons are on different rows
What version of the product are you using? On what operating system?
Linux Simple v.1
Original issue reported on code.google.com by [email protected]
on 10 Feb 2010 at 1:56
According to the language report the default value of variables of type
String is "". Below you find a program which defines a variable text As
String. In the Initialize event I set the content of a text vield to text
& "ok".
I expected to see the text "ok" upon start in the text field.
However, execution shows the text "nullok" in the text field.
Dominik
Dim text As String
Event Test.Initialize()
t.Text = text & "ok"
End Event
$Properties
$Source $Form
$Define Test $As Form
Layout = 1
Layout.Orientation = 1
$Define t $As TextBox
Width = Component.LENGTH_FILL_PARENT
$End $Define
$End $Define
$End $Properties
Original issue reported on code.google.com by [email protected]
on 6 Aug 2009 at 1:00
Well, what is the status? Is SIMPLE dead?
Original issue reported on code.google.com by [email protected]
on 11 Jun 2010 at 7:33
newsimpleproject.bat:
java -classpath %SIMPLE_HOME}\SimpleCompiler.jar
com.google.devtools.simple.tools.ProjectCreator %*
-------
%SIMPLE_HOME} should be %SIMPLE_HOME%
simplec.bat:
java -classpath
%ANDROID_HOME%\tools\lib\apkbuilder.jar;%ANDROID_HOME%\platforms\android-1.5\too
ls\lib\dx.jar;%ANDROID_HOME%tools\lib\androidprefs.jar;%ANDROID_HOME\tools\lib\j
arutils.jar;%SIMPLE_HOME%\SimpleCompiler.jar
com.google.devtools.simple.compiler.Main %*
-------
%ANDROID_HOME%tools should be %ANDROID_HOME%\tools
%ANDROID_HOME\tools should be %ANDROID_HOME%\tools
Original issue reported on code.google.com by [email protected]
on 29 Jul 2009 at 12:01
I've found the usage of several methods introduced in JDK 6, but AFAIK
Android 1.5 contains JDK 5.
1. String(byte[],Charset) at com.google.devtools.simple.util.Files:91:
return new String(data, Charset.forName(encoding));
2. String.getBytes(String) at
com.google.devtools.simple.classfiles.ConstantPool:345:
this.string = string.getBytes(Charset.forName("UTF-8"));
3. String.isEmpty() at com.google.devtools.simple.compiler.Compiler:423:
if (keyLocation != null && !keyLocation.isEmpty()) {
Btw, it is not an issue until Simple compiler is not intended to run on
Android platform.
But in build.xml:153 I see that runtime itself is compiled for 1.6. So,
compiler will not protect us from JDK 6 methods' usage in runtime. And it
potentially leads to runtime errors on target platform.
<target name="SimpleAndroidRuntime" depends="init" description="Build
Simple runtime libraries">
<javac debug="true" destdir="${build.simpleruntime.android}"
source="1.6" target="1.6">
Original issue reported on code.google.com by [email protected]
on 29 Jul 2009 at 6:22
In the Scopes section of the language report is defined, that "another
object member of the same name must not be defined within the same class".
It turns out that properties and fields can be defined withe same name (as
shown in the program below)
Properties have precedence over fiels (i.e. the property assignment in the
initialize event is handled by the property's setter).
Note, that if the field is declared in the sources after the property,
then the compiler gives an error message (error: Redefinition of Value).
Dominik
Dim Value As String
Dim x As String
Property Value As String
Get
Value = x
End Get
Set
x = Value
Test.Title = x
End Set
End Property
Event Test.Initialize()
Value = 123
End Event
$Properties
$Source $Form
$Define Test $As Form
Layout = 1
Layout.Orientation = 1
$End $Define
$End $Properties
Original issue reported on code.google.com by [email protected]
on 7 Aug 2009 at 10:49
On Windows platform (and probably always) JarEntry.getName() uses '/' as
separator, not File.separatorChar '\'. So, the following code fails when
trying to convert path to class name:
com.google.devtools.simple.compiler.RuntimeLoader:537:
while (jarEntries.hasMoreElements()) {
JarEntry entry = jarEntries.nextElement();
String name = entry.getName();
if (name.endsWith(CLASSFILE_EXTENSION)) {
analyzeClassFile(name.substring(0,
name.length() -
CLASSFILE_EXTENSION.length()).replace(File.separatorChar, '.'));
}
}
And Simple compiler doesn't work on Windows.
Original issue reported on code.google.com by [email protected]
on 29 Jul 2009 at 6:38
Hello all! i have not tried this program but it looks fantastic!
an issue i had reading the documentation:
the specification says that + and - have priority over *and /
is there a reason for this? in mathematics multiplication and division come
before addition and subtraction unless a parenthesis says otherwise.
Is the spec wrong or is this how it is implemented? or is there a reason for
this?
Original issue reported on code.google.com by [email protected]
on 9 Oct 2010 at 1:19
What steps will reproduce the problem?
1. in cmd propmpt simplec Test/ simpleproject/project.properties
What is the expected output? What do you see instead?
It should compile correctly.. I have set SIMPLE_HOME and ANDROID_HOME
correctly.. I put them in by hand actually.. I replaced all instances with the
correct folder.. I hope this is okay..
What version of the product are you using? On what operating system?
I am using Windows XP..
Please provide any additional information below.
C:\Documents and Settings\Johnny\My Documents\Downloads\Android\VB>simplec
Test/ simpleproject/project.properties
C:\Documents and Settings\Johnny\My Documents\Downloads\Android\VB>set
ANDROID_HOME="C:\Documents and Settings\Johnny\My
Documents\Downloads\Android\android-sdk -windows"
C:\Documents and Settings\Johnny\My Documents\Downloads\Android\VB>set
SIMPLE_HOME = "C:\Documents and Settings\Johnny\My
Documents\Downloads\Android\android-sdk-windows"
C:\Documents and Settings\Johnny\My Documents\Downloads\Android\VB>java
-classpa th "C:\Documents and Settings\Johnny\My
Documents\Downloads\Android\android-sdk-
windows\tools\lib\apkbuilder.jar";"C:\Documents and Settings\Johnny\My
Documents
\Downloads\Android\android-sdk-windows\platforms\android-1.5\tools\lib\dx.jar";"
C:\Documents and Settings\Johnny\My
Documents\Downloads\Android\android-sdk-wind
ows\tools\lib\androidprefs.jar";"C:\Documents and Settings\Johnny\My
Documents\D
ownloads\Android\android-sdk-windows\tools\lib\jarutils.jar";"C:\Documents and
S ettings\Johnny\My
Documents\Downloads\Android\android-sdk-windows\SimpleCompiler? .jar"
com.google.devtools.simple.compiler.Main Test/simpleproject/project.proper ties
Aug 31, 2010 12:26:50 AM com.google.devtools.simple.compiler.RuntimeLoader?
<init > SEVERE: Runtime library load failure java.lang.ClassNotFoundException?:
com.google.devtools.simple.runtime.annotations .SimpleComponent?
at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController?.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader?.loadClass(Unknown Source) at java.lang.ClassLoader?.loadClass(Unknown Source) at com.google.devtools.simple.compiler.RuntimeLoader?$RuntimeClassLoader?.
loadClass(RuntimeLoader?.java:104)
at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.google.devtools.simple.compiler.RuntimeLoader?.loadAnnotationClass
(RuntimeLoader?.java:177)
at com.google.devtools.simple.compiler.RuntimeLoader?.<init>(RuntimeLoade?
r.java:219)
at com.google.devtools.simple.compiler.Compiler.<init>(Compiler.java:543
)
at com.google.devtools.simple.compiler.Compiler.compile(Compiler.java:29
6)
at com.google.devtools.simple.compiler.Main.main(Main.java:45)
: error: I/O error reading file null/SimpleAndroidRuntime?.jar Aug 31, 2010
12:26:50 AM com.google.devtools.simple.compiler.RuntimeLoader? visit
ClassDirectories? SEVERE: Runtime library load failure
java.io.FileNotFoundException?: null\SimpleAndroidRuntime?.jar (The system
cannot find the path specified)
at java.util.zip.ZipFile?.open(Native Method) at java.util.zip.ZipFile?.<init>(Unknown Source) at java.util.jar.JarFile?.<init>(Unknown Source) at com.google.devtools.simple.compiler.RuntimeLoader?.visitClassDirectori
es(RuntimeLoader?.java:530)
at com.google.devtools.simple.compiler.RuntimeLoader?.loadSimpleObjects(R
untimeLoader.java:609)
at com.google.devtools.simple.compiler.Compiler.<init>(Compiler.java:544
)
at com.google.devtools.simple.compiler.Compiler.compile(Compiler.java:29
6)
at com.google.devtools.simple.compiler.Main.main(Main.java:45)
: error: I/O error reading file SimpleAndroidRuntime?.jar Compiling
com/mydomain/test/Test.simple com/mydomain/test/Test.simple:0: error: Property
section of source file corrupte d Compilation errors: 3 Build finished in 0.047
seconds
Original issue reported on code.google.com by [email protected]
on 31 Aug 2010 at 4:56
What steps will reproduce the problem?
1. Compile and run the short code
What is the expected output? What do you see instead?
I expected when using SwitchForm() sub to compile and allow me to switch from
Foobar Form to Foogum Form
What version of the product are you using? On what operating system?
Simple-linux-0.1.1
Please provide any additional information below.
see FoobarOutput.txt for Java error "UNEXPECTED TOP-LEVEL EXCEPTION"
Original issue reported on code.google.com by [email protected]
on 22 Jan 2010 at 11:49
Attachments:
When a text field is disabled (Enabled = False) it cannot be edited over
the keyboard, but if you point on such a field, then the on-screen
keyboard appears and the field can be edited (although not enabled).
Can be reproduced with the following simple Simple program.
- Dominik
$Properties
$Source $Form
$Define Test $As Form
Layout = 1
Layout.Orientation = 1
$Define t $As TextBox
Enabled = False
Width = Component.LENGTH_FILL_PARENT
$End $Define
$End $Define
$End $Properties
Original issue reported on code.google.com by [email protected]
on 6 Aug 2009 at 12:50
What steps will reproduce the problem?
1. set timezone to different from PDT, e.g. to VLAST
2. ant runtests
3. failed
What is the expected output? What do you see instead?
------------------------------------------------------
expected: testFormatDate() pass
instead:
---
Testcase: testFormatDate took 0.029 sec
FAILED
expected:<...PD...> but was:<...VLAS...>
junit.framework.ComparisonFailure: expected:<...PD...> but was:<...VLAS...>
at
com.google.devtools.simple.runtime.DatesTest.testFormatDate(DatesTest.java:185)
---
What version of the product are you using? On what operating system?
---------------------------------------------------------------------
> svn info
Path: .
URL: http://simple.googlecode.com/svn/trunk
Repository Root: http://simple.googlecode.com/svn
Repository UUID: 4984a3a8-4ed5-11de-b305-25f493754997
Revision: 179
Node Kind: directory
Schedule: normal
Last Changed Author: simplecompiler
Last Changed Rev: 178
Last Changed Date: 2009-07-30 07:23:51 +1100 (Thu, 30 Jul 2009)
Please provide any additional information below.
---------------------------------------------------
Issue is related to timezones and hardcoded check for timezone 'PDT' only.
Original issue reported on code.google.com by tarasov%[email protected]
on 30 Jul 2009 at 5:51
hey, for those who are still interested in Simple, have a look at my program,
which makes Simple simple!
http://code.google.com/p/vb4android/
Original issue reported on code.google.com by [email protected]
on 9 Sep 2010 at 4:12
Will there be http support on simple? like http post and http requests - so
for example, i can request a page on the web and then use a variable and then
my simple project can read the variable ect... i really need this function -
thanks!
Original issue reported on code.google.com by [email protected]
on 14 Apr 2010 at 8:17
On Windows System.getProperty("java.home") may point to Public JRE
location, not JDK location. Simple compiler extracts JAVA_HOME from
"java.home" property
com.google.devtools.simple.compiler.Compiler:68:
private static final String JAVA_HOME = System.getProperty("java.home");
and can't find jarsigner.exe, because it is in JDK, not JRE.
So, JAVA_HOME should be extracted from environment variable as ANDROID_HOME
and SIMPLE_HOME:
private static final String JAVA_HOME = System.getenv("JAVA_HOME");
Original issue reported on code.google.com by [email protected]
on 29 Jul 2009 at 6:55
What steps will reproduce the problem?
Follow this code
---------------------------------
Dim Filename As String
Filename = "testfile.dat"
If Exists(Filename) = False Then
FileHandle = Open(Filename)
WriteString(FileHandle,"Testline 0")
WriteString(FileHandle,"Testline 1")
WriteString(FileHandle,"Testline 2")
WriteString(FileHandle,"Testline 3")
Close(FileHandle)
FileHandle = Open(Filename)
Seek(FileHandle,3)
WriteString(FileHandle,"Testline 4")
WriteString(FileHandle,"Testline 5")
WriteString(FileHandle,"Testline 6")
WriteString(FileHandle,"Testline 7")
Close(FileHandle)
End If
----------------------------------------------------
What is the expected output? What do you see instead?
# cat testfile.dat
Testline 0
Testline 1
Testline 2
Testline 3
Testline 4
Testline 5
Testline 6
Testline 7
#
Actual Results:
# cat testfile.dat
T
Testline 4
Testline 5
Testline 6
Testline 7#
Original issue reported on code.google.com by [email protected]
on 2 Feb 2010 at 9:02
What steps will reproduce the problem?
1. If you try to upload any file to the market you get "The icon path
specified by the manifest is not in the apk."
Any help?
Original issue reported on code.google.com by [email protected]
on 14 Dec 2009 at 1:51
Hi
After I open a file and create the first record, then second record my
program crashes on the third record. Hope someone can help out.
Thanks
' --------------------------------------------------
What is the expected output? What do you see instead?
First time through
-- Create a file if not exist.
-- Then write string to it.
Remaining times trough
--- Open the created file
--- Go the the top of file
--- Count the string
--- move file pointer to last record
--- Write new string
What version of the product are you using? On what operating system?
Simple-linux-0.1.1
Please provide any additional information below.
Here is my code
'------ Save the data to a file
Sub SaveData()
Dim Filename As String
Dim FileHandle As Integer
Dim Filepointer As Integer
Dim counter As Integer
Filename = "test.dat"
If Exists(Filename) = False Then
FileHandle = Open(Filename)
WriteString(FileHandle,StringRecord)
ElseIf Exists(Filename) = True Then
FileHandle = Open(Filename)
Seek(FileHandle,0)
counter = 0
Do
ReadString(FileHandle)
counter = counter + 1
While Eof(FileHandle) = False
Seek(FileHandle,counter)
WriteString(FileHandle,StringRecord)
End If
Close(FileHandle)
Result1.Text = "Data Saved"
End Sub
----------------------
My code to read from the file is below
Sub GetSavedHistoryData()
Dim Filename As String
Dim FileHandle As Integer
Dim ResultBack As String
Filename = "test.dat"
If Exists(Filename) = True Then
FileHandle = Open(Filename)
Seek(FileHandle,0)
Counter = 0
Do
ResultBack = ReadString(FileHandle)
Data1.Row = Counter
Data1.Text = ResultBack
Counter = Counter + 1
While Eof(FileHandle) = False
Close(FileHandle)
Else
Exit
End If
End Sub
Original issue reported on code.google.com by [email protected]
on 1 Feb 2010 at 11:28
When the orientation of the phone is changed, then the content of a text
field ist not restored.
1. Define/Compile/Install the following simple program
$Properties
$Source $Form
$Define Test $As Form
Layout = 1
Layout.Orientation = 1
$Define t $As TextBox
$End $Define
$End $Define
$End $Properties
2. Start the program and Edit the content of the text field
3. Change the orientation
=> then the text is lost.
Original issue reported on code.google.com by [email protected]
on 6 Aug 2009 at 12:45
What steps will reproduce the problem?
(In command prompt)
1.newsimpleproject com.mydomain.test.Test
(no source files have been edited)
2.simplec Test/simpleproject/project.properties
What is the expected output? What do you see instead?
---After command 'newsimpleproject com.mydomain.test.Test'---
C:\Documents and Settings\Jason\androidapps>newsimpleproject
com.mydomain.test.Test
C:\Documents and Settings\Jason\androidapps>java -classpath
C:\simple1.1.1\SimpleCompiler.jar
com.google.devtools.simple.tools.ProjectCreator com.mydomain.test.Test
---end---
---after command 'simplec Test/simpleproject/project.properties'---
C:\Documents and Settings\Jason\androidapps>simplec
Test/simpleproject/project.p
roperties
C:\Documents and Settings\Jason\androidapps>java -classpath
C:\androidsdk\tools\
lib\apkbuilder.jar;C:\androidsdk\platforms\android-1.5\tools\lib\dx.jar;C:\andro
idsdk\tools\lib\androidprefs.jar;C:\androidsdk\tools\lib\jarutils.jar;C:\simple1
.1.1\SimpleCompiler.jar com.google.devtools.simple.compiler.Main
Test/simpleproj
ect/project.properties
Exception in thread "main" java.lang.NoClassDefFoundError:
android/view/GestureD
etector$SimpleOnGestureListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at
com.google.devtools.simple.compiler.RuntimeLoader$RuntimeClassLoader.
loadClass(RuntimeLoader.java:102)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
com.google.devtools.simple.compiler.RuntimeLoader.analyzeClassFile(Ru
ntimeLoader.java:351)
at
com.google.devtools.simple.compiler.RuntimeLoader.visitClassDirectori
es(RuntimeLoader.java:537)
at
com.google.devtools.simple.compiler.RuntimeLoader.loadSimpleObjects(R
untimeLoader.java:609)
at
com.google.devtools.simple.compiler.Compiler.<init>(Compiler.java:544
)
at
com.google.devtools.simple.compiler.Compiler.compile(Compiler.java:29
6)
at com.google.devtools.simple.compiler.Main.main(Main.java:45)
Caused by: java.lang.ClassNotFoundException:
android.view.GestureDetector$Simple
OnGestureListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
com.google.devtools.simple.compiler.RuntimeLoader$RuntimeClassLoader.
loadClass(RuntimeLoader.java:104)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 18 more
C:\Documents and Settings\Jason\androidapps>
---end---
What version of the product are you using? On what operating system?
Windows XP SP3 JDK6 JRE6
Original issue reported on code.google.com by [email protected]
on 9 Jan 2010 at 11:51
What steps will reproduce the problem?
Code
If Exists(Filename) = False Then
FileHandle = Open(Filename)
Close(FileHandle)
FileHandle = Open(Filename)
WriteString(FileHandle,"Testline 0")
WriteString(FileHandle,"Testline 1")
WriteString(FileHandle,"Testline 2")
WriteString(FileHandle,"Testline 3")
WriteString(FileHandle,"Testline 4")
WriteString(FileHandle,"Testline 5")
WriteString(FileHandle,"Testline 6")
WriteString(FileHandle,"Testline 7")
WriteString(FileHandle,"Testline 8")
WriteString(FileHandle,"Testline 9")
WriteString(FileHandle,"Testline 10")
WriteString(FileHandle,"Testline 11")
WriteString(FileHandle,"Testline 12")
WriteString(FileHandle,"Testline 13")
WriteString(FileHandle,"Testline 14")
WriteString(FileHandle,"Testline 15")
WriteString(FileHandle,"Testline 16")
WriteString(FileHandle,"Testline 17")
Close(FileHandle)
End If
What is the expected output? What do you see instead?
# cat testfile.dat
Testline 0
Testline 1
Testline 2
Testline 3
Testline 4
Testline 5
Testline 6
Testline 7
Testline 8
Testline 9
Testline 10
Testline 11
Testline 12
Testline 13
Testline 14
Testline 15
Testline 16
Testline 17#
What really happens
# cat testfile.dat
Testline 0
Testline 1
Testline 2
Testline 3
Testline 4
Testline 5
Testline 6
Testline 7
Testline 8
Testline 9
Testline 10
Testline 11
Testline 12
Testline 13
Testline 14
Testline
15
Testline 16
Testline 17#
Original issue reported on code.google.com by [email protected]
on 2 Feb 2010 at 11:33
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.