0

So i have file1 which is:

<Alloy>
    <Window class="container">
        <View class='game1' id = 'game1'></View>
        <View class='game2'></View>
        <View class='game3'></View>
        <View class='game4'></View>
        <View class='game5'></View>
        <View class='game6'></View>
        <View class='game7'></View>
        <View class='game8'></View>
        <View class='game9'></View>
    </Window>
</Alloy>

and file 2 is

<Alloy>
    <View>
        <View class='game1'></View>
        <View class='game2'></View>
        <View class='game3'></View>
        <View class='game4'></View>
        <View class='game5'></View>
        <View class='game6'></View>
        <View class='game7'></View>
        <View class='game8'></View>
        <View class='game9'></View>
    </View>
</Alloy>

i do:

var GAME1 = Alloy.createController('file2');
$.game1.add(GAME1);

this works in iphone if file 2 was a window but android does not support windows in a window and crashes. this way does not seem to work either for android. the end goal is to have a 3x3 board with another 3x3 board but would need to be in 2 different files.

C. M. Sperberg-McQueen
  • 24,596
  • 5
  • 38
  • 65
Mikecit22
  • 157
  • 1
  • 14

1 Answers1

2

first off try this

var GAME1 = Alloy.createController('file2');
$.game1.add(GAME1.getView());
Aaron Saunders
  • 33,180
  • 5
  • 60
  • 80