On 6/6/07, Andre <[EMAIL PROTECTED]> wrote: > John Labenski <[EMAIL PROTECTED]> writes: > > is this right? > > print(config) > print(config.Get(false)) > print(config:Get(false))
What is config? Is it already a wxConfigBase (or derived) object? > ----------------------- output on the console > > userdata: 013A9B50 (wxConfig) > nil > lua: Error while running chunk > wxLua: Expected a boolean for parameter 1, but got 'userdata'. > stack traceback: > [C]: in function 'Get' > C:\Programs\wxWidgets\wxLua\samples\lunedit.wx.lua:3090: in function > <C:\Programs\wxWidgets\wxLua\samples\lunedit.wx.lua:3071> > > -------------------- > I would expect config.Get(false) to fail > and config:Get(false) to return the nil > not the inverse This is the right one config.Get(false) or even wx.wxConfigBase.Get(false) since it is defined as this in config.i static wxConfigBase* Get(bool CreateOnDemand = true) which means that no object is required so that we don't use the ':' semantics. Note that p = wx.wxPoint(1,2) p:SetX(4) is the same as p.SetX(p, 4) Hope this helps, John Labenski ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users