Murga-Projects Forums - Printable Version

+- Murga-Projects Forums (
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: (/showthread.php?tid=208) - mikshaw - 09-15-2007 04:31 AM

Inside the table of each widget class there is a table called bind_lua_typeinfo. That table contains the key "name" whose value is the widget class.
In other words:


This prints "Fl_Button", which might be a useful piece of information in some cases, for example if a particular function needed to be called depending on what type of widget was activated.

I wonder if bind_lua_typeinfo is an intentionally created table, or if it's merely a product of whatever was used to create the FLTK bindings (tolua?). I ask this because if I ever find this info truly useful myself, it would be rather bothersome if suddenly a murgaLua version was released that no longer held the info (it doesn't appear to be available elsewhere). It seems like it might be a byproduct of the binding, which might mean that it would be much easier for something like this to slip through the cracks than something that was puposefully included.

RE: - JohnMurga - 09-15-2007 07:20 AM

The bindings are not created with to "tolua", however a lot of them are generated with heavily hacked scripts that I knocked up over a long weekend I was playing with srtti ... There is also a fair amount of "hand crafting", which is a pain in arse.

Either way you CAN count on the bind_lua_typeinfo being set for all the FLTK stuff, now and into the future ... In any case it may be expanded for some widgets.


RE: - mikshaw - 09-15-2007 07:40 AM