mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Correction for a number of issues found today.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20492 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ff53d2bb5c
commit
0d3289f6c3
6 changed files with 90 additions and 37 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-12-27 21:21 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GModelDecoder.m:
|
||||
* GormDocument.m: Change to properly handle exception when
|
||||
a class fails to parse.
|
||||
* Gorm.m: Correction for Bug#11415 and also made a changed to
|
||||
discontinue connection when a cut/paste/copy operation is done.
|
||||
* GormObjectEditor.m: Correction for Bug#11415.
|
||||
* Palettes/0Menus/GormMenuEditor.m: Correction for Bug#11412.
|
||||
|
||||
2004-12-23 14:52 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormFilesOwner.h: Added inspector declaration.
|
||||
|
|
|
@ -310,7 +310,26 @@ static BOOL gormFileOwnerDecoded;
|
|||
}
|
||||
else
|
||||
{
|
||||
[classManager parseHeader: header];
|
||||
NS_DURING
|
||||
{
|
||||
if(![classManager parseHeader: header])
|
||||
{
|
||||
NSString *file = [header lastPathComponent];
|
||||
NSString *message = [NSString stringWithFormat:
|
||||
_(@"Unable to parse class in %@"),file];
|
||||
NSRunAlertPanel(_(@"Problem parsing class"),
|
||||
message,
|
||||
nil, nil, nil);
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSString *message = [localException reason];
|
||||
NSRunAlertPanel(_(@"Problem parsing class"),
|
||||
message,
|
||||
nil, nil, nil);
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
55
Gorm.m
55
Gorm.m
|
@ -34,7 +34,6 @@
|
|||
#include <AppKit/NSControl.h>
|
||||
#include <AppKit/NSButton.h>
|
||||
|
||||
NSString *GormLinkPboardType = @"GormLinkPboardType";
|
||||
NSString *GormToggleGuidelineNotification = @"GormToggleGuidelineNotification";
|
||||
NSString *GormDidModifyClassNotification = @"GormDidModifyClassNotification";
|
||||
NSString *GormDidAddClassNotification = @"GormDidAddClassNotification";
|
||||
|
@ -408,11 +407,6 @@ static NSImage *testingImage = nil;
|
|||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
/*********************** Info Menu Actions****************************/
|
||||
/***********************************************************************/
|
||||
|
||||
- (id) connectDestination
|
||||
{
|
||||
return connectDestination;
|
||||
|
@ -423,7 +417,6 @@ static NSImage *testingImage = nil;
|
|||
return connectSource;
|
||||
}
|
||||
|
||||
|
||||
- (void) displayConnectionBetween: (id)source
|
||||
and: (id)destination
|
||||
{
|
||||
|
@ -546,11 +539,7 @@ static NSImage *testingImage = nil;
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
/*********************** Info Menu Actions ****************************/
|
||||
/***********************************************************************/
|
||||
/** Info Menu Actions */
|
||||
|
||||
- (void) preferencesPanel: (id) sender
|
||||
{
|
||||
|
@ -562,10 +551,8 @@ static NSImage *testingImage = nil;
|
|||
[[preferencesController window] makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
/** Document Menu Actions */
|
||||
|
||||
/***********************************************************************/
|
||||
/*********************** Document Menu Actions*************************/
|
||||
/***********************************************************************/
|
||||
- (void) open: (id) sender
|
||||
{
|
||||
GormDocument *doc = AUTORELEASE([GormDocument new]);
|
||||
|
@ -583,8 +570,6 @@ static NSImage *testingImage = nil;
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//include Modules Menu
|
||||
- (void) newGormDocument : (id) sender
|
||||
{
|
||||
id doc = AUTORELEASE([GormDocument new]);
|
||||
|
@ -813,9 +798,7 @@ static NSImage *testingImage = nil;
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
/*********************** Edit Menu Actions*****************************/
|
||||
/***********************************************************************/
|
||||
/** Edit Menu Actions */
|
||||
|
||||
- (void) copy: (id)sender
|
||||
{
|
||||
|
@ -823,6 +806,11 @@ static NSImage *testingImage = nil;
|
|||
|| [selectionOwner respondsToSelector: @selector(copySelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
{
|
||||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner copySelection];
|
||||
}
|
||||
|
||||
|
@ -833,6 +821,12 @@ static NSImage *testingImage = nil;
|
|||
|| [selectionOwner respondsToSelector: @selector(copySelection)] == NO
|
||||
|| [selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
{
|
||||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner copySelection];
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner deleteSelection];
|
||||
}
|
||||
|
@ -842,6 +836,11 @@ static NSImage *testingImage = nil;
|
|||
if ([selectionOwner respondsToSelector: @selector(pasteInSelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
{
|
||||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner pasteInSelection];
|
||||
}
|
||||
|
||||
|
@ -851,6 +850,12 @@ static NSImage *testingImage = nil;
|
|||
if ([[selectionOwner selection] count] == 0
|
||||
|| [selectionOwner respondsToSelector: @selector(deleteSelection)] == NO)
|
||||
return;
|
||||
|
||||
if([self isConnecting])
|
||||
{
|
||||
[self stopConnecting];
|
||||
}
|
||||
|
||||
[(id<IBSelectionOwners,IBEditors>)selectionOwner deleteSelection];
|
||||
}
|
||||
|
||||
|
@ -913,9 +918,7 @@ static NSImage *testingImage = nil;
|
|||
[[NSFontManager sharedFontManager] orderFrontFontPanel: self];
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
/*********************** Group Action *******************************/
|
||||
/***********************************************************************/
|
||||
/** Grouping */
|
||||
|
||||
- (void) groupSelectionInSplitView: (id)sender
|
||||
{
|
||||
|
@ -948,7 +951,7 @@ static NSImage *testingImage = nil;
|
|||
[(GormGenericEditor *)selectionOwner ungroup];
|
||||
}
|
||||
|
||||
/// Classes actions...
|
||||
/** Classes actions */
|
||||
|
||||
- (void) createSubclass: (id)sender
|
||||
{
|
||||
|
@ -982,7 +985,7 @@ static NSImage *testingImage = nil;
|
|||
[(GormDocument *)[self activeDocument] remove: sender];
|
||||
}
|
||||
|
||||
/// Palettes Actions...
|
||||
/** Palettes Actions... */
|
||||
|
||||
- (void) inspector: (id) sender
|
||||
{
|
||||
|
@ -999,7 +1002,7 @@ static NSImage *testingImage = nil;
|
|||
[[self palettesManager] openPalette: sender];
|
||||
}
|
||||
|
||||
/// Testing methods...
|
||||
/** Testing methods... */
|
||||
|
||||
- (void) deferredEndTesting: (id) sender
|
||||
{
|
||||
|
|
|
@ -351,8 +351,29 @@ static NSImage *fileImage = nil;
|
|||
|
||||
while ((obj = [en nextObject]) != nil)
|
||||
{
|
||||
NSDebugLog(@"Preloading %@", obj);
|
||||
[classManager parseHeader: (NSString *)obj];
|
||||
NSString *header = (NSString *)obj;
|
||||
|
||||
NSDebugLog(@"Preloading %@", header);
|
||||
NS_DURING
|
||||
{
|
||||
if(![classManager parseHeader: header])
|
||||
{
|
||||
NSString *file = [header lastPathComponent];
|
||||
NSString *message = [NSString stringWithFormat:
|
||||
_(@"Unable to parse class in %@"),file];
|
||||
NSRunAlertPanel(_(@"Problem parsing class"),
|
||||
message,
|
||||
nil, nil, nil);
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSString *message = [localException reason];
|
||||
NSRunAlertPanel(_(@"Problem parsing class"),
|
||||
message,
|
||||
nil, nil, nil);
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* Method to return the image that should be used to display objects within
|
||||
* the matrix containing the objects in a document.
|
||||
*/
|
||||
@implementation NSObject (IBObjectAdditions)
|
||||
@implementation NSObject (GormAdditions)
|
||||
+ (BOOL)canSubstituteForClass: (Class)origClass
|
||||
{
|
||||
return NO;
|
||||
|
|
|
@ -532,7 +532,7 @@
|
|||
NSEnumerator *e = [s objectEnumerator];
|
||||
NSMenuItem *i;
|
||||
NSArray *d = nil;
|
||||
|
||||
|
||||
[self makeSelectionVisible: NO];
|
||||
[self selectObjects: [NSArray array]];
|
||||
|
||||
|
@ -780,11 +780,7 @@ void _attachAll(NSMenu *menu, id document)
|
|||
{
|
||||
NSString *title = [item title];
|
||||
|
||||
if ([edited indexOfItemWithTitle: title] > 0)
|
||||
{
|
||||
[document detachObject: item]; /* Already exists */
|
||||
}
|
||||
else
|
||||
if ([edited indexOfItemWithTitle: title] == -1)
|
||||
{
|
||||
if ([[self _menu] _ownedByPopUp])
|
||||
{
|
||||
|
@ -792,7 +788,11 @@ void _attachAll(NSMenu *menu, id document)
|
|||
[item setMixedStateImage: nil];
|
||||
}
|
||||
[edited addItem: item];
|
||||
|
||||
[document attachObject: item toParent: [self _menu]];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSBeep(); // warn the user about pasting duplicates.
|
||||
}
|
||||
}
|
||||
[edited sizeToFit];
|
||||
|
|
Loading…
Reference in a new issue