Hello!

I only find that approach useful if for instance, you want to store all the 
created widgets for future referencing, something like: (sorry, I don’t have a 
Computer close to me)

class WidgetCreator(object):
    LOADED_WIDGETS =dict()

    You call function should start here
    ...
    LOADED_WIDGETS.setdefault(kwargs.get(“objectName”), widget)

     ....


I found it too complicated anyway. I think that subclassing is the best 
approach here. You’ll have more individual control on each widget, and 
implementing future feature for an specific widget will be easier.

Hope it helps!

Thanks 

Sent from my iPhone

> On 17 Aug 2019, at 19:08, Rudi Hammad <rudiham...@gmail.com> wrote:
> 
> Hey Marcus,
> Subclassing is how I had my previous code. I am just exploring to see if can 
> come up with something that could create any type of widget using one unique 
> function, but
> I might be over thinking it. Does the design I posted make any sense or is it 
> completely wrong for any reason I don't see?
> I forgot to mention that the methods are supposed to be private. So 
> basically, the idea was to create a function object to set up any type of 
> widget.
> 
> R
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/python_inside_maya/96a7b5f6-9ab4-4028-93a3-c57fe1df6c2b%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/0408069C-6FB7-492F-874C-ED17B4F88941%40gmail.com.

Reply via email to