I am trying to write a simple function in where a function will detect if
the window (from another function is closed)
In the example below, say function a() runs and open a window, if it is
closed, this is where function b() picks up and prints that "windows from
a() is closed"
I am getting some errors such as "# AttributeError: 'unicode' object has no
attribute 'close' # " so I suppose that the command I used is wrong
def a():
window1 = cmds.window( title="Long Name")
cmds.showWindow(window1)
def b():
if window1.close():
print "windows from a() is closed"
def main():
a()
b()
main()
Even so, is this possible? Though I am using the maya cmds.window but can
this applies to other import modules where it open a window (like its own
import dialog)?
--
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/6af71a5f-6dee-4dd7-9cd2-1eb6a5befd8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.