Changing subviews during drawing
Changing subviews during drawing
- Subject: Changing subviews during drawing
- From: Drew McCormack <email@hidden>
- Date: Tue, 30 Mar 2004 19:56:34 +0200
Can you safely change the subview of an NSView in its drawRect:
method? I have been doing this for some time, but have now run into an
EXC_BAD_ACCESS deep in the Cocoa framework during drawing, and I
suspect changing the subview is indirectly causing the problem.
Assuming this is bad practice, where is the best place to lazily update
an NSView? I have a plot class. When attributes of the plot change, it
needs to be updated before it is redrawn. I have been doing this is in
drawRect:, but updating the plot does require subviews to be changed,
leading to the problem above. Is there a single NSView method, like
display, where I could do this update before drawRect: is called?
Drew McCormack
_______________________________________________
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.