1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    42
    Vote Rating
    2
    berntkau is on a distinguished road

      0  

    Default xds_index.js file question

    xds_index.js file question


    Hi! I've succeeded in creating a viewport with tree, grids and tabpanels in different regions and with business logic that loads data depending on selections. This is my 'application' part.

    So far I had a xds_index.js rendered with the following content:

    Ext.onReady(function() {
    var myVieport = new MyViewport({
    renderTo: Ext.getBody()
    });
    myViewport.show();
    });

    From the forums I learned it was possible to add 'main level' objects in a single project. So I wanted to add a login form. Added this in a window MyLoginWindow. When I export the project the following xds_index.js is generated:

    Ext.onReady(function() {
    var myLoginWindow = new MyLoginWindow({
    renderTo: Ext.getBody()
    });
    myLoginWindow.show();
    var myViewport = new MyViewport({
    renderTo: Ext.getBody()
    });
    myViewport.show();
    });

    This will make both visible. Of course I'd want only the login window to show up and when a successful login is made, the 'application' MyViewport would be shown.

    Now I edit the xds_index.js erase and move the show command into the MyLoginWindow.js which is the correct place for custom code. It works but I have to remember to remove the show command from the generated file every time i export.

    Is there a way to prevent the show command to be generated for each 'main level' object? Or, are there any issues with the way I try to work this out?

    Would appreciate any ideas and suggestions.

  2. #2
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Hi Bernt,

    We're considering making it a toggle/option for both instantiating 'top level' components and showing them...individual components of course. However in the meantime, I recommend making copies of the xds_index.js and xds_index.html files (and change the reference to xds_index.js's copy accordingly), so that you can alter them without them being overwritten upon subsequent exports.

    Thanks.

  3. #3
    Sencha User
    Join Date
    Oct 2009
    Posts
    42
    Vote Rating
    2
    berntkau is on a distinguished road

      0  

    Default


    Hi Jarred!

    Thank you for your reply. Your solution will be functional for me.

    (I'll also try to learn and use the correct terminology.)

  4. #4
    Sencha - Desktop Packager Dev Team jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
    jarrednicholls will become famous soon enough jarrednicholls will become famous soon enough

      0  

    Default


    Haha, that was just my choice of word, wasn't going against you on purpose, sorry! "main level" and "top level" are synonymous in my book :-)

Similar Threads

  1. Question About File Location
    By InterTrade in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 16 May 2009, 2:49 AM
  2. File Upload Question
    By marco76 in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 21 Apr 2008, 5:30 AM
  3. inputType: 'file' question
    By finco in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 21 Mar 2008, 11:30 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi