On 17/09/2014 10:44 PM, "likage" <[email protected]> wrote:
>
> Do you mean to say, I should wrote it like this perhaps:
>
> def initialWindow(self, *args):
>         self.window = cmds.window(win_name, menuBar=True,
iconName='.chanFileImport', widthHeight=(335, 221), sizeable=False)
>

Well you would have an initial self.window set in you constructor and
always use that as the argument to cmds.window. Then it will give you back
the name it actually used. But I am guessing the real problem was the space
in the original name and then it giving you back a modified name. So you
would never be able to delete it again since you lost the name.

> And how do I initialize a new one? Cause in my case, the UI will only be
prompted if something is imported in followed by the ui prompt
>

Not sure what this means. All I know is that your small snippet suggested
you only create a window if it didn't already exist. And you don't create a
window if it did and you had to delete it.

> --
> 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/7497217a-956c-463e-836b-d5a0167a792a%40googlegroups.com
.
>
> 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/CAPGFgA3wiu6R3gJH_HCK45B%3D4fRDpXF8JPJezkKRBE9OoCiw4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to