NSSplitView: NSView: NSOpenGLView
NSSplitView: NSView: NSOpenGLView
- Subject: NSSplitView: NSView: NSOpenGLView
- From: "Trevor Goodson" <email@hidden>
- Date: Sun, 02 Nov 2003 16:34:16 -0500
Hello all,
I am building a graphical interface as follows:
I compose a NSView that contains my subclass of NSOpenGLView as a subview. I
call both the NSView's and the NSOpenGLView's initWithFrame: method with the
same rectangle.
For each NSView constructed, I add it to a split view; I do this
programmatically because it is not known in advance how many views will need
to be placed inside the split view. The code I use follows this message.
The problem I am seeing is this:
Although the NSViews are being added properly to the split view (they are
properly tiled), the openGLViews are all piled on top of each other in the
space that should only be for the very first one. Does anyone have an
insight into how I should go about adding the 2-part, hybrid views to the
split view? Thanks for any help!
Sincerely,
Travis Rose
In the following code, PaneBaseView = NSView, PaneViewer = NSOpenGLView,
myPanelView = NSSplitView
// Create a base view for the pane, which will be of type NSView:
PaneBaseView *myBaseView = [[PaneBaseView alloc] initWithFrame: theRect];
// Create a pane viewer, which will be of type NSOpenGLView:
PaneViewer *myPaneViewer = [[PaneViewer alloc] initWithFrame: theRect];
// Add the pane viewer to the base view:
[myBaseView addSubview: myPaneViewer];
// Add subview (the pane) to the panel
// This is how split views are built, by adding one or more subviews
// Note this is actually adding the base view AND its subview to the
split view!
[myPanelView addSubview: myBaseView];
// Tell the pane view it has a controller:
[myPaneViewer setController: yourPaneManager];
// Tell the pane controller its view:
[yourPaneManager setPaneViewer: myPaneViewer];
_________________________________________________________________
Send instant messages to anyone on your contact list with MSN Messenger
6.0. Try it now FREE!
http://msnmessenger-download.com
_______________________________________________
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.