The latest build is available for download and the online docs have been updated.
Both Andy and I will be chilling at the beach next week, so expect a quiet week.
Type and Slot Literals
Type literals have a new syntax which is Foo#. The old syntax Foo.type will generate compiler warnings in this build, and will be removed in the next build. In conjunction there is a new slot literal syntax Foo#method or #method. The entire codebase has been updated to use the new syntax. See docLang and discussion.
Short Construction Calls
The compiler has been enhanced to support the new short construction call syntax:
// old way
Point.make(x,y)
// new way
Point(x, y)
I've updated the entire codebase to use the new convention. See docLang.
Implicit Casting
The compiler now permits you to omit casting a lot more often. Previously only Obj was implicitly cast to other types. Now the compiler allow implicit casting anywhere unless it knows you've got a type error:
The new Command class works as a controller for user commands. It manages the classic case of having a menu item and toolbar bound together. It's super easy to use:
GridPane: now is fully operational, this is my workhorse pane for building most UIs; see the examples/fwt/demo.fan
I've also done more work on the serialization front. If you go to the Serialization tab in the demo, you can type in a serialized widget tree, and press the button to immediately test it (ignore the message that says it doesn't work, it does now). Pretty cool stuff.
Webapp Rework
Andy updated some of the webapp APIs during his sidewalk development:
The Web/Widget API got reworked a bit to solve some issues I came across:
The doXxx methods on Weblet got renamed to onXxx. We'll use the onXxx convention for all callback methods in web and webapp now.
FindChromeStep was fixed to always create a new Type for each request.
Widget.actionUri, actionForm are gone in favor of toInvoke/invoke (using onXxxx for callbacks).
The notion of widgets trees was made more concrete with new methods on Widget.
An overview of the new Widget API is discussed in docLib::Widget. For the most part the model follows FWT.
Also there's a new web test suite under "examples/web/demo.fan" to demo features of web and webapp pods.
Sounds great. It's part my fault, but the far reaching discussions sometimes leave me dizzy off in orbit. Still, every new release sounds so nice when summarized. Fan manages to do some fancy features while still feeling down to earth.
alexlamslThu 31 Jul 2008
Both Andy and I will be chilling at the beach next week, so expect a quiet week.
Have fun!
msylvanTue 5 Aug 2008
Is it just me, or is fansh non-functional on Unix systems? (running Fedora's Rawhide development version on x86_64 here).
With 1.0.27, I get
Exception in thread "main" java.lang.NoClassDefFoundError: fanx/tools/fansh
With 1.0.30, using both OpenJDK 1.6.0 64-bit and Sun JRE 6 32-bit, attempting to launch fansh results in Java running out of heap space, after consuming hundreds of megabytes of RAM.
brianTue 5 Aug 2008
You know what, I changed how the launchers worked for non-sys pods - but I must have forgotten to fix that unix script. I will fix for next build, until then use this:
fan fansh
Sorry about that.
brianTue 5 Aug 2008
I just checked on OS X - and it should work in build 1.0.30 (I did update the script). So there must be something else going on here.
The fact that your fansh script in 1.0.27 is getting a NoClassDefFoundError would lead me to suspect that maybe the 1.0.27 script is using the 1.0.30 lib/java/sys.jar file (since I removed that class).
wiriantoThu 7 Aug 2008
I got OutOfMemory error with fansh on Windows XP. I'm using JDK 1.6.0 update 10 beta (1.6.0_10-beta-b23).
Ok - that is two instances where fansh is getting an OutOfMemoryError. So something fishy is happening. That stack trace is weird though because fansh shouldn't ever be going thru Main.compileScript. Couple questions:
does this happen as soon as you run fansh.exe? or after using the shell for a bit?
brian Thu 31 Jul 2008
The latest build is available for download and the online docs have been updated.
Both Andy and I will be chilling at the beach next week, so expect a quiet week.
Type and Slot Literals
Type literals have a new syntax which is
Foo#
. The old syntaxFoo.type
will generate compiler warnings in this build, and will be removed in the next build. In conjunction there is a new slot literal syntaxFoo#method
or#method
. The entire codebase has been updated to use the new syntax. See docLang and discussion.Short Construction Calls
The compiler has been enhanced to support the new short construction call syntax:
I've updated the entire codebase to use the new convention. See docLang.
Implicit Casting
The compiler now permits you to omit casting a lot more often. Previously only Obj was implicitly cast to other types. Now the compiler allow implicit casting anywhere unless it knows you've got a type error:
See docLang and discussion.
Examples Re-org
The sample scripts have been reorganized a bit:
New FWT Features
The new Command class works as a controller for user commands. It manages the classic case of having a menu item and toolbar bound together. It's super easy to use:
There are a couple new or enhanced widgets:
I've also done more work on the serialization front. If you go to the Serialization tab in the demo, you can type in a serialized widget tree, and press the button to immediately test it (ignore the message that says it doesn't work, it does now). Pretty cool stuff.
Webapp Rework
Andy updated some of the webapp APIs during his sidewalk development:
The Web/Widget API got reworked a bit to solve some issues I came across:
An overview of the new Widget API is discussed in docLib::Widget. For the most part the model follows FWT.
Also there's a new web test suite under "examples/web/demo.fan" to demo features of web and webapp pods.
Change Log
Build 1.0.30 (30 Jul 08)
tompalmer Thu 31 Jul 2008
Sounds great. It's part my fault, but the far reaching discussions sometimes leave me dizzy off in orbit. Still, every new release sounds so nice when summarized. Fan manages to do some fancy features while still feeling down to earth.
alexlamsl Thu 31 Jul 2008
Have fun!
msylvan Tue 5 Aug 2008
Is it just me, or is fansh non-functional on Unix systems? (running Fedora's Rawhide development version on x86_64 here).
With 1.0.27, I get
Exception in thread "main" java.lang.NoClassDefFoundError: fanx/tools/fansh
With 1.0.30, using both OpenJDK 1.6.0 64-bit and Sun JRE 6 32-bit, attempting to launch fansh results in Java running out of heap space, after consuming hundreds of megabytes of RAM.
brian Tue 5 Aug 2008
You know what, I changed how the launchers worked for non-sys pods - but I must have forgotten to fix that unix script. I will fix for next build, until then use this:
Sorry about that.
brian Tue 5 Aug 2008
I just checked on OS X - and it should work in build 1.0.30 (I did update the script). So there must be something else going on here.
The fact that your fansh script in 1.0.27 is getting a NoClassDefFoundError would lead me to suspect that maybe the 1.0.27 script is using the 1.0.30 lib/java/sys.jar file (since I removed that class).
wirianto Thu 7 Aug 2008
I got OutOfMemory error with fansh on Windows XP. I'm using JDK 1.6.0 update 10 beta (1.6.0_10-beta-b23).
Here are the stacktrace:
brian Thu 7 Aug 2008
Ok - that is two instances where
fansh
is getting an OutOfMemoryError. So something fishy is happening. That stack trace is weird though because fansh shouldn't ever be going thruMain.compileScript
. Couple questions:fansh.exe
? or after using the shell for a bit?fan fansh
work you?