Re: More Canvas Item and UI comments



Hi Michael,

>         You probably don't want to do this; you probably want to connect a
> state-full event listener to the toggle, this will pass you the state as
> it changes:

So for toggle/radio items, when you create your verbs, the best plan is
to have a verb that doesn't have a callback, and instead attach a
listener to the state property of the verb.  That's so intuitive I'm
wondering how I missed it on the first pass.  :-) 

Can this be done via a parameter in the xml?  Otherwise, I need to add a
listener call for every toggle cmd.

Of course, there are lots of situations where the state of a toggleitem
is needed in circumstances unrelated to a state change.  The listener
solution doesn't help this unless you store the state in local data.

>         Of course, what you could do is follow the route some others have
> taken of creating another layer of helper wrapper and showing no interest
> in feeding it back into bonobo :-)

This sounds like willingness to accept such patches.  If that's the
case, where would you prefer these types of functions to live. 
bonobo-ui-helper.*?    
 
>         You should probably also read the section on porting an app to
> the new UI handler code at the top. It's probably very much worthwhile
> basing your ui xml description on that in bonobo/doc/std-ui.xml if you
> havn't noticed that.

Unfortunately, I had read all the ui related documentation files
already.  I'll try to whip up something to beef up the toggle/radio item
sections.  

Mike




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]