Blog Post

#1549 Build 1.0.59

brian Thu 2 Jun 2011

Its been a few months and we were due - I have posted a new build and updated online docs.

There isn't really any huge new features, but there are hundreds of little enhancements and bug fixes.


Tons of enhancements to bring JavaScript more in par with Java runtime:

  • Facets support
  • Serialization support
  • More sys API support
  • More fwt API support


Lots of nice enhancements to FWT, many provided by the Xored team:

  • New fwt::Cursor API
  • Graphics support for rounded rectangles
  • Stand alone fwt::ScrollBar support
  • Upgrade from SWT 3.5.1 to 3.6.2

Breaking Changes

There shouldn't be any major breaking changes, but there a couple things to note:

  • the readonly keyword which was deprecated in last build is now unsupported
  • we renamed dom::Event to DomEvent to avoid collisions with fwt::Event
  • couple compiler changes perform stricter error checking on definite assignment of null fields or parameter defaults
  • redesigned Java implementation of sys::Err to subclass from RuntimeException

Change Log

Build 1.0.59 (2 Jun 2011)

  • Remove support for deprecated readonly keyword
  • fwt::Cursor API
  • Graphics drawRoundRect, fillRoundRect
  • Allow null comparisons to fields inside an it-block constructor
  • Change default fields for LogMod
  • Fix Dialog commands button where always only OK
  • compilerJs: escape "name" for slots
  • compilerJs: fix reflection for escaped slot names
  • Fix Date.toLocale for DDD
  • WebOutStream.label
  • js: fwt::Button.image support, ButtonMod.sep support
  • js: fwt::ToolBar
  • Fix sys::Param to be const
  • fwt::Widget.addAll
  • Str.toCode escape control chars
  • Fix File.moveTo to create parent directory if needed
  • Improve Test.verifyEq failure msg for multi-line strings
  • Stand alone fwt::ScrollBar support
  • dom::Win.hisBack, hisForward, hisPushState
  • Str.toXml/OutputStream.esc change ' -> '
  • Make gfx::Brush const
  • js: fwt::Widget.onMouseWheel support
  • Initial fanr support
  • List.binaryFind
  • js: fwt::Widget support for add/remove EventListeners after Widget creation
  • Upgrade SWT from 3.5.1 to 3.6.2
  • js: fwt::Event.count,consume support, fixes for event bubbling
  • js: sys::Depend implementation
  • Change pod meta "build.time" -> "build.ts"
  • js: Facet support
  • js: full readObj/writeObj serialization support
  • Add standard pod meta tags for org, proj, license, and vcs
  • Rename dom::Event -> dom::DomEvent
  • #717: Err extend RuntimeException
  • #1331: Fix set assignment to work with value types
  • #1390: js: List of numbers sorting differs
  • #1419: js: safe field access
  • #1427: js: fwt.window.root possible error
  • #1448: Mmaped Buf end of stream issue
  • #1471: js: List.binarySearch and List.shuffle are missing
  • #1474: Ensure super only used with slot call
  • #1477: Report error if mixin has native methods
  • #1480: Map#map doesn't preserve ordered/caseInsensitive
  • #1482: Overriden non-nullable fields can be left uninitialized
  • #1496: fanx.interop.Interop.toFan/toJava
  • #1497: override with static field
  • #1501: ensure override has matching param default state
  • #1509: Horizontal mouse wheel support
  • #1512: ffi override once with array
  • #1526: Virtual methods in OutStream
  • #1534: Build problem when using java native code and PathEnv
  • #1543: Key.fromMask doesn't work for complex modifier
  • #1545: email "from" field error

tactics Thu 2 Jun 2011

Very awesome :)

kbilsted Wed 22 Jun 2011

Why is the readonly deprecated/removed? I thought this was an awesome idea to implement in a modern programming language. Is the static inference to weak with respect to detecting readonly or ?

brian Wed 22 Jun 2011

The readonly keyword was nothing more than a shortcut for declaring a private setter which you can still do:

Int foo { private set }

Or if you can a "calculated field" that is only computed once than fixed:

once Int foo() { 4 + 6 }

Or if you want a true immutable field:

const Int foo := 10

So we didn't take away functionality, just removed the readonly keyword in favor of using explicit private set because the term readonly was confusing and not actually accurate. See topic 1369 for discussion.

kbilsted Thu 23 Jun 2011

Ah ok. I thought there was a general mechanism, readonly, to enable to say that the content of the reference could not change

DanielFath Thu 23 Jun 2011

I'm pretty sure that is const. Once used as field qualifier it means that the field can only be assigned in constructor and nowhere else. See Const field .

Entire class can even be const if all its fields are const or they are fields with no storage. See Const classes. Only thing that can't be declared const are parameters in functions/methods.

algonzalez Tue 23 Aug 2011

I get the following error when the runtime is set to dotnet:

-->fan -version
System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
  at System.String.InternalSubStringWithChecks (Unknown Source)
  at System.String.Substring (Unknown Source)
  at Fanx.Tools.Tool.verifyDlls (Tool.cs:178)
  at Fanx.Tools.Tool.sysInit (Tool.cs:139)
Fantom Launcher
Copyright (c) 2006-2011, Brian Frank and Andy Frank
Licensed under the Academic Free License version 3.0

.NET Runtime:
  clr.version:  2.0.50727.5662
  sys.platform: win32-x86
  sys.version:  1.0.59

I seems to work fine when the runtime is set to java.

brian Wed 24 Aug 2011

Looking at the code in Tool.cs I am not sure how that would happen. Try nuking your lib/tmp directory and see if that resolves your issue.

algonzalez Wed 24 Aug 2011

Thanks. Deleting the contents of lib/tmp seems to have solved my issue.

Login or Signup to reply.