Murga-Projects Forums

Full Version:
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.

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.


Reference URL's