0

I have button named settings in my titanium alloy project. What i want is, to open the settings window upon clicking/tapping the button. So i have used following code

var settingsWindow = Alloy.createController('settings').getView();
settingsWindow.open();

In my settings.xml file which is my view has following code in it

<Alloy>
    <window id="settings">
        <label onClick="settingsAlert">Settings Page</label>
    </window>
</Alloy>

My problem is, i am getting this runtime error on my emulator saying

Uncaught TypeError: Object# has no method 'createwindow'

user1795109
  • 678
  • 2
  • 6
  • 14

1 Answers1

0
<Alloy>
    <window id="settings">
        <label onClick="settingsAlert">Settings Page</label>
    </window>
</Alloy>

should be

<Alloy>
    <Window id="settings">
        <Label onClick="settingsAlert">Settings Page</Label>
    </Window>
</Alloy>

Alloy is case sensitive, window should be Window and label should be Label

Aaron Saunders
  • 33,180
  • 5
  • 60
  • 80