You code examples are completely wacky, so I can basically never follow
much of what you are saying. Please just switch to using pastebin with more
complete examples. You have various indentation problems that make it hard
to track the flow.

That being said, I don't understand the "window = None" at the root vs the
"global _window" in your function. I still don't understand your refresh()
function, which is still trying to reference a "listWidget" object which
you have not created.

If you can post a proper pastebin, I will take a look and make comments.

Justin


On Thu, Dec 10, 2015 at 9:25 AM Padraig Ó Cuínn <
[email protected]> wrote:

> still the same issue.
>
> here is the entire mainCopde.py
>
>
> window = None
>
>
> def show():
>     global _window
>     if _window is None:
>         cont = uiCode.ListWindowController()
>
>
>
>
>
>         def refresh():
>
>
>             listWidget.clear()
>             items = pmc.selected()
>             for item in items:
>                 newItem = QtGui.QListWidgetItem( item.nodeName())
>                 listWidget.addItem(newItem)
>
>
>
>             print "This printed fine...
>         _window.refreshClicked.connect(refresh)
>
>
>
>
>
>
>     _window.show()
>
> The rest is pretty much just a UI setup with a custom signal as stated in
> post One.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/fa880722-405e-4d0d-8a2a-1ab1b8e3e04a%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/fa880722-405e-4d0d-8a2a-1ab1b8e3e04a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3-9RSFLiK8C3PJs57cV72-rNOpESQURmXJAb-2j%2B8zcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to