• 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
More on drawRect not getting called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More on drawRect not getting called


  • Subject: More on drawRect not getting called
  • From: Tom Jeffries <email@hidden>
  • Date: Sun, 24 Jul 2011 10:11:58 -0700

I appreciate the answers, so far everything that's been suggested is
something I've tried.  Maybe if I put the code out somebody will see what
I'm doing wrong:

This is the function that is called by the mouse click, it's in another
module:

+ (BOOL) Play

{

// init code

[SequeraStepWindow DrawCurrentBarNotes];

}

It calls this function in the NSView module:

- (void) DrawCurrentBarNotes

{

drawNotesFlag = YES; // This flag tells drawRect to draw the notes next time

[self DrawNotes]; // this is where the drawing takes place


 I've tried all of these to invoke drawRect, no luck

//[self awakeFromNib];

//[super awakeFromNib];

//[SequeraStepWindow awakeFromNib];

//[SequeraStepWindow setNeedsDisplay: YES];

//[self setNeedsDisplay: YES];

//[super setNeedsDisplay: YES];

}

Here's drawRect, which gets called properly on start up but does not get
called afterwards

- (void)drawRect:(NSRect)dirtyRect {

[self DrawStepArea]; // Always draw the step area

// don't draw the notes on program startup

if(drawNotesFlag == YES) // if I comment this out DrawNotes works fine

 [self DrawNotes];

}

Somebody suggested using NSLog, which I haven't done. However I've been
using breakpoints and tracing through the code, which I assume should be
just as valid.  Everything works perfectly- except drawRect doesn't get
called.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: More on drawRect not getting called
      • From: Andy Lee <email@hidden>
    • Re: More on drawRect not getting called
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Lion doesn't like tricky.key.paths in bindings?
  • Next by Date: Re: More on drawRect not getting called
  • Previous by thread: Re: does core data always call through the setPrimative methods?
  • Next by thread: Re: More on drawRect not getting called
  • Index(es):
    • Date
    • Thread