🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1952

locking focus

#1952
From: Vin Locke
Date: Wed, 23 Dec 1992 16:21
30 lines
1629 bytes
I have a class subclassed from View.
On initialization, a background image is attached, and on mouseDown, 
graphics actions occur in locations pertinent to where the mouse was
clicked. cool. (all these drawn objects are from pswrap-ped PS functions)

I have a another method that draws to the view that I want to call from 
a menu, also a pswrap-ped function.  However, when I execute this from the
menu, the graphics are drawn in the menu itself!  yuck-o!  

Now, I figure this is a matter of lockFocus.  Thing is, I haven't given
the View a name -- I'm just referring to it as "self" in the methods.  
When the menu executes the method, it does the drawing to the menu window,
and I must find a way to tell it where the drawing should be done -- right?

Is there a way I can refer to the window where the drawing _should_ be 
taking place, without having to to assign new id's for this View?  I figure
there must be an easy way to this, but looking through my collection of
examples and sample programs, I can't seem to pinpoint the solution.  I also
suspect my solution may be in IB wiring, rather than in coding.

 


-- 
					--vin

vin@netcom.com

"Every reform movement has its lunatic fringe"
					--Teddy Roosevelt
Technical Details
Message-ID: <1992Dec23.162156.1556@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!vin

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!vin
From: vin@netcom.com (Vin Locke)
Subject: locking focus
Message-ID: <1992Dec23.162156.1556@netcom.com>
Keywords: view, lockfocus, pswrap
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Wed, 23 Dec 1992 16:21:56 GMT
Lines: 31