-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Titanium UI components are ignored at compile time when loaded with Helium #4
Comments
d'oh! You're right, of course, the build scripts do indeed look at the contents of your project and omit unused namespaces. I guess all of my Helium projects to date have also included Ti.UI default constructors. I will look into ways to address this, thanks for the report. |
I've also discovered this issue, i've made a workaround which basically involves adding all the Ti.UI.create* methods to the end of the helium.js file, when titanium compiles the project it checks all files for the presence of those methods and includes the modules based on usage, so this makes sure everything is included.. Here's a Gist showing what i've done to make it work, hopefully you can include this in future releases to help anyone else... |
Hi, We've got the same issue and swanify's fix works for us. Please update this ticket if something is changed in Helium to "fix" that ;-) |
Recently i've been messing around with android and some of the namespaces i outlined before are not supported for Android, so the code should be adjusted to: // Titanium doesn't like it if you done use their standard way of creating objects, if(Ti.Platform.osname != "android"){ |
I can't thank you guys enough for these instructions. It was painful just getting to the point of figuring out why my app was running on all emulators and the Android device, but nothing on the iPod Touch. Luckily I found that by installing a debug version on the iPod Touch, while connected to the computer and watching the verbose output scrolling in my XCode/Organizer/Device/Console (think Android DDMS output), did I finally see the relationship/connection/misbehaviour between Titanium and helium.js! |
No problem glad you got it working! |
Matt good work on the solution for this, saved me some pain! |
The docs suggest it should be possible to use Helium to create Appcelerator core components within custom component constructors, e.g.
This works fine when using the simulator (the iPhone simulator, specifically) - because the simulator includes all core modules automatically. However when I build the application for the device, the defines.h file is missing defines for the core components - because the compiler.py file is searching for tokens in the Titanium.UI.create or Ti.UI.create mould. So if an application only creates core components using he.create(), none of those components are available in the build; obviously the application then fails to work.
I can work around this issue by only using the Titanium constructors for core components, but I think functionality like presets will be broken without either patching the complier script to pick up on custom constructors, or allowing custom constructors to be defined on a per-project basis. It'd be nice to keep things consistent, too.
The text was updated successfully, but these errors were encountered: