Kitchensink 1.4.0 not compiling/launching w latest IDE & SDKs
I am really trying to make myself like Titanium. Not truly straightforward, lots of cryptic error messages ("Try again" etc.)
Anyways. Most likely just beginners problems, perhaps someone can straighten this out:
Running on Mac OS X 10.6.4, downloaded latest versions:
- Titanium Developer 1.2.1 (even though http://vimeo.com/11930363 talks about Titanium 1.3, the download button only provides 1.2.1)
- Titanium SDK 1.4.0 (selected in Edit project tab)
- XCode & Iphone SDK 4.0 (selected in Test&Package)
- Kitchensink 1.4.0 (http://github.com/appcelerator/KitchenSink/downloads)
Importing Kitchensink project gives a strange dialog:
"You are importing a mobile project. Click OK to continue or click Cancel to import this as an iPad project" – (note I am importing the Kitchensink project not the Kitchensink-iPad project)
I click OK, since I want this to be an iPhone project
When I switch to "Test & Package" and click "Launch" I get a bunch of warnings:
[INFO] Compiling JavaScript...one moment
[WARN] JavaScript compiler reported "Extra comma." at app.js:124
[WARN] JavaScript compiler reported "'interval' was used before it was defined." at examples/animation_points.js:44
[WARN] JavaScript compiler reported "Missing semicolon." at examples/animation_points.js:47
[WARN] JavaScript compiler reported "Expected to see a statement and instead saw a block." at examples/basic_animation.js:39
[WARN] JavaScript compiler reported "Stopping, unable to continue. (26% scanned)." at examples/basic_animation.js:39
[WARN] JavaScript compiler reported "['from'] is better written in dot notation." at examples/bonjour.js:9
[WARN] JavaScript compiler reported "['data'] is better written in dot notation." at examples/bonjour.js:10
[WARN] JavaScript compiler reported "['rowData'] is better written in dot notation." at examples/bonjour.js:66
[WARN] JavaScript compiler reported "['services'] is better written in dot notation." at examples/bonjour.js:73
[WARN] JavaScript compiler reported "['data'] is better written in dot notation." at examples/bonjour.js:86
[WARN] JavaScript compiler reported "Be careful when making functions within a loop. Consider putting the function in a closure." at examples/bonjour.js:88
[WARN] JavaScript compiler reported "Missing semicolon." at examples/bonjour.js:101
[WARN] JavaScript compiler reported "Expected to see a statement and instead saw a block." at examples/button.js:50
[WARN] JavaScript compiler reported "Stopping, unable to continue. (34% scanned)." at examples/button.js:50
...
which suggest to my untrained eye that the source for kitchensink has problems.
They are all warnings, not errors.
Nothing actually launches (Emulator etc.)
Can anybody suggest what is wrong here ?
Thanks in advance !
Robert
5 Answers
-
Robert, I did find a way to work around this, basically in the downloaded version of kitchensink, there is a bunch of debris that is causing issue somewhere, don't know where and I don't have anymore cycles tonight to track it down, but what I did was to create a new project, kitchensink2, then I copied over all the resources directory into this new project overwriting the default files that were created from the new project. The compiler barfs the warnings, but continues on to do a fresh build and opens the emulator just fine.
-
Try this..
open examples/button.js and move to 50th line remove curly braces for that function and then go to the root of your project, in build/iphone and delete the build folder( so delete the folder myApp/build/iphone/build)
This will force a full rebuild.
Even then you might get some more errors try to solve those afterthat force a full rebuild.
-
FYI I also downloaded the 1.3.3 version of Kitchensink
It also has a lot of warnings which look like js syntax errors to me but it does eventually launch kitchensink on the iphone emulator unlike its 1.4.0 cousin (perhaps just too many errors in that one)(My) Pilot error or bad kitchensink code ?
-
Hi
Titanium tries to validate the javascript with jslint.
But jslint sometimes it's overzealous.
You might try to fix the errors it complaining of :) or to disable it like in this posthttp://developer.appcelerator.com/question/27621/just-started—want-to-use-googles-closure-tools
And yes kitchensink might have js errors :)
-
Like Robert, I am setup with the latest of everything and the KitchenSink 1.4 does not run, even though it throws a number of js warnings, I'd expect it to run but it never launches? I tried commenting out lines as suggested in the compiler file, and this did get rid of the js errors, however it still did not launch and gave no errors in the developer window. No clue, very dissapointed to see this not work easily…it used to when I messed with Titanium a few months ago, open to suggestions.