John Labenski <jlaben...@...> writes: > If you don't care what ID a control is given you can use -1to have a > unique number set for you. However if you want to get back at the > control or be able to figure out which control an event came from you > should set a variable to some unique number, use it in the widget's > constructor, and then reference it as necessary. >
Ok, that sounds like how I thought of it so I'll do that, though isn't it ok to do event:GetId() to get it once it's been assigned -1 to let wxLua decide? That's how I did it in DX7-Edit, and that still works in the newly adapted copy. After all, I don't need to know it unless something happens. :) I only need it if I have to set the control's value as user feedback. I guess if I want to save time in a fast loop I can set (or get) get its ID before hand and look up a variable, but I suspect there's not much speed difference. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users