More on drawRect not getting called
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