View Single Post
04-08-08, 10:48 AM   #10
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 960
Originally Posted by Kaomie View Post
Can you inherit templates from existing frames when you create others in LUA?

I guess if you are not touching secured frames it is not even a problem. And the just-in-time memory allocation when using LUA-generated frames seems enough of a good reason to do it.
As above, it is possible, yes. But if you don't want to litter the global namespace with frame names, it's not really an option. I only use it for the secure templates... and those ones handle anony frames just fine... but the GUI element templates don't.

Sad thing is, I find it much easier to make an lua frame factory than an XML template. Less code, don't have to close every tag, easier to read, easier to maintain. Plus with LibStub it's very easy to share the factories among addons without conflicting template names, and you get the nice self-upgrading features... Seriously I can't think of a single pro-temple argument here.
  Reply With Quote