55 [_monitor disconnectDebugger:self message:@"Debugger released."];
58 [_configuration release];
66- (void)performConsoleCommand:(NSString *)command
68 [_monitor performJSConsoleCommand:command];
72- (id)configurationValueForKey:(NSString *)key
74 return [
self configurationValueForKey:key class:Nil defaultValue:nil];
78- (id)configurationValueForKey:(NSString *)key class:(Class)class defaultValue:(
id)value
82 if (
class == Nil)
class = [NSObject class];
84 result = [_configuration objectForKey:key];
85 if (![result isKindOfClass:
class] && result != [NSNull
null]) result = [[value retain] autorelease];
86 if (result == [NSNull
null]) result =
nil;
92- (
long long)configurationIntValueForKey:(NSString *)key defaultValue:(
long long)value
97 object = [
self configurationValueForKey:key];
98 if ([
object respondsToSelector:
@selector(longLongValue)]) result = [object longLongValue];
99 else if ([
object respondsToSelector:
@selector(intValue)]) result = [object intValue];
106- (BOOL)configurationBoolValueForKey:(NSString *)key
112- (void)setConfigurationValue:(
id)value forKey:(NSString *)key
114 if (key ==
nil)
return;
116 [_monitor setConfigurationValue:value forKey:key];
120- (NSArray *)configurationKeys
122 return [[_configuration allKeys] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
129 errorMessage:(out NSString **)message
131 if (debugMonitor == _monitor)
133 if (message != NULL) *message =
@"ERROR: attempt to reconnect already-connected debugger!";
140 [_monitor disconnectDebugger:self message:@"Connected to different monitor."];
144 _monitor = debugMonitor;
149 message:(in NSString *)message
151 NSString *prefix =
nil;
152 NSRange emphasisRange;
154 if (debugMonitor == _monitor)
156 prefix =
@"Debugger disconnected: ";
157 emphasisRange = NSMakeRange(0, [prefix length] - 1);
158 [_jsConsoleController appendMessage:[prefix stringByAppendingString:message]
159 colorKey:@"console-internal"
160 emphasisRange:emphasisRange];
167 emphasisRange = NSMakeRange(0, [prefix length] - 1);
168 message = [NSString stringWithFormat:@"%@attempt to disconnect unconnected debug monitor %@ with message: %@", prefix, debugMonitor, message];
169 [_jsConsoleController appendMessage:message
170 colorKey:@"console-internal"
171 emphasisRange:emphasisRange];
177 jsConsoleOutput:(in NSString *)output
178 colorKey:(in NSString *)colorKey
179 emphasisRange:(in NSRange)emphasisRange
181 [_jsConsoleController appendMessage:output
183 emphasisRange:emphasisRange];
186- (oneway void)debugMonitorClearConsole:(in
OODebugMonitor *)debugMonitor
188 [_jsConsoleController clearConsole];
191- (oneway void)debugMonitorShowConsole:(in
OODebugMonitor *)debugMonitor
193 [_jsConsoleController doShowConsole];
197 noteConfiguration:(in NSDictionary *)configuration
199 [_configuration release];
200 _configuration = [configuration mutableCopy];
202 [_jsConsoleController noteConfigurationChanged:nil];
207noteChangedConfigrationValue:(in
id)newValue
208 forKey:(in NSString *)key
210 if (_configuration ==
nil) _configuration = [[NSMutableDictionary alloc] init];
211 if (newValue !=
nil) [_configuration setObject:newValue forKey:key];
212 else [_configuration removeObjectForKey:key];
214 [_jsConsoleController noteConfigurationChanged:key];
void setDebugger:(OOMacDebugger *debugger)
OOJavaScriptConsoleController * _jsConsoleController
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque