Re: Multiple Overlapping SubViews?
Re: Multiple Overlapping SubViews?
- Subject: Re: Multiple Overlapping SubViews?
- From: John Rieffel <email@hidden>
- Date: Mon, 15 Dec 2003 14:36:55 -0500
>
Not exactly. In all likelihood, the view is being displayed, and then the
>
second view is being displayed on top of it with an opaque background.
This is not the case - each of my views fills itself with clearColor in its
drawRect: method.
>
This does sound strange. What effect are you trying to achieve, exactly?
I have an NSScrollView subclass that draws an oscillogram (x-y plot of
sound data). I have two other types of data that I want to display on
the same axes, but that aren't sound data or even related to the sound.
One option of course is to make each type of view a subclass of the
other, and have each drawRect call [super drawRect], but this is
suboptimal because the the class hierarchy would impose a logical
relationship that doesn't exist:
NSScrollview->mySoundData->myOtherData1->myOtherData2.
Much better, rather, to have an NSScrollView that independently contains
all three, don't you think?
NSScrollView
/ | \
mySndData myData1 myData2
where each could be independently updated if necessary.
The third option, which is my current poor solution, is to create
separate overaly windows for myData1 and myData2, and always make them
aware for mySndData's documentVisibleRect, so that they know what
portion of their own document view to display.
jr
_______________________________________________
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.