On Sat, Mar 21, 2009 at 12:56 PM, lostgallifreyan <lostgallifre...@gmail.com> wrote: > I'm updating DX7-Edit, using the error reporting in the new wxLua as a guide, > fixing each error as I meet it. > > I notice that the ID_TOOLBAR is nil, and this is I think why an error is > reported when I use it. I checked online, and see that it has a value of 1040 > according to a long page I found. If I insert 1040 directly, it passes and > moves to the next error. I checked with the older wxLua (v2.54) to see what > value it had at the point of calling, and it was also nil!
I think this constant was removed in newer versions of wxWidgets and therefore removed in wxLua. > So three questions: > How do I make wxLua assign these ID_XYZABC values so they aren't nil? Just create a variable ID_XYZABC = 12 > Would setting a value of -1 make it chose the right default value of 1040. (I > notice that -1 is often used to indicate that the system uses a default, not > explicit value of -1). 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. > How did wxLua manage ok with them set to nil in v2.54? Previously nil == 0 which now throws an error. Regards, John ------------------------------------------------------------------------------ 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