Update of /cvsroot/scopeapp/scopeapp/src
In directory sc8-pr-cvs1:/tmp/cvs-serv1029
Modified Files:
Tag: scopeapp-gnustep
ScopeController.m
Log Message:
Fixed problems with badly initialised and strangely sized tabs and TabViewItems.
Index: ScopeController.m
===================================================================
RCS file: /cvsroot/scopeapp/scopeapp/src/ScopeController.m,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -C2 -d -r1.8.2.1 -r1.8.2.2
*** ScopeController.m 29 Oct 2002 05:15:13 -0000 1.8.2.1
--- ScopeController.m 6 Dec 2002 15:06:32 -0000 1.8.2.2
***************
*** 78,82 ****
[myXYPlotView retain];
[myControlPanel retain];
!
[myControlPanel orderWindow: NSWindowAbove
relativeTo: [[self window] windowNumber]];
--- 78,82 ----
[myXYPlotView retain];
[myControlPanel retain];
!
[myControlPanel orderWindow: NSWindowAbove
relativeTo: [[self window] windowNumber]];
***************
*** 89,93 ****
[myModeTabs selectTabViewItem: myScopeTab];
[self tabView: myModeTabs didSelectTabViewItem: myScopeTab];
! [myModeTabs setDelegate: self];
}
--- 89,93 ----
[myModeTabs selectTabViewItem: myScopeTab];
[self tabView: myModeTabs didSelectTabViewItem: myScopeTab];
! [myModeTabs setDelegate: self];
}
***************
*** 120,124 ****
// assert that the tab view that has been switched is the mode tabs
if(tabView != myModeTabs) { return; }
!
// stop the view which is currently drawing
[myScopeView stopDrawing];
--- 120,124 ----
// assert that the tab view that has been switched is the mode tabs
if(tabView != myModeTabs) { return; }
!
// stop the view which is currently drawing
[myScopeView stopDrawing];
***************
*** 154,158 ****
NSRect rect = NSMakeRect(0, 0, 400, 400);
unsigned int flags;
!
// create the window
flags = (NSTitledWindowMask | NSClosableWindowMask |
--- 154,158 ----
NSRect rect = NSMakeRect(0, 0, 400, 400);
unsigned int flags;
!
// create the window
flags = (NSTitledWindowMask | NSClosableWindowMask |
***************
*** 209,227 ****
// Create the mode tab view
! rect = NSMakeRect(-11, -7, 735, 372);
myModeTabs = [[NSTabView alloc] initWithFrame: rect];
- [[myControlPanel contentView] addSubview: myModeTabs];
// add and populate the tabs
myScopeTab = [[NSTabViewItem alloc] init];
[myScopeTab setLabel: _(@"Oscilloscope")];
[myScopeView createControls: [myScopeTab view]];
- [myModeTabs addTabViewItem: myScopeTab];
myXYPlotTab = [[NSTabViewItem alloc] init];
[myXYPlotTab setLabel: _(@"X/Y Plot")];
[myXYPlotView createControls: [myXYPlotTab view]];
[myModeTabs addTabViewItem: myXYPlotTab];
return self;
}
--- 209,238 ----
// Create the mode tab view
! rect = NSMakeRect(0, 0, 735, 372);
myModeTabs = [[NSTabView alloc] initWithFrame: rect];
// add and populate the tabs
myScopeTab = [[NSTabViewItem alloc] init];
[myScopeTab setLabel: _(@"Oscilloscope")];
+ [myScopeTab setView:[[NSView alloc] init]];
[myScopeView createControls: [myScopeTab view]];
myXYPlotTab = [[NSTabViewItem alloc] init];
[myXYPlotTab setLabel: _(@"X/Y Plot")];
+ [myXYPlotTab setView:[[NSView alloc] init]];
[myXYPlotView createControls: [myXYPlotTab view]];
+
+ [myModeTabs addTabViewItem: myScopeTab];
[myModeTabs addTabViewItem: myXYPlotTab];
+ [myModeTabs selectTabViewItem: myScopeTab];
+ [[myControlPanel contentView] addSubview: myModeTabs];
+
+ // FIXME the tabs still look screwed up until a selection is made
+ // by the user. probably a gnustep problem.
+
+ rect = [[myScopeTab view] frame];
+ NSLog(@"myScopeTab frame: %@", NSStringFromRect(rect));
+
return self;
}
|