Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Freebell-Status

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: and try Freebell/Core 0.05 at 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