mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
More changes for standalone views.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19782 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ee2888370c
commit
055388add7
4 changed files with 27 additions and 7 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-07-27 02:15 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormLib/IBInspector.m: Change the name of the method called
|
||||
when receiving IBDocumentWillCloseNotification to _releaseObject:
|
||||
instead of handleNotification:. This prevents confusion as some
|
||||
of the subclasses define handleNotification for other
|
||||
purposes.
|
||||
* GormDocument.m: Modified the code in instantiateObject so that
|
||||
NSView itself can be instantiated.
|
||||
|
||||
|
||||
2004-07-27 02:15 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Gorm.m: Cleaned up some commented out code.
|
||||
|
|
|
@ -1448,7 +1448,7 @@ static NSImage *fileImage = nil;
|
|||
[link setDestination: editor];
|
||||
[connections addObject: link];
|
||||
|
||||
if(![openEditors containsObject: editor])
|
||||
if(![openEditors containsObject: editor] && editor != nil)
|
||||
{
|
||||
[openEditors addObject: editor];
|
||||
}
|
||||
|
@ -1727,7 +1727,8 @@ static NSImage *fileImage = nil;
|
|||
if([object isEqualToString: @"FirstResponder"])
|
||||
return nil;
|
||||
|
||||
if([classManager isSuperclass: @"NSView" linkedToClass: object])
|
||||
if([classManager isSuperclass: @"NSView" linkedToClass: object] ||
|
||||
[object isEqual: @"NSView"])
|
||||
{
|
||||
Class cls;
|
||||
NSString *className = object;
|
||||
|
|
|
@ -45,7 +45,7 @@ static NSNotificationCenter *nc = nil;
|
|||
if((self = [super init]) != nil)
|
||||
{
|
||||
[nc addObserver: self
|
||||
selector: @selector(handleNotification:)
|
||||
selector: @selector(_releaseObject:)
|
||||
name: IBWillCloseDocumentNotification
|
||||
object: nil];
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ static NSNotificationCenter *nc = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) handleNotification: (NSNotification *)notification
|
||||
- (void) _releaseObject: (NSNotification *)notification
|
||||
{
|
||||
id<IBDocuments> doc = [notification object];
|
||||
if([doc nameForObject: object] != nil)
|
||||
|
|
|
@ -1357,11 +1357,19 @@ static BOOL currently_displaying = NO;
|
|||
|
||||
- (void) resetObject: (id)anObject
|
||||
{
|
||||
/// NSLog(@"resetObject should not be called on GormViewEditor !");
|
||||
if(viewWindow != nil)
|
||||
NS_DURING
|
||||
{
|
||||
[viewWindow orderFront: self];
|
||||
// display the view, if it's standalone.
|
||||
if(viewWindow != nil)
|
||||
{
|
||||
[viewWindow orderFront: self];
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"Exception while trying to display standalone view: %@",[localException reason]);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
|
||||
- (void) orderFront
|
||||
|
|
Loading…
Reference in a new issue