Skip to content
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

XHR Error and backgroundImage not showed #432

Open
geppoz opened this issue Apr 23, 2015 · 0 comments
Open

XHR Error and backgroundImage not showed #432

geppoz opened this issue Apr 23, 2015 · 0 comments

Comments

@geppoz
Copy link

geppoz commented Apr 23, 2015

  • Alloy pattern
  • TiShadow v2.8.1
  • Genymotion v2.4.0
  • Virtual Device S2 2.3.7 API 10
  • Platform Win 7 x64

Hi, thanks a lot for your program. I have a very simple app with 3 controllers and three views. The app works perfectely when complied but I get very strange behaviours on TiShadow:

  1. the background image on the gameMenu.xml Window is not displayed
  2. when I make a modification (e.g. setting fullscreen="true" to fullscreen="false") and launch tishadow run I get the error "XHR Error....".
    I already tried to remove TiShadow and reinstall it and recreate the app.
  • index.js
(function(){Alloy.createController("welcome").getView().open();})();
  • welcome.js
function setUI(){
    this.activity.actionBar.hide();
    this.visible = true;
};

function nextPage(){
    Alloy.createController("gameMenu").getView().open();
    $.winWelcome.close();
    $.winWelcome = null;    
};
  • welcome.xml
<Alloy>
    <Window id="winWelcome" backgroundColor="aqua" fullscreen="true" visible="false"  backgroundImage="background.png" onPostlayout="setUI">
        <View id="viewMain" layout="vertical" visible="true">
            <View id="viewUp" height="50%"></View>
            <View id="viewDown" height="50%"  layout="vertical">
                <View id="viewBtnContinue" height="20%">
                    <Button onClick="nextPage">NEXT PAGE</Button>
                </View>
                <View id="viewBtnCredits" height="20%">
                    <Button>DUMMY BUTTON</Button>
                </View>
                <View id="viewBtnInstructions" height="20%">
                    <Button>DUMMY BUTTON</Button>
                </View>
                <View id="viewBtnStats" height="20%">
                    <Button>DUMMY BUTTON</Button>
                </View>
                <View id="viewBtnExit" height="20%">
                    <Button>DUMMY BUTTON</Button>
                </View>
            </View>
        </View>
    </Window>
</Alloy>
  • gameMenu.js
function setUI(){
    this.activity.actionBar.hide();
    this.visible = true;
};


function prevPage(){
    Alloy.createController("welcome").getView().open();
    $.winGameMenu.close();
    $.winGameMenu = null;
}
  • gameMenu.xml
<Alloy>
    <Window  id="winGameMenu" fullscreen="true" backgroundImage="background.png" visible="false" onPostlayout="setUI">
        <Button onClick="prevPage">PREV PAGE</Button>
    </Window>
</Alloy>

Thank you. Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant