Skip to content

Instantly share code, notes, and snippets.

@benbahrenburg
Forked from tzmartin/gist:1372475
Created December 8, 2011 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benbahrenburg/1446135 to your computer and use it in GitHub Desktop.
Save benbahrenburg/1446135 to your computer and use it in GitHub Desktop.
UIModule Error Hack
/*
* This is a hack solves the "Invalid method passed to UIModule" error
* It works by forcing Titanium to load SDK components into memory.
*
* Drop this file anywhere in your project and DON'T Ti.include() it.
* Be sure this file extension is .js.
* Clean and recompile your project.
*
* Enjoy!
* @tzmartin
*/
var hk1 = false;
hk1 = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'test.xml');
hk1 = Ti.UI.createAlertDialog();
hk1 = Ti.UI.createWindow();
hk1 = Titanium.UI.createButton();
hk1 = Titanium.UI.createLabel();
hk1 = Titanium.UI.createTextField();
hk1 = Titanium.UI.createTextArea();
hk1 = Titanium.UI.createImageView();
hk1 = Titanium.UI.createScrollView();
hk1 = Titanium.UI.createScrollableView();
hk1 = Titanium.UI.createPicker();
hk1 = Titanium.UI.createTableView();
hk1 = Titanium.UI.createToolbar();
hk1 = Titanium.UI.createProgressBar();
hk1 = Titanium.UI.createPicker();
hk1 = Titanium.UI.createPickerColumn();
hk1 = Titanium.Map.createView();
@benbahrenburg
Copy link
Author

hk1 = Titanium.Database.open();

@benbahrenburg
Copy link
Author

Add the above to patch 1.8.x issue on dec 7 2011 around unable to find UI.Database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment