Empty remnant folder removed. iPhoneMain.js referenced it, but it didn't appear in git. Please get the new version.
-Patrick
--
JSCocoa: http://inexdo.com/JSCocoa
Source: http://github.com/parmanoir/jscocoa/tree/master
Docs: http://code.google.com/p/jscocoa/
Group: http://groups.google.com/group/jscocoa
Unsubscribe: jscocoa+u...@googlegroups.com
/Users/cowboyd/Projects/jscocoa/iPhone/../JSCocoa/JSCocoaController.m: In function 'jsCocoaObject_callAsFunction_ffi':/Users/cowboyd/Projects/jscocoa/iPhone/../JSCocoa/JSCocoaController.m:4332: error: 'struct objc_super' has no member named 'class'Is it possible that I'm missing some headers?
51: error: Pattern colors are not supported by the iPhone SDK for
iPhone OS versions prior to 3.0. [12]
If I comment this out, the application does compile, and even
launches, but only to a blank screen. I suspect that it is due to the
error that the build is seeing on the .xib:
/Users/cowboyd/Projects/jscocoa/iPhone/../JSCocoa/JSCocoaController.m: In function 'jsCocoaObject_callAsFunction_ffi':/Users/cowboyd/Projects/jscocoa/iPhone/../JSCocoa/JSCocoaController.m:4332: error: 'struct objc_super' has no member named 'class'Is it possible that I'm missing some headers?iPhoneTest2 is a proof of concept so it's expected to break :)The last SDK I tested is 3.1.3.
51: error: Pattern colors are not supported by the iPhone SDK for
iPhone OS versions prior to 3.0. [12]Which SDK are you using?
If I comment this out, the application does compile, and even
launches, but only to a blank screen. I suspect that it is due to the
error that the build is seeing on the .xib:You're seeing a blank screen because of the objc_super error : the derived class can't call the parent class which does most of the work.
-> Go to JSCocoaController.m:4332 and hold command while double clicking objc_super, this will take you to its definition. What members does it define ?-Patrick
Have you tried both device and simulator ?
>>
>>> If I comment this out, the application does compile, and even
>>> launches, but only to a blank screen. I suspect that it is due to the
>>> error that the build is seeing on the .xib:
>>
>> You're seeing a blank screen because of the objc_super error : the derived class can't call the parent class which does most of the work.
>
> So what is the relation of the iPhoneTest2 to JSCocoa, does it use the JSCocoa library, or does it only borrow some of the concepts?
iPhoneTest2 uses JSCocoa (which itself has some code testing for TARGET_OS_IPHONE) and uses custom classes written in Javascript in iPhoneMain.js. These Javascript classes still need to call the parent SDK methods, which is done with objc_super. (this.Super(arguments) in Javascript)
Btw I still need you to do this :
-> Go to JSCocoaController.m:4332 and hold command while double clicking objc_super, this will take you to its definition. What members does it define ?
Alternatively, you could try switching the unknown 'class' member with 'super_class' and see if that works.
-Patrick
Perhaps that is it. I (think) I'm using 3.2. I also tried on 4.0 with no luck. It seems like an odd error message, because its complaining about support prior to 3.0
Have you tried both device and simulator ?
If I comment this out, the application does compile, and evenlaunches, but only to a blank screen. I suspect that it is due to theerror that the build is seeing on the .xib:You're seeing a blank screen because of the objc_super error : the derived class can't call the parent class which does most of the work.So what is the relation of the iPhoneTest2 to JSCocoa, does it use the JSCocoa library, or does it only borrow some of the concepts?
iPhoneTest2 uses JSCocoa (which itself has some code testing for TARGET_OS_IPHONE) and uses custom classes written in Javascript in iPhoneMain.js. These Javascript classes still need to call the parent SDK methods, which is done with objc_super. (this.Super(arguments) in Javascript)
Btw I still need you to do this :
-> Go to JSCocoaController.m:4332 and hold command while double clicking objc_super, this will take you to its definition. What members does it define ?
Alternatively, you could try switching the unknown 'class' member with 'super_class' and see if that works.
-Patrick
Yes.
They did relax the rules recently : http://www.appleinsider.com/articles/10/06/11/apple_relaxes_ios_sdk_to_allow_lua_but_block_flash.html
... and JSCocoa uses the iPhone's JavascriptCore library. Maybe it could go through, or will someday. But just to be safe, don't depend on JSCocoa.
-Patrick
The key there is "except for code that is interpreted and run by Apple's Documented APIs and built-in interpreter(s)"It seems like JavaScriptCore fits the bill as both "documented" and "built-in".
#elif TARGET_IPHONE_SIMULATOR || !TARGET_OS_IPHONE
_super.class = superSelectorClass;
to this...
#elif TARGET_IPHONE_SIMULATOR || !TARGET_OS_IPHONE
_super.super_class = superSelectorClass;
then it worked.
> Unfortunately JavascriptCore is not documented on the iPhone, just built-in. JSCocoa works by importing the JavascriptCore headers from the Mac and, at launch, grabbing each JavascriptCore function with dlsym().
Has anyone tried to get a JSCocoa app w/ JSCore bundled (not making
use of a private api) through to approval? It would seem that the
revisions to 3.3.2 technically allow for JSCocoa-style apps as long as
there's no code downloaded.
-Steve