local function Constructor()
self=(AceGUI.WidgetRegistry['Frame'])()
...
end
But am I underestimating consequences?
If AceGUI lacks something like
function AceGUI:Inherits(type)
local reg=WidgetRegistry
local constructor=reg[type]
if type(constructor)=='function' then
return constructor()
else
error(("You can't inherit from not existant Widget type %s"):format(type))
end
end
I suppose there is a design choice behind it but I cant figure it.
What am I missing? What am I doing wrong?
basically you need to create your constructor by pulling in the widget you want to inherit then you simply modify that widget and return it this is how
Thanks for your answer, and I will check your link as soon as wowace is back up (error 500 right now) but may be my question was misleading.
My concern is about not altering a widget coming from pool. If what I need is just the "raw" widget (i.e. the one directly returned from the constructor), isn't it an overkill to pull the full feratured widget from the pool? And besides that, as I find calling the constructor from AceGUI.WidgetRegistry works and suites my need, my other concern is: am I at risk of breaking something?
there is pretty much no difference in pulling from the constructor vs pulling from "The Pool"
except that you may save some memory when pulling from the pool (cause you might be reusing already created widgets that have been returned to the pool) other than that your "raw" widget contains the exact same info as the "full featured" widget All AceGUI is is a fancy frame recycler that keeps track of the widgets and creates more if needed.
But am I underestimating consequences?
If AceGUI lacks something like
I suppose there is a design choice behind it but I cant figure it.
What am I missing? What am I doing wrong?
the shared media widgets work:
http://www.wowace.com/addons/ace-gui-3-0-shared-media-widgets/
they use the basic dropdown widget and then add/remove things
My concern is about not altering a widget coming from pool. If what I need is just the "raw" widget (i.e. the one directly returned from the constructor), isn't it an overkill to pull the full feratured widget from the pool? And besides that, as I find calling the constructor from AceGUI.WidgetRegistry works and suites my need, my other concern is: am I at risk of breaking something?
except that you may save some memory when pulling from the pool (cause you might be reusing already created widgets that have been returned to the pool) other than that your "raw" widget contains the exact same info as the "full featured" widget All AceGUI is is a fancy frame recycler that keeps track of the widgets and creates more if needed.