bool comma(false);
#ifdef __APPLE__
- for (id key in self) {
+ for (NSObject *key in self) {
#else
NSEnumerator *keys([self keyEnumerator]);
- while (id key = [keys nextObject]) {
+ while (NSObject *key = [keys nextObject]) {
#endif
if (comma)
[json appendString:@","];
[super cy$getPropertyNames:names inContext:context];
#ifdef __APPLE__
- for (NSString *key in self) {
+ for (NSObject *key in self) {
#else
NSEnumerator *keys([self keyEnumerator]);
- while (NSString *key = [keys nextObject]) {
+ while (NSObject *key = [keys nextObject]) {
#endif
JSPropertyNameAccumulatorAddName(names, CYJSString(context, key));
}
} CYObjectiveCatch }
- (id) objectForKey:(id)key { CYObjectiveTry {
- // XXX: are NSDictionary keys always NSString *?
- JSValueRef value(CYGetProperty(context_, object_, CYJSString(context_, (NSString *) key)));
+ JSValueRef value(CYGetProperty(context_, object_, CYJSString(context_, (NSObject *) key)));
if (JSValueIsUndefined(context_, value))
return nil;
return CYCastNSObject(NULL, context_, value) ?: [NSNull null];
} CYObjectiveCatch }
- (void) setObject:(id)object forKey:(id)key { CYObjectiveTry {
- // XXX: are NSDictionary keys always NSString *?
- CYSetProperty(context_, object_, CYJSString(context_, (NSString *) key), CYCastJSValue(context_, (NSString *) object));
+ CYSetProperty(context_, object_, CYJSString(context_, (NSObject *) key), CYCastJSValue(context_, (NSString *) object));
} CYObjectiveCatch }
- (void) removeObjectForKey:(id)key { CYObjectiveTry {
JSValueRef exception(NULL);
- // XXX: are NSDictionary keys always NSString *?
- (void) JSObjectDeleteProperty(context_, object_, CYJSString(context_, (NSString *) key), &exception);
+ (void) JSObjectDeleteProperty(context_, object_, CYJSString(context_, (NSObject *) key), &exception);
CYThrow(context_, exception);
} CYObjectiveCatch }
support unions (right now 0-1 fields parsed as struct)
\\\n escapes in strings aren't handled in the console
look into what String is, and whether to bridge it
+think about bridging NSNumber with Number prototype
some JS callbacks don't use exception pointers at all...
a newline needs to not be allowed after a unary *
finish implementing default xml namespace statement
consider a mode where unicode string content is saved
https://bugzilla.mozilla.org/show_bug.cgi?id=274152
-cy# SBAwayController.sharedAwayController->_displayValues
-"*** -[NSCFNumber length]: unrecognized selector sent to instance 0x4a4bda0"
-b = []; for (x in a) b.push(x); <- crashes
-
+NSDictionaries that have NSNumber keys don't getProperty
errors in another process aren't displayed; to fix this, parse errors should get converted to exceptions and thrown
CYPoolTry/Catch now carefully save the exception after it /no longer needs the exception/... uhh... wtf?
throw CYJSError should probably be replaced with CYThrow() across the board