Freebell-Status
[1/2] from: fsievert::uos::de at: 27-Feb-2001 16:48
Hi!
I have now implemented more than 50% of all action! and native! values.
Freebell runs (slow) on a Psion PDAs, too.
You can see the status of the project at:
http://proton.cl-ki.uni-osnabrueck.de/Freebell/status.html
and try Freebell/Core 0.05 at
http://proton.cl-ki.uni-osnabrueck.de/Freebell/
I implemented a way to handle java-object!'s with REBOL.
Try "do demo" in the Freebell-Input-Field.
Demo is defined:
demo: func [/local win mem tmp] [
mem: []
if not empty? mem [
win: first mem
win/setVisible [no]
clear mem
]
insert mem win: make java-object! "java.awt.Frame" ["Demo"]
win/setLayout [make java-object! "java.awt.BorderLayout" []]
win/add [make java-object! "java.awt.Label" [
"Freebell can open windows!"
] "North" ]
win/add [tmp: make java-object! "java.awt.Button" ["Ok"] "Center"]
tmp/addActionListener [make java-object! "Freebell.ActionListener" [
to java-object! [win/setVisible [no]]
]]
win/setSize [300 100]
win/setVisible [yes]
()
]
You can create a java-object! using
make java-object! "path.package.Class" [arguments for constructor]
(the block of Arguments is reduced)
or
make java-object! "path.package.Class" none
(to get the Class-Object itself for invoking static methods)
or
to java-object! value
(to get the FreebellValue-Object)
You can load a java-object! to get a REBOL-Representation of it:
load make java-object! "java.lang.String" ["Hello"]
== "Hello"
Having a java-object! you can use a path on it.
a: make java-object! "java.lang.StringBuffer" ["Hello"]
load a/append/toString ["!!"] []
== "Hello!!"
As you can see, this works like:
a: make java-object! "java.lang.StringBuffer" ["Hello"]
b: a/append ["!!"]
load b/toString []
== "Hello!!"
Have fun,
Frank
[2/2] from: bo:rebol at: 27-Feb-2001 9:09
Frank (and others working on spec'ing REBOL),
If you have any tests that you've written to validate the results of
your implementation, please forward them to [feedback--rebol--com]. We're
always looking for more good tests to add to our test suite.
Thanks in advance for your efforts to help make REBOL better.
-Bo
On 27-Feb-2001/16:48:20+1:00, [fsievert--uos--de] wrote:
>Hi!
>I have now implemented more than 50% of all action! and native! values.
<<quoted lines omitted: 53>>
>[rebol-request--rebol--com] with "unsubscribe" in the
>subject, without the quotes.
--
Bohdan "Bo" Lechnowsky
REBOL Adventure Guide
REBOL Technologies 707-467-8000 (http://www.rebol.com)
The Official Source for REBOL Books (http://www.REBOLpress.com)
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted