Build 1.0.44 Blog
tompalmer
25 Jun 2009
64-bit integer emulation in JavaScript
Nice. I was wondering about the plans for that. (Still need to try out the JS compiler. I'm quite interested in it. Just have enough other things to do right now.)
tompalmer
25 Jun 2009
64-bit integer emulation in JavaScript
Nice. I was wondering about the plans for that. (Still need to try out the JS compiler. I'm quite interested in it. Just have enough other things to do right now.)
brian
25 Jun 2009
Latest and greatest is posted for download and online docs updated.
JavaScript Support
Our startup SkyFoundry is making heavy use of Fan's JavaScript support, so this technology is getting a lot of attention. The Fan-to-JavaScript compiler got some refactoring in this build and renamed to compilerJs. It now supports dual use for compiling pods or individual script files.
This stuff is still early days, but you can start playing it with via the new "examples/js/demo.fan" script. This script launches a web server on port 8080, then you can edit/add files with the ".fwt" extension and view them in browser compiled into JavaScript.
The "graphics.fwt" script duplicates the code from the SWT demo painting to the HTML5 Canvas element. See my previous blog post for screen shots (you need FF 3.5, Chrome 2.0, or Safari 4.0).
Breaking Changes
This build includes the change to remove the first parameter to
List.mapandMap.map- see 612. This modification was also causing some nasty trouble for using 1.0.43 to bootstrap compile hg tip - so that should all be fixed now.We also changed FWT a bit as part of the JavaScript support. Custom widgets cannot subclass directly from
Widgetanymore, rather you must now subclass fromPaneorCanvas. I also removedclipRectanddrawPointfromGraphics(they didn't really make a lot of sense anyways).The
fwt::Command.invokemethod was made final - if you have custom commands you now overrideinvoked. Invoke will automatically wrap the subclass callback in a try block and display error dialog if something goes wrong. You can override error behavior via theonInvokeErrorcallback.Flux - Goto File
I added a new "Goto File" command to Flux. In order to use this new command, setup a list of directories to index in "flux/general.fog". Use Ctrl+Shift+G to jump to a specific file:
If there is exactly one match you go straight to the file, otherwise you get a dialog similar to the "Recent" dialog. Pretty simple feature right now, but this is kind of the first baby steps towards creating an indexed, semantic model of Fan projects.
ChangeLog
Build 1.0.44 (25 Jun 09)