web oriented universal language

haXe Book : a sample UI

Posted on 2007-08-16 by Franco Ponticelli in General

I have recently completed a new Chapter of the forthcoming book. One of the topics of the Chapter is creating a User Interface with the following requirements:

  • Platform Independence and Isolation: the haXe nature to be a multi-target environment must be respected. This implies also isolating the mouse and keyboard events from the target system.
  • Lightweight: the library must have a reduced footprint in terms of bytes; it must be loaded and displayed fast.
  • Basic Set of Controls: buttons, text-inputs and labels are the very bare minimum required to build interaction.
  • Easy Positioning: Some UI API delegate to the developer the responsibility to manage and dispose the controls. Although it is important to have the freedom to create accurate pixel-perfect positioning, in the majority of cases it is more important to be able to dispose the controls easily and let the arrangement issues to the system. A set of containers is implemented to ease the visual layout process.
  • Visually Appealing: controls must be nice. Products developed with poor graphic are very often labeled as “unprofessional” works independently from their functionalities. Sad but true.
  • Visually Configurable: the aspect of the controls muse be easily customizable.

The implementation is necessarily simple (or simplified) and many can be added and/or corrected. I would like to hear your opinion about the topic and the implementation.

Sample (simple) application: TreeEditor [swf]

Placing Controls in a Grid [swf]:

Anchoring Controls to Margins [swf]:

Source code and examples: ui.zip version 0.0.1

Comments

Having some errors for each files :

VerifyError: Error #1107: Les données ABC sont corrompues, tentative de lecture en dehors des limites.
at
at [abc-decode]

ReferenceError: Error #1065: La variable Boot_DA61EA n'est pas définie.
at [abc-decode]
Posted by Abe , 2007-08-16 18:34:00
Hi Abe !
Please, update your flash player ;)
Michel
Posted by filt3rek , 2007-08-16 18:55:58
Hello,

I've got Flash Player 9 here but the samples won't show (they are all already loaded, but won't show).
Posted by Marcelo de Moraes Serpa , 2007-08-16 22:37:37
"You have version 9,0,60,120 installed" (came with the FB3)

Current version on download :
"Windows : 9,0,47,0
Windows : 9,0,47,0"

I think I have the latest version for windows...
Posted by Abe , 2007-08-17 08:15:26
You have a traits called "style_label" with zero slots but then try to declare slot 2. Our abc parsing was a little lax in 9.0.47 apparently. Hope this helps...
Posted by Tommy Reilly , 2007-08-22 21:33:48
could you write up a simple example of how to create bitmapdata on the fly and display it in HaXe?
Posted by jk , 2007-08-23 00:48:23
I've updated the examples using the new haXe v.1.15 (no code changes) and I hope the Flash Player problem is solved now.
Posted by Franco Ponticelli , 2007-08-29 12:22:33
i just tried to get your feed but on http://blog.haxe.org/rss i just get an error.
Posted by ea_ , 2007-08-29 22:44:21
i cant open it there is some probe, i,am not sure what is that.
Posted by trisha , 2007-08-31 16:10:22

Post a comment

Name:
Email:
Url:
Security: Please enter 9630 here.
remember me
Comment:
 
 
Haxe Powered Rss flux Valid XHTML 1.0 Valid CSS