Hi,

I know this question (see subj.) was already raised couple of times
but I would like
to discuss it one more time.

First let me say that I agree with the statement that we should not do any 
scripting in xml file. Personally I don't like the idea of
incorporating BeanShell, Groovy
or any other scripting language into gui descriptor file. swixml
should probably remain
purely declarative language.

But still would be nice to ease event handling.

So when I'm talking about adding some feature into framework that
facilitate work
with events I would call this feature 'binding' rather then scripting.
The concept would be in a way similar to the automatic fields mapping
which swixml does now.
Similarly we could have swixml mapping gui events to proper methods in
client's class. For example syntax could look like this:

<textfield id="myText" keyPressed="handleKeyPressed"/>
or 
<label id="myLabel" mousePressed="handleMousePressed" />

where myText and myLabel are fields while handleKeyPressed and
handleMousePressed are methods in client object.

Actually we've implemented this kind of extension in our project and
it serves quite good
so far. In fact it didn't require a lot of coding so adding it to the
siwxml core won't add much complexity to the project.

I'm sending a patch here. As you can see it has only one extra class
and few lines
added to Parser class.

I'd be happy if swixml's authors could spare some time to consider the patch.
If you need more examples let me know.
Thanks in advance,

Vitali

Attachment: .diff
Description: Binary data

_______________________________________________
Forum mailing list
Forum@carlsbadcubes.com
http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
  • [Forum] event ... Forum
    • Re: [Foru... List for Users of Carlsbad Cubes' Technologies and Products
    • Re: [Foru... List for Users of Carlsbad Cubes' Technologies and Products
      • Re: [... List for Users of Carlsbad Cubes' Technologies and Products

Reply via email to