mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Correction and cleanup for recent segfault.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20028 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5203d67e8d
commit
30006bfbc0
5 changed files with 24 additions and 52 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2004-09-07 21:00 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Gorm.m: Removed some old code which measured the startup
|
||||
time for the application.
|
||||
* GormDocument.m: Removed previous temporary fix.
|
||||
* Palettes/3Containers/GormTableViewEditor.m: Correction for
|
||||
recently discovered crash. The problem is located here.
|
||||
I have added a retain which seems to stop the crash, but
|
||||
I need to find a better solution. Also removed some old
|
||||
commented out code.
|
||||
* Palettes/3Containers/inspectors.m: Properly indented some
|
||||
code.
|
||||
|
||||
2004-09-06 17:39 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Gorm.m:
|
||||
|
|
3
Gorm.m
3
Gorm.m
|
@ -34,7 +34,6 @@
|
|||
#include <AppKit/NSControl.h>
|
||||
#include <AppKit/NSButton.h>
|
||||
|
||||
NSDate *startDate;
|
||||
NSString *GormLinkPboardType = @"GormLinkPboardType";
|
||||
NSString *GormToggleGuidelineNotification = @"GormToggleGuidelineNotification";
|
||||
NSString *GormDidModifyClassNotification = @"GormDidModifyClassNotification";
|
||||
|
@ -1092,7 +1091,6 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
|
||||
[self setDelegate: self];
|
||||
[super finishLaunching];
|
||||
NSDebugLog(@"StartupTime %f", [startDate timeIntervalSinceNow]);
|
||||
}
|
||||
|
||||
- (void) handleNotification: (NSNotification*)notification
|
||||
|
@ -1597,7 +1595,6 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
int
|
||||
main(int argc, const char **argv)
|
||||
{
|
||||
startDate = [[NSDate alloc] init];
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
|
||||
|
|
|
@ -328,15 +328,9 @@ static NSImage *fileImage = nil;
|
|||
filesOwner = [GormFilesOwner new];
|
||||
[self setName: @"NSOwner" forObject: filesOwner];
|
||||
[objectsView addObject: filesOwner];
|
||||
// RELEASE(filesOwner);
|
||||
firstResponder = [GormFirstResponder new];
|
||||
[self setName: @"NSFirst" forObject: firstResponder];
|
||||
[objectsView addObject: firstResponder];
|
||||
// RELEASE(firstResponder);
|
||||
|
||||
// FIXME: Temporary fix...
|
||||
RETAIN(filesOwner);
|
||||
RETAIN(firstResponder);
|
||||
|
||||
/*
|
||||
* Set image for this miniwindow.
|
||||
|
@ -1016,9 +1010,6 @@ static NSImage *fileImage = nil;
|
|||
// Get rid of the selection box.
|
||||
[selectionBox removeFromSuperviewWithoutNeedingDisplay];
|
||||
|
||||
// remove objects from the topLevelObjects set...
|
||||
// [topLevelObjects removeAllObjects];
|
||||
|
||||
// release the managers...
|
||||
RELEASE(classManager);
|
||||
RELEASE(filePrefsManager);
|
||||
|
@ -1564,8 +1555,9 @@ static NSImage *fileImage = nil;
|
|||
*/
|
||||
if ([obj isKindOfClass: [NSWindow class]] == YES)
|
||||
{
|
||||
[obj setReleasedWhenClosed: YES];
|
||||
// [obj setReleasedWhenClosed: YES];
|
||||
[obj close];
|
||||
RELEASE(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2603,7 +2595,6 @@ static NSImage *fileImage = nil;
|
|||
{
|
||||
return; /* Already have this name ... nothing to do */
|
||||
}
|
||||
// RETAIN(object); // the next operation will attempt to release the object, we need to retain it.
|
||||
[nameTable removeObjectForKey: oldName];
|
||||
NSMapRemove(objToName, (void*)object);
|
||||
}
|
||||
|
@ -2733,8 +2724,8 @@ static NSImage *fileImage = nil;
|
|||
{
|
||||
NSRect frame = [window frame];
|
||||
|
||||
[window setReleasedWhenClosed: YES];
|
||||
[window close];
|
||||
RELEASE(window);
|
||||
[[reverted window] setFrame: frame display: YES];
|
||||
return reverted;
|
||||
}
|
||||
|
|
|
@ -34,29 +34,17 @@ static NSCell *_editedCell;
|
|||
static NSCell *_currentHeaderCell;
|
||||
static NSText *_textObject;
|
||||
|
||||
// @implementation NSScrollView (GormObjectAdditions)
|
||||
// - (NSString*) editorClassName
|
||||
// {
|
||||
// if ([self documentView]
|
||||
// && [[self documentView] isKindOfClass: [NSTableView class]])
|
||||
// return @"GormTableViewEditor";
|
||||
// else
|
||||
// return [super editorClassName];
|
||||
// }
|
||||
// @end
|
||||
|
||||
@interface GormTableViewEditor (Private)
|
||||
- (void) editHeader: (NSTableHeaderView*) th
|
||||
withEvent: (NSEvent *) theEvent;
|
||||
@end
|
||||
|
||||
@implementation GormTableViewEditor
|
||||
/*
|
||||
/**
|
||||
* Decide whether an editor can accept data from the pasteboard.
|
||||
*/
|
||||
- (BOOL) acceptsTypeFromArray: (NSArray*)types
|
||||
{
|
||||
// FIXME
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -74,7 +62,7 @@ static NSText *_textObject;
|
|||
[super setOpened: flag];
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Activate an editor - inserts it into the view hierarchy or whatever is
|
||||
* needed for the editor to be able to provide its functionality.
|
||||
* This method should be called by the document when an editor is created
|
||||
|
@ -88,6 +76,8 @@ static NSText *_textObject;
|
|||
tableView = [(NSScrollView *)_editedObject documentView];
|
||||
else
|
||||
tableView = (GormNSTableView *)_editedObject;
|
||||
|
||||
RETAIN(tableView); // FIXME: Temporary fix.
|
||||
[tableView setAllowsColumnResizing: YES];
|
||||
[tableView setAllowsColumnSelection: YES];
|
||||
[tableView setAllowsMultipleSelection: NO];
|
||||
|
@ -102,7 +92,7 @@ static NSText *_textObject;
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Deactivate an editor - removes it from the view hierarchy so that objects
|
||||
* can be archived without including the editor.
|
||||
* This method should be called automatically by the 'close' method.
|
||||
|
@ -112,7 +102,7 @@ static NSText *_textObject;
|
|||
{
|
||||
if (activated == YES)
|
||||
{
|
||||
[tableView unselect]; // [tableView setBackgroundColor: [NSColor controlBackgroundColor]];
|
||||
[tableView unselect];
|
||||
if ([tableView selectedColumn] != -1)
|
||||
{
|
||||
[tableView deselectColumn: [tableView selectedColumn]];
|
||||
|
@ -280,25 +270,6 @@ static NSText *_textObject;
|
|||
}
|
||||
}
|
||||
|
||||
// - (void) changeObject: (id)anObject
|
||||
// {
|
||||
// if (tableView != nil)
|
||||
// {
|
||||
// if ([tableView selectedColumn] != -1)
|
||||
// {
|
||||
// [tableView deselectColumn: [tableView selectedColumn]];
|
||||
// }
|
||||
// [tableView setBackgroundColor: [NSColor controlBackgroundColor]];
|
||||
// }
|
||||
// ASSIGN(tableView, anObject);
|
||||
|
||||
// [tableView setBackgroundColor: [NSColor whiteColor]];
|
||||
// [tableView setNeedsDisplay: YES];
|
||||
// [self selectObjects: [NSArray arrayWithObject: tableView]];
|
||||
// [self activate];
|
||||
// }
|
||||
|
||||
|
||||
- (void) tableViewSelectionDidChange: (id) tv
|
||||
{
|
||||
if ([tableView selectedColumn] != -1)
|
||||
|
|
|
@ -605,8 +605,8 @@ shouldEditTableColumn: (NSTableColumn *)aTableColumn
|
|||
// remove columns...
|
||||
for(i = 0; i < colsToDelete; i++)
|
||||
{
|
||||
NSTableColumn *tc = [columns objectAtIndex: (i + newNumCols)];
|
||||
[object removeTableColumn: tc];
|
||||
NSTableColumn *tc = [columns objectAtIndex: (i + newNumCols)];
|
||||
[object removeTableColumn: tc];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue