mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Added patch by Wolfgang
* GormCore/GormGenericEditor.h * GormCore/GormGenericEditor.m * GormCore/GormImageEditor.m * GormCore/GormObjectEditor.m * GormCore/GormSoundEditor.m: Observe notification IBWillCloseDocument and remove the reference to the document when that is recieved to avoid a crash. * Resources/ClassInformation.plist: Add outlet for delegate to NSSplitView. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@26940 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
042264b382
commit
523ef5bf4b
7 changed files with 53 additions and 6 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2008-10-19 21:50-EDT Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
Patch committed by: Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormGenericEditor.h
|
||||
* GormCore/GormGenericEditor.m
|
||||
* GormCore/GormImageEditor.m
|
||||
* GormCore/GormObjectEditor.m
|
||||
* GormCore/GormSoundEditor.m: Observe notification IBWillCloseDocument
|
||||
and remove the reference to the document when that is recieved to
|
||||
avoid a crash.
|
||||
* Resources/ClassInformation.plist: Add outlet for delegate to
|
||||
NSSplitView.
|
||||
|
||||
2008-10-06 19:22-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/2Controls/ControlsPalette.m: Correct sizing issue with
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
|
||||
// private methods...
|
||||
@interface GormGenericEditor (PrivateMethods)
|
||||
- (void) willCloseDocument: (NSNotification *) aNotification;
|
||||
- (void) groupSelectionInScrollView;
|
||||
- (void) groupSelectionInSplitView;
|
||||
- (void) groupSelectionInBox;
|
||||
|
|
|
@ -122,6 +122,11 @@
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void) willCloseDocument: (NSNotification *)aNotification
|
||||
{
|
||||
document = nil;
|
||||
}
|
||||
|
||||
- (void) close
|
||||
{
|
||||
if(closed == NO)
|
||||
|
@ -147,11 +152,18 @@
|
|||
{
|
||||
if((self = [super init]) != nil)
|
||||
{
|
||||
// don't retain the document...
|
||||
/* don't retain the document... */
|
||||
document = aDocument;
|
||||
closed = NO;
|
||||
activated = NO;
|
||||
resourceManager = nil;
|
||||
/* since we don't retain the document handle its close notifications */
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(willCloseDocument:)
|
||||
name: IBWillCloseDocumentNotification
|
||||
object: document];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -118,8 +118,8 @@ static NSMapTable *docMap = 0;
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
// if(closed == NO)
|
||||
// [self close];
|
||||
if(closed == NO)
|
||||
[self close];
|
||||
|
||||
// It is not necessary to call super dealloc here.
|
||||
// images are cached throughout the lifetime of the app.
|
||||
|
@ -132,6 +132,12 @@ static NSMapTable *docMap = 0;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) willCloseDocument: (NSNotification *)aNotification
|
||||
{
|
||||
NSMapRemove(docMap,document);
|
||||
[super willCloseDocument: aNotification];
|
||||
}
|
||||
|
||||
- (void) close
|
||||
{
|
||||
[super close];
|
||||
|
|
|
@ -407,11 +407,17 @@ static NSMapTable *docMap = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) willCloseDocument: (NSNotification *)aNotification
|
||||
{
|
||||
NSMapRemove(docMap,document);
|
||||
[super willCloseDocument: aNotification];
|
||||
}
|
||||
|
||||
- (void) close
|
||||
{
|
||||
// [super close];
|
||||
[super close];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
// NSMapRemove(docMap,document);
|
||||
NSMapRemove(docMap,document);
|
||||
}
|
||||
|
||||
- (void) makeSelectionVisible: (BOOL)flag
|
||||
|
|
|
@ -116,6 +116,12 @@ static NSMapTable *docMap = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) willCloseDocument: (NSNotification *)aNotification
|
||||
{
|
||||
NSMapRemove(docMap,document);
|
||||
[super willCloseDocument: aNotification];
|
||||
}
|
||||
|
||||
- (void) close
|
||||
{
|
||||
[super close];
|
||||
|
|
|
@ -274,7 +274,10 @@
|
|||
NSSecureTextFieldCell = {Super = NSTextFieldCell; };
|
||||
NSSlider = {Super = NSControl; };
|
||||
NSSliderCell = {Super = NSActionCell; };
|
||||
NSSplitView = {Super = NSView; };
|
||||
NSSplitView = {
|
||||
Outlets = (delegate);
|
||||
Super = NSView;
|
||||
};
|
||||
NSStepper = {Super = NSControl; };
|
||||
NSStepperCell = {Super = NSActionCell; };
|
||||
NSTabView = {
|
||||
|
|
Loading…
Reference in a new issue