mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Corrected crash when changing class hierarchy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21576 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
738aefb672
commit
d0ab85ac95
9 changed files with 84 additions and 39 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2005-07-30 15:57 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* English.lproj/GormPreferences.gorm: Changed class hierarchy. Also
|
||||
added panel outlet.
|
||||
* GormCore/GormClassInspector.m: -[GormClassInspector _currentClass]
|
||||
copy the className.
|
||||
* GormCore/GormPrivate.m: -[GormClassProxy init] copy the className.
|
||||
* Gorm.m: Changed to initialize preferences panel using init.
|
||||
* GormPrefs/GormPrefController.[hm]: Added panel method, changed
|
||||
derivation to a subclass of NSObject, instead of NSWindowController.
|
||||
|
||||
2005-07-30 09:30 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Documentation/Makefile.postamble: Generate documentation from
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
);
|
||||
Outlets = (
|
||||
popup,
|
||||
prefBox
|
||||
prefBox,
|
||||
panel
|
||||
);
|
||||
Super = NSWindowController;
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
Binary file not shown.
Binary file not shown.
6
Gorm.m
6
Gorm.m
|
@ -35,7 +35,7 @@
|
|||
@interface Gorm : NSApplication <IB, Gorm>
|
||||
{
|
||||
id infoPanel;
|
||||
id preferencesController;
|
||||
GormPrefController *preferencesController;
|
||||
GormClassManager *classManager;
|
||||
GormInspectorsManager *inspectorsManager;
|
||||
GormPalettesManager *palettesManager;
|
||||
|
@ -425,10 +425,10 @@
|
|||
{
|
||||
if(! preferencesController)
|
||||
{
|
||||
preferencesController = [[GormPrefController alloc] initWithWindowNibName:@"GormPreferences"];
|
||||
preferencesController = [[GormPrefController alloc] init];
|
||||
}
|
||||
|
||||
[[preferencesController window] makeKeyAndOrderFront:nil];
|
||||
[[preferencesController panel] makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
/** Document Menu Actions */
|
||||
|
|
|
@ -657,7 +657,17 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
|
||||
- (NSString *) _currentClass
|
||||
{
|
||||
return [object className];
|
||||
if(object == nil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
if([object className] == nil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
return [NSString stringWithString: [object className]];
|
||||
}
|
||||
|
||||
- (void) handleNotification: (NSNotification *)notification
|
||||
|
|
|
@ -186,7 +186,8 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
{
|
||||
if([n isKindOfClass: [NSString class]])
|
||||
{
|
||||
ASSIGN(name, n);
|
||||
// create a copy.
|
||||
name = [[NSString alloc] initWithString: n];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include <Foundation/NSObject.h>
|
||||
#include <AppKit/NSWindowController.h>
|
||||
|
||||
@interface GormPrefController : NSWindowController
|
||||
@interface GormPrefController : NSObject
|
||||
{
|
||||
id window;
|
||||
id panel;
|
||||
id popup;
|
||||
id prefBox;
|
||||
|
||||
|
@ -48,6 +48,10 @@
|
|||
*/
|
||||
- (void) popupAction: (id)sender;
|
||||
|
||||
/**
|
||||
* Return the preferences panel.
|
||||
*/
|
||||
- (id) panel;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -13,6 +13,18 @@
|
|||
|
||||
@implementation GormPrefController
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if(self = [super init])
|
||||
{
|
||||
if(![NSBundle loadNibNamed: @"GormPreferences" owner: self])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
_generalView = [[GormGeneralPref alloc] init];
|
||||
|
@ -24,18 +36,19 @@
|
|||
|
||||
[prefBox setContentView:[_generalView view]];
|
||||
|
||||
[[self window] setFrameUsingName: @"Preferences"];
|
||||
[[self window] setFrameAutosaveName: @"Preferences"];
|
||||
[[self window] center];
|
||||
[[self panel] setFrameUsingName: @"Preferences"];
|
||||
[[self panel] setFrameAutosaveName: @"Preferences"];
|
||||
[[self panel] center];
|
||||
}
|
||||
|
||||
- (void) popupAction: (id)sender
|
||||
{
|
||||
int tag = -1;
|
||||
|
||||
if ( sender != popup )
|
||||
return;
|
||||
|
||||
{
|
||||
int tag = [[sender selectedItem] tag];
|
||||
tag = [[sender selectedItem] tag];
|
||||
switch(tag)
|
||||
{
|
||||
case 0:
|
||||
|
@ -61,7 +74,6 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
|
@ -70,6 +82,12 @@
|
|||
RELEASE(_shelfView);
|
||||
RELEASE(_colorsView);
|
||||
RELEASE(_palettesView);
|
||||
RELEASE(panel);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) panel
|
||||
{
|
||||
return panel;
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue