Control the order in which things to load

Hi, I am very new to actionscript, and this is my first post in this forum.

Writtent after an application entirely in MXML, I decided to go for my second application, but using AS this time.

My problem seems very trivial, but somehow, I can't have my head on how to pass it.

My request is based on a XML configuration loading in order to display a list object that is in my drawUI() method.

the problem is the file XML never seems to load before the drawUI method, this is why I always end up with an empty list.

Is there anyway that I can get my drawUI() method to run once the XML has been fully charged?

Thanks in advance,

Marcos Placona

Try:

var config : XML;
var file : File = File.applicationDirectory.resolvePath( 'assets/myfile.xml' );
if( file.exists )
{
    var file_stream : FileStream = new FileStream();
    file_stream.open( file, FileMode.READ );
    config = new XML( file_stream.readUTFBytes( file_stream.bytesAvailable ) );
    file_stream.close();
}

Tags: BlackBerry Developers

Similar Questions

  • Control the order in which the tools are displayed

    Hello

    I have developed a number of folder level JavaScripts.  Each JavaScript displays a button to launch under the "additional tools".

    I was hoping that someone could tell me how I can control the order in which these buttons will be displayed.

    Buttons are displayed in alphabetical order according to the 'cLabel '?  If they are listed according to the date and time the file was created or modified?

    Is there an optional parameter to set the order?

    Thank you

    Linda

    Hello

    Actually, I figured out how to control the order in which appear the buttons below "additional tools".

    There is an optional parameter for app.addToolButton called NPO: which can be used.  I think that the lower the number used, the highest on the list, the button will appear.  This kind of work.  The list of buttons re - arrange themselves, but not exactly the way I wanted to.

    Another thing I did was to rename the JavaScript files. I went before the first file name with a '1 '.   The second file directly under the first I preceded it's name with a number '2' and so on.  That seemed to do the trick...

    All I had to do was probably to rename the JS files with the '1' and '13' numbers and buttons with appear correctly.

    Thank you

    Linda

  • Control the order in which the images will be displayed in the Lightbox

    I have an album with a selection of images. All the images are numbered in a specific order. Thumbnails when selected is displayed correctly the final image and I discovered that their sequential numbering is affected by whether they are sent to the front or the rear. So I have them displaying their correct automatic sequential number in allows Muse say 1-3, 2-3 and 3-3, in which case 1-3 is sent to the rear and 3-3 is sent forward. However, when it is displayed in preview or a browser the first image is 3 - 3, then the order is 1-3 and then 2-3. Is there a good way to make sure the image 1-3 is the first picture shown?

    If you have only a few images, why use the auto meter? Why not use the title of the image to fill the desired numbers manually?

  • Control the order of execution of the init/release

    I have a small program that I write in LabView.  It has an API (one set of screws to wrapping the functions of the DLL to control a device).

    Other such programs in the Gayshop make liberal use of the structures of the sequence.  I understand that the sequence into LabVIEW structures are not usually recommended.  I am writing my program with the best style of LabVIEW (as far as I understand - I'm still a relative novice in LabVIEW).

    I found that I could wire together the error / mistake Terminal to create a data flow to control the order of execution and it works beautifully.

    However, there are some cases where it is not enough.

    Here is an example.  I hope that the answer to this will answer my other questions.  If this is not the case, perhaps that I'll post more.

    One of the first live I call is an Init function.  One of the last screw is the release function.

    The release function must be called at the end, after the rest of the program executed (in this case, it is after the user requests the stop).  It should be naturally at the end (or almost) of the error string in / out connections error (as it is currently).

    However, the error it receives, which will determine whether or not he will run, should be the output of Init.  Release should work even if something else has failed.

    I enclose a photo showing the problem, with most of the code snipped out (as exactly what is happening in the middle is not relevant).

    What is the elegant way to handle this in LabVIEW.  Is it really a deal for a structure of the sequence, or is there a way more pleasant or better?  How would you recommend handling?

    Thank you very much.

    BP

    I agree with what pincpanter said, more you will need to use the status of the function 'Init '.

    Note that you can ignore the error and make the merger within the Vi version if you wish.

    Steve

  • Can I change the order in which my various email accounts are displayed in TB?

    I use TB to access emails from 5 different accounts. They are displayed in the order in which I added the but I would like to change this order. Is it possible, please?

    Go to the Add Ons page and the search for records of manual sorting. It will allow you to rearrange the files and accounts.

  • I want to open links, I click on to appear among the tabs at the end (to the right) of my browser. Is there a way to control the order of the tabs?

    I find it confusing that when I click on a link, the new tab for this link opens somewhere in the middle of my line of tabs. I would have preferred that the new tabs would appear and the (right) end of the alignment of the tab. I see no way to control the order of tabs in Firefox. Is there a way to accomplish what I want?

    Type of topic: config in the URL bar and press ENTER.

    Answer Yes.

    Filter = browser.tabs.insertRelatedAfterCurrent

    Double-click this preference to activate it false.

    Then restart Firefox.

  • When I sync the audio from my player is not in the order in which I added it to the library

    Windows media player

    I have a Coby mp3 player and when I sync the audio from my player is not in the order in which I added it to the library. I'm doing something wrong? How can I get the audio files to read them in the order? When I ripped the cd they show in a random order on the media player screen.

    Hi LynneGoetz,

    ·         What version of the operating system is installed on the computer?

    ·         Did you do changes on the computer before the show?

    Follow these methods.

    Method 1: Run the hardware and devices troubleshooter.

    Open the troubleshooting Windows Media Player settings Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Open the troubleshooter in the Windows Media Player library

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-library-Troubleshooter

    Method 2: Follow the steps in the article.

    Set up a device to sync in Windows Media Player

    http://Windows.Microsoft.com/en-us/Windows7/set-up-a-device-to-sync-in-Windows-Media-Player

    For reference:

    Windows Media Player sync: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/Windows-Media-Player-sync-frequently-asked-questions

  • change the order in which pages are printed

    How can I change the order in which the pages of a document to print? I want to print last page first.

    Please read this post then provide some details.  What printer model? What operating system? What program are you printing from?

    There are generally two places that the order of the pages can be defined, but it will depend on the printer model, the operating system and the program.  The first would be in the print driver options.  Click the Advanced tab and search for "order of the pages.  The other option would be some applications allow the selection of the order of the pages in option.  For example, in Word 2010, it is in the file, Options, advanced, print, print pages in the order opposite.

  • I want to get multiple clips horizontally through the frame, how can I control the speed at which the move?

    I want to get multiple clips horizontally through the frame, how can I control the speed at which the move?

    And the second

  • How to control the order of showDetailItems in panelTabbed programmatically

    Hello
    Is it possible to control the order of the showDetailItems in panelTabbed by programming? I want to can I mix the showDetailItems.

    Thank you
    Romaric

    I have not tried this, taking a few clues of this blog-
    http://www.javaoracleblog.com/Java/Dynamic_Tab_Implementation_in_ADF.JSF
    Probably putting the index of children panelTabs could help.

  • Control the order of (date of entry-boxes)?

    I have several < cfinput > controls placed vertically (using an HTML table).  They are 'date' with the beautiful calendar drop-down fields.

    Problem is... when the calendar comes down, it goes down behind the calendar under control.  This obscures the bar the name of the month and almost prevents access to the buttons previous/next month.

    So I was wondering: is it easily and conveniently possible to control the order of the drop down calendar, so that it appears in front of all?

    (P.S.  As usual, "it works fine in FireFox and breaks in IE."  No surprise there...)

    This work around should solve the problem (even though its boring that we have need of a workaround for this):



     
     
     
     
     
     
     
     
     
     
     

    Date 1
     

        
     

     
    Date 2
     

       
     

     
    Date 3
     

       
     

     

  • What controls the order of the types in the list of paette type

    TS2012

    I have a bunch of custom in my file of sequence types, and when I go to the range of types and look at the types associated with my file in sequence, they are in the 'disorder' which is not very useful for me - I would have preferred that they are in a specific order which groups them according to the category of tasks they do.   Basically, I want to be able to manaully specify the order of the types.  Worse still, as I modify some types, their order and after the editing changes they get inserted somewhere else in the middle of the list (not very useful).

    The sequence that the user interface of the editor does not provide a way to 'Capture' a type and drag around manually update the order, or be able to sort the headers of columns for the type palette.  (Heck - which would be too convenient here).

    So... try to reverse this engineer and get there myself.

    There seems to be 2 different pieces of possible orders of the information for the types that I can find.

    (1) order that they exist in the file in sequence if I save it in XML format and begin reading from the top down.

    (2) the specific type typelistordernum

    I have a case where, if I open the pallet type in the sequence editor, I see

    TypeA

    TypeB

    TypeC

    Typed

    TypeE

    If I open the file in the sequence in the text editor, I see

    Typed (typelistordernum 49)

    TypeE (typelistordernum 50)

    TypeC (typelistordernum 51)

    TypeB (typelistordernum 52)

    TypeA (typelistordernum 29)

    The order in the movie file, or the order number of type list seems to dictate the order that they appear in the range of types of the sequence editor.

    I checked that each type in the example are ONLY used in this file a sequence - not shared in any other type of sequence pallets or files of type.

    If I write code to load the sequence file, obtain a reference to it, it cast to a propertyObjectFile and retrieve the TypeUsageList for this file, I get an ordered list that corresponds to the order of typelistordernum.  I can call the MoveType against this TypeUsageList method to reorder the items in the list type and save the file in the sequence.  The next time I open the file in the sequence, the tool retrieves the TypeUsageList for the file of the sequence in question and the order and numbers are the same that I saved the last time, but the order types as seen from the range of types of Sequence Editor is no different (my sorting tool did not help to this point of view).

    All the suggestions here about what is happening, and how can I do feel how the order types is displayed in the palette of type sequence editor, and what I can do to get my types of "sort" I like.

    (1) Yes, you can reorganize the types according to the type via drag and drop. At least since the 2012 version of TS this works reliably.

    (2) the typelistordernum defines the order types are displayed in the view of types.

    (3) you can sort the columns in the view types.

    Maybe you accidentally sorted one of the columns in the view of types and the sequence editor is forgetting that for what you see is actually the order sorted, based on one of the columns.

    I'm sure that drag - move is disabled when you have a sort column so this explains very well what you see. Check your headers to sort for this point of view and make sure that you do not have up and down arrows.

    Hope this helps,

    -Doug

  • control the order of the locations

    When I draw several waveforms, or several tracks on a XY plot, the final track is "underneath" those who preceded him.  LV 12.x, can I change the order of tracing, other that by changing the order of the elements in the table used to manufacture the plot?  (Changing the order of the table would be undesirable in my app.) I see the previous posts on this forum that the answer is 'No' for BT 6.1 and creative but cumbersome workaround solutions have been proposed.  This changed in newer versions of LV? Thank you.

    Not that I can tell.  You cannot programmatically control always easilly plots z axis.  I suspect you could do a custom user control to dig pretty deep in the graph xy basis, but there are a lot of the magic of the hood in the graphs that can be deeply within a component that is not publicly available to play with (in a DLL)

    [Edit] opening of the comic of a graph of order displays a blank BD so that magic is deeper that we can discover the type of basic control without breakage.  This is a feature to add to the exchange of ideas

  • I have a number of accounts (left), I would like to change the order in which they are displayed, THE who is first and who is the last.

    In the left column of the program is a list of all the e-mail addresses that Thunderbird checks. I want to change the order of the list of e-mail addresses. Some addresses are more important to me than others. I would like than to be at the top of the list. How can I move them in the order I want?
    Thank you

    Install this add-on.
    https://addons.Mozilla.org/en-us/Thunderbird/addon/manually-sort-folders/

  • How can I lock the order in which my links appear in the bookmarks bar?

    I have 10 bookmarks on my bookmarks bar. After you have moved so that they are in the order I want them, I close firefox. When I reopen it firefox, bookmarks have been moved and are not in the order that I placed the.

    Is it possible to lock their position on the bookmarks bar?

    Bookmarks should remain where they are placed.
    New entries should be at the end of the current.

    Maintenance of the premises {web link}
    Allows to run Maintenance tasks on the database that drives
    Bookmarks and history module places behind Firefox.

    Open the Add-ons Manager. Locate the add-on, then press the Options button.
    Select all tests. On the bottom, then press Execute .

Maybe you are looking for