Guest User

Untitled

a guest
May 26th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. I've pared this down to the point where I just created a test app and dropped the sample code from the API doc into app.js. When row.add or picker.add is called, the error "Cannot call method "add" of null" is returned.
  2.  
  3. Hopefully I'm just doing something stupid but I can't see what it is.
  4.  
  5. Here's the code (from the docs):
  6.  
  7. var picker = Titanium.UI.createPicker();
  8. var row = Titanium.UI.createPickerRow();
  9. var label = Titanium.UI.createLabel({
  10. text: 'foo',
  11. font: { fontSize: 24, fontWeight: 'bold' },
  12. width: 'auto',
  13. height: 'auto'
  14. });
  15. row.add(label);
  16. picker.add(row);
Add Comment
Please, Sign In to add comment