Re: Listener Methods

Adam Esterline <[email protected]>
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
Wolf,

Here is my idea.   I am not very good at describing ideas, so I have 
attached code that I hope explains.   I really like swixml because it 
really allows the separation of GUI creation from business logic.    I 
would like to see it go just a step further than it does now.   I am in 
total agreement about not putting any code ("scripting") in the GUI 
definition.   I would like for the framework to do some of the wiring 
that really has nothing to do with the business logic.   I have created 
an example and attached it below.

Main points of interest:

masterListSelectionChanged() method on the MainWindow class.

onChange attribute of the "masterList" list element


The idea would be to have the framework wire listeners to methods on 
the client.   In the mainwindow.xml the first list element has a 
onChange attribute that contains the name of a public method on the 
client (MainWindow).   I would like the framework to wire up the 
ListSelectionListener.valueChanged method to the 
masterListSelectionChanged method on the client.

I have attached some code in the ReflectionUtils class that allows you 
to wire any interface method to an object method.   I don't think that 
the ReflectionUtils class is production ready, but it demonstrates the 
concept.

I am open to any and all discussion.

AE

_______________________________________________
Forum mailing list
[email protected]
http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
listener.zip (application/zip, 2.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.