Thursday, September 2, 2010

Method calling in ELENA: overhaul, part 2

First of all, I would like to announce changes in the project release practice. Now there will be two types of releases: official and weekly ones. Official release will happens once per several months (version number x.x.x) as it was before. But additionally every several week I will publish weekly release (version numbers x.x.x.x) and they will be located in http://sourceforge.net/projects/elenalang/files/ELENA/Weekly.

The first such weekly release happened yesterday - http://sourceforge.net/projects/elenalang/files/ELENA/Weekly/elena-1.5.5.3.zip/download
The main purpose of that release was publishing the changes in method call syntax. Apart from this I did several small enhancements. First of all I decided to get rid of message subject prefix "gui". Though it is still possible to use it in most cases now it is recommended to omit it. So the old style code like this - self set &gui'location'x:50 &y:50 set &gui'size'width:700 &height:520 gui'control'caption'set:"Caption" - will look a bit better -
self location'set &x:50 &y:50 size'set &width:700 &height:520 control'caption'set: "Caption".
The same for event handler - on'control'Click'do has to be converted to on'Click'do.

Here the list of changes:
  • LiteralType and ArrayType "create" methods are now obsolete. LiteralType literalinfo'create &length and ArrayType arrayinfo &count should be used instead. If you wish to initialize the array during its creation you should use the same method - basic'ArrayType arrayinfo'create &count:10 &action: => (basic'Integer <<0)
  • ctrl'IndexEnum run &enum'in &action and ctrl'Enum run &enum'in &action are no longer supported - ctrl'IndexEnum pattern'run&for &action and ctrl'Enum pattern'run&for &action should be used instead.
  • gui'control'items'get => control'items'get
  • Event handlers "on'control'Paint'do" and " control'IndexChanged'do " should be converted into - on'Paint &canvas and on'IndecChanged &index
  • ext'patterns'ArrayType is no longer supported. Use std'basic'ArrayType instead
  • ext'io'textfile and ext'io' LogTextFile are no longer supported. They were moved into sys package. So use sys'io'textfile and sys'io' LogTextFile
  • std'patterns'Loop is refactored. Repeater pattern'run &for &action should be used instead
The old style syntax will be kept until 1.5.6 release. If you have any questions or problems with converting feel free to ask.

No comments:

Post a Comment