forked from pmougin/F-Script
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpaceInspector.m
More file actions
executable file
·61 lines (50 loc) · 1.34 KB
/
Copy pathSpaceInspector.m
File metadata and controls
executable file
·61 lines (50 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* SpaceInspector.m Copyright 1998,1999 Philippe Mougin. */
/* This software is Open Source. See the license. */
#import "SpaceInspector.h"
#import "SymbolTableView.h"
#import <assert.h>
#import "String.h"
#import <AppKit/AppKit.h>
@implementation SpaceInspector
//////// USER METHODS
+ spaceInspectorWithSpace:(Space*)space
{
return [[[self alloc] initWithSpace:space] autorelease];
}
- (void) activate
{
if (!window)
{
[NSBundle loadNibNamed:@"spaceInspector.nib" owner:self];
[localView setModel:[inspectedObj localSymbolTable]];
[self retain]; // We are the window delegate and thus we must stay alaive at least as long as the window. But the delegate is not retained, so we do put a retain here // TODO_TAG
}
[window makeKeyAndOrderFront:self];
}
////////////// OTHER METHODS
- (void)dealloc
{
//printf("\n SpaceInspector dealloc\n");
assert(window == nil);
[inspectedObj release];
[super dealloc];
}
- initWithSpace:(Space*)space
{
assert([space isKindOfClass:[Space class]]);
if ([super init])
{
inspectedObj = [space retain];
window = nil;
[self activate];
return self;
}
return nil;
}
- (void)windowWillClose:(NSNotification *)aNotification
{
[window setDelegate:nil];
window = nil;
//[self release];
}
@end