mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Improve message window when there is a problem while testing interface. Also use the "objects" map to determine what is a top level object, since a top level object will always return either a nil, or the file's owner.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@23104 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1039379c21
commit
7dcc22a791
3 changed files with 20 additions and 15 deletions
|
@ -1,3 +1,12 @@
|
|||
2006-06-24 20:41 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormNibWrapperLoader.m: Change
|
||||
-[GormNibWrapperLoader _isTopLevelObject:] to use the "objects"
|
||||
map. This map is used to maintain parent/child object
|
||||
relationships in the .nib file.
|
||||
* Gorm.m: in -[Gorm testInterface] change the warning to use
|
||||
multiple lines. On smaller screens it runs over.
|
||||
|
||||
2006-06-24 10:36 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormNibWrapperLoader.m: Remove swappedObjects
|
||||
|
|
8
Gorm.m
8
Gorm.m
|
@ -549,11 +549,11 @@
|
|||
NS_HANDLER
|
||||
{
|
||||
// reset the application after the error.
|
||||
NSLog(@"Error while testing interface: %@",
|
||||
NSLog(@"Problem while testing interface: %@",
|
||||
[localException reason]);
|
||||
NSRunAlertPanel(_(@"An Error Occurred"),
|
||||
[NSString stringWithFormat:
|
||||
@"Problem testing interface. Make sure connections are to appropriate objects. Exception: %@",
|
||||
NSRunAlertPanel(_(@"Problem While Testing Interface"),
|
||||
[NSString stringWithFormat: @"Make sure connections are to appropriate objects.\n"
|
||||
@"Exception: %@",
|
||||
[localException reason]],
|
||||
_(@"OK"), nil, nil);
|
||||
[self endTesting: self];
|
||||
|
|
|
@ -74,20 +74,16 @@
|
|||
|
||||
- (BOOL) _isTopLevelObject: (id)obj
|
||||
{
|
||||
if([obj isKindOfClass: [NSWindow class]] ||
|
||||
[obj isKindOfClass: [GormObjectProxy class]])
|
||||
NSMapTable *objects = [container objects];
|
||||
id val = NSMapGet(objects,obj);
|
||||
BOOL result = NO;
|
||||
|
||||
if(val == nibFilesOwner || val == nil)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
else if([obj isKindOfClass: [NSMenu class]])
|
||||
{
|
||||
if([obj supermenu] == nil)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
result = YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
return result;
|
||||
}
|
||||
|
||||
- (BOOL) loadFileWrapper: (NSFileWrapper *)wrapper withDocument: (GormDocument *) doc
|
||||
|
|
Loading…
Reference in a new issue