PDA

View Full Version : close a window (not all windows)


umop
2008-02-11, 01:56 PM
I'm having a difficult time with the following code. It seems to me that it should create a window and then close it, but it ends up closing all of the windows:


tell application "OmniFocus"
tell default document
set winTarget to make new document window
close winTarget
end tell
end tell


Any help? Is this a bug?

Thanks,
Eric

RobTrew
2008-02-12, 06:37 AM
Bug.

The following seems to confirm it, by mopping up every window in sight.

tell application "OmniFocus"
activate
tell default document
repeat 10 times
make new document window
end repeat
end tell
close front window
end tell

Worth reporting.