• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Drawing to NSQuickDrawView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drawing to NSQuickDrawView


  • Subject: Drawing to NSQuickDrawView
  • From: Ernst Persson <email@hidden>
  • Date: Wed, 17 Apr 2002 15:45:04 +0200

Hi!

I've just started playing around a bit with Cocoa/InterfaceBuilder/Objective-C and thought I would do a Game Of Life application.
The main window has a NSQuickDrawView and some buttons... Everything is pretty much set up as in the CurrencyConverter tutorial.

I have a IBOutlet id myquickdrawview; that I use on the action

- (IBAction)resize:(id)sender
{
void* thePort;
Rect portRect;

[myquickdrawview lockFocus];
thePort = [myquickdrawview qdPort];
SetPort( thePort);
EraseRect( GetPortBounds( thePort, &portRect) );
SysBeep(1);
[myquickdrawview unlockFocus];

}

So when I press the button I get my SysBeep but nothing is drawn... what am I doing wrong?

//ernie
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Drag and Drop in a NSView:Mouse coordinates (From: Timothy Ritchey <email@hidden>)

  • Prev by Date: Re: Drag and Drop in a NSView:Mouse coordinates
  • Next by Date: Re: Using Carbon in Cocoa App
  • Previous by thread: Re: Drag and Drop in a NSView:Mouse coordinates
  • Next by thread: Re: Drag and Drop in a NSView:Mouse coordinates
  • Index(es):
    • Date
    • Thread