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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to