[Pythonmac-SIG] Qd questions

Nick Collier nick@src.uchicago.edu
Wed, 11 Oct 2000 17:59:07 -0500


Hi,

I'm trying to use Qd to draw in a window of my own creation, but I'm
think I'm missing something basic here. I start an interactive
interpreter under the Python IDE and do the following:

w = Window((300, 300), "hello")
w.open()

So far so good, a window appears.

I then do:

Qd.SetPort(w.wid)
Qd.MoveTo(10, 10)
Qd.LineTo(150, 150)

And the line appears in the interpreter window not in the "hello"
window. I've also tried doing

Qd.SetPort(w.wid.GetWindowPort())
w.SetPort()

and then the line draw, but the result is the same. It looks like Qd is
not drawing to the correct GrafPort. I also ran the above code as a
script as the result was the same. So, how do I this?

On a related note, how can I use Win.NewCWindow to create a visible
window on the screen? Do I need to wrap it somehow? Details are very
much appreciated.

thanks,

Nick

-- 
Nick Collier
Social Science Research Computing
University of Chicago
http://repast.sourceforge.net