bluescreen303
2 Apr 2008, 7:00 AM
Hi,
I'm trying to create some action-handling functionality, where I can supply a string as handler to a button. The button will then use a stub/proxy handler, which (when called) will look for the action(string) by bubbling up the container-tree till it finds a container that has an 'actionHandler' attached.
Say I have a panel, which contains (along other things) a grid.
The grid has a toolbar with buttons.
This main panel is 'bound' to my application(kind of like a controller).
Now when I tell a button that its handler is 'logout'(string), it tries to locate a handler/controller which has a method called 'logout', and re-binds the handler to this.
This all works like it should, but I had to do some overrides.
For some reason, a toolbar receives no ownerCt, also the buttons don't get the toolbar as their ownerCt.
I can override this manually but I was wondering why this isn't done by default.
Any specific reason for this?
Greetings,
Mathijs
I'm trying to create some action-handling functionality, where I can supply a string as handler to a button. The button will then use a stub/proxy handler, which (when called) will look for the action(string) by bubbling up the container-tree till it finds a container that has an 'actionHandler' attached.
Say I have a panel, which contains (along other things) a grid.
The grid has a toolbar with buttons.
This main panel is 'bound' to my application(kind of like a controller).
Now when I tell a button that its handler is 'logout'(string), it tries to locate a handler/controller which has a method called 'logout', and re-binds the handler to this.
This all works like it should, but I had to do some overrides.
For some reason, a toolbar receives no ownerCt, also the buttons don't get the toolbar as their ownerCt.
I can override this manually but I was wondering why this isn't done by default.
Any specific reason for this?
Greetings,
Mathijs