mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +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>
|
2004-07-27 02:15 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Gorm.m: Cleaned up some commented out code.
|
* Gorm.m: Cleaned up some commented out code.
|
||||||
|
|
|
@ -1448,7 +1448,7 @@ static NSImage *fileImage = nil;
|
||||||
[link setDestination: editor];
|
[link setDestination: editor];
|
||||||
[connections addObject: link];
|
[connections addObject: link];
|
||||||
|
|
||||||
if(![openEditors containsObject: editor])
|
if(![openEditors containsObject: editor] && editor != nil)
|
||||||
{
|
{
|
||||||
[openEditors addObject: editor];
|
[openEditors addObject: editor];
|
||||||
}
|
}
|
||||||
|
@ -1727,7 +1727,8 @@ static NSImage *fileImage = nil;
|
||||||
if([object isEqualToString: @"FirstResponder"])
|
if([object isEqualToString: @"FirstResponder"])
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
if([classManager isSuperclass: @"NSView" linkedToClass: object])
|
if([classManager isSuperclass: @"NSView" linkedToClass: object] ||
|
||||||
|
[object isEqual: @"NSView"])
|
||||||
{
|
{
|
||||||
Class cls;
|
Class cls;
|
||||||
NSString *className = object;
|
NSString *className = object;
|
||||||
|
|
|
@ -45,7 +45,7 @@ static NSNotificationCenter *nc = nil;
|
||||||
if((self = [super init]) != nil)
|
if((self = [super init]) != nil)
|
||||||
{
|
{
|
||||||
[nc addObserver: self
|
[nc addObserver: self
|
||||||
selector: @selector(handleNotification:)
|
selector: @selector(_releaseObject:)
|
||||||
name: IBWillCloseDocumentNotification
|
name: IBWillCloseDocumentNotification
|
||||||
object: nil];
|
object: nil];
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ static NSNotificationCenter *nc = nil;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) handleNotification: (NSNotification *)notification
|
- (void) _releaseObject: (NSNotification *)notification
|
||||||
{
|
{
|
||||||
id<IBDocuments> doc = [notification object];
|
id<IBDocuments> doc = [notification object];
|
||||||
if([doc nameForObject: object] != nil)
|
if([doc nameForObject: object] != nil)
|
||||||
|
|
|
@ -1357,12 +1357,20 @@ static BOOL currently_displaying = NO;
|
||||||
|
|
||||||
- (void) resetObject: (id)anObject
|
- (void) resetObject: (id)anObject
|
||||||
{
|
{
|
||||||
/// NSLog(@"resetObject should not be called on GormViewEditor !");
|
NS_DURING
|
||||||
|
{
|
||||||
|
// display the view, if it's standalone.
|
||||||
if(viewWindow != nil)
|
if(viewWindow != nil)
|
||||||
{
|
{
|
||||||
[viewWindow orderFront: self];
|
[viewWindow orderFront: self];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
NS_HANDLER
|
||||||
|
{
|
||||||
|
NSLog(@"Exception while trying to display standalone view: %@",[localException reason]);
|
||||||
|
}
|
||||||
|
NS_ENDHANDLER
|
||||||
|
}
|
||||||
|
|
||||||
- (void) orderFront
|
- (void) orderFront
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue