[Pythonmac-SIG] [OSX] More AppKit puzzles and progress [was: "All I want..."]
Steven D. Majewski
sdm7g@minsky.med.virginia.edu
Mon, 20 Nov 2000 12:29:35 -0500 (EST)
Some success with AppKit finally!
In a thread on macosx-dev, Frederick Stark ansered a question from
someone trying to bring up a window procedurally, without IB or Nibs:
| Displaying a window mean drawing its content. This bear no relation
| on wether the window is visible or not. You need to have a:
|
| [w makeKeyAndOrderFront:self]
In the example code that I based my python AppKit test on, it called
[win makeKeyAndOrderFront:nil]
Bill: This was the line that prompted my question about nil <-> None.
If I try
win.makeKeyAndOrderFront_(None)
I got
kCGSErrorNoneAvailable : CGSOrderFrontConditionally: Process not found.
The docs on this stuff is pretty rough sledding: there is nothing
in the reference manual to indicate the connection of that message
with window visibility and the arg is supposed to be: (id) sender.
It wasn't clear what valid values for sender might be. I tried using
the App returned from NSApplication.sharedApplication(), but that
produced the same error.
I tried some of the other related methods listed under makeKeyAndOrder...
win.setLevel(3) didn't do anything on it's own, but I finally found
win.orderFrontRegardless(), which didn't require an argument, and
made the window pop up.
If I can put together at least one documented example that puts up
a window and does something functional with it, I think I'll feel
ready to release an alpha or something for folks to use.
---| Steven D. Majewski (804-982-0831) <sdm7g@Virginia.EDU> |---
---| Department of Molecular Physiology and Biological Physics |---
---| University of Virginia Health Sciences Center |---
---| P.O. Box 10011 Charlottesville, VA 22906-0011 |---
"All operating systems want to be unix,
All programming languages want to be lisp."