Hey that is cool, I didn't know about that feature. That's actually a use of a constraint that had not really occurred to me. I think about states as being used to enable methods, but if you use that idiom of tying an enabled flag to a constraint, it is sort of like a state.
On Sat, Feb 13, 2010 at 3:13 PM, P T Withington <[email protected]> wrote: > I think it should work for you to say: > > <command ... active="${classroot.haswindowfocus}"> > > meaning the command will only be active (and hence will only execute) if > the window it belongs to has focus. > > On 2010-02-13, at 11:30, cem sonmez wrote: > > > sorry for the previous post, this the complete one : > > > > talking about this testcase. > > > > <canvas debug="true" width="100%" height="300"> > > <debug width="350" height="200"/> > > <class name="myWindow" extends="window" width="150" height="100" > > > <command name="keyCommand" key="['Enter']"> > > <handler name="onselect"> > > Debug.write(classroot.name + " Enter command"); > > </handler> > > </command> > > </class> > > > > <class name="myWindow2" extends="window" width="150" height="100" > > > <command name="keyCommand" key="['Enter']"> > > <handler name="onselect"> > > Debug.write(classroot.name + " Enter command"); > > </handler> > > </command> > > </class> > > > > <simplelayout/> > > <myWindow name="win1" title="window 1"/> > > <myWindow2 name="win2" title="window 2"/> > > </canvas> > > > > when i hit the enter button on canvas, both of the onselect events are > being > > called. Is it possible to make this call just for the selected window. > > If it is not : this means that, it is not allowed to implement more than > two > > roles for each key command, isnT it ? > > > > Regards > > -- > > Cem SONMEZ > > > -- Henry Minsky Software Architect [email protected]
