How can I put Locale.loadString("IDS_001") into button.label

I am retrieving the Locale from the system, and need to place the fields of the Array into their respective places.
One of these being for example,
IDS_001
This works, and returns what I'd probably expect. Although why it returns multiple instances I can't yet figure.
          public var vIDS_001:String;
          Locale.autoReplace = true;
                 var localeName:String = LocaleID.DEFAULT;
                 var nf:StringTools = new StringTools(localeName);
                               trace("Actual local ID: " + nf.actualLocaleIDName);
           var defLang:String = nf.actualLocaleIDName;          
                                          trace( "Last Operation Status: " + nf.lastOperationStatus ); 
           Locale.setDefaultLang(defLang);
           Locale.setLoadCallback(localeCallback);
           //Locale.addXMLPath("defLang", "../en/PinPointPremium_en.xml");
                      Locale.addXMLPath("defLang", "../" + defLang + "/PinPointPremium_" + defLang + ".xml");
           function localeCallback(success:Boolean) {
            if (success) {
                // trace(Locale.stringIDArray); // IDS_GREETING
                 trace(Locale.loadString("IDS_001"));
                 var vIDS_001 = (Locale.loadString("IDS_001"));
                 trace("+++" + vIDS_001);
            } else {
                 trace("unable to load XML");
Actual local ID: en-GB
Last Operation Status: noError
PinPoint the Entered Address
+++PinPoint the Entered Address
PinPoint the Entered Address
+++PinPoint the Entered Address
Test Movie terminated.
This is the button code, and I'm trying to figure out how to get that IDS_001 information into the btnGPS.label. No matter what I try, it errors out
             btnGPS = new Button();
          btnGPS.width = stage.stageWidth - 20;
          btnGPS.height = 25;
          btnGPS.x = 10;
          btnGPS.alpha = 0.9;
                // btnGPS.label = "PinPoint My Current Location";
          btnGPS.setStyle("textFormat", btnFormat);
          btnGPS.y = stage.stageHeight - 46;
          btnGPS.addEventListener(MouseEvent.CLICK, btnGPSMouseClickHandler);
          addChild(btnGPS);
None of these following work in place of the original
                //btnGPS.label = Locale.loadString("IDS_001");
          //btnGPS.label = IDS_001;
                //btnGPS.label = vIDS_001;
Theoretically, loading the Locale XML file should populate the occurences of IDS_001 - but I'm totally lost now. Been looking at this for a few days and now can't see the real picture. Does anyone have any idea how I solve this please ... I know this is so simple, but I can't get it.
thanks

ok, I need to get back on track.
The app works and is fine. No problem with buttons etc. It's localization.
.... and this works - finally
private static var loc:String = null;
private static var my_txt:String = null;
// Checking for LocaleID for globalization.
// Localization stuff. AS3 2013. (using latest CS6 Flash Pro, AIR and Flex SDK libraries)
// This example is based on the iPhone/iPad, iOS Template in CS6
                              // get the system language. That's al lwe need. What language is the user using
                              loc = Capabilities.language;
                              // if it's en-GB for example, make en_GB
                              // loc = loc.replace("-","_");
                              trace("The default system: " + loc);
                              loc = "de";
                              trace("The new system: " + loc);
                              // you can add individual paths for each language like this
                              Locale.addXMLPath("en", "en/PinPointPremium_en.xml");
                              Locale.addXMLPath("de", "de/PinPointPremium_de.xml");
                              // or set your language to the system default and use that
               // I put the system language into 'loc'
                              Locale.addXMLPath(loc, loc + "/PinPointPremium_" + loc + ".xml");
                              Locale.setLoadCallback(localeCallback);
                              Locale.loadLanguageXML(loc);
                                        function localeCallback(success:Boolean) {
                                                  if(success){
                                                            //var my_txt:String = Locale.loadString("IDS_001");
                                                            my_txt = Locale.loadString("IDS_001");
                                                            trace("The IDS_001 field is: " + my_txt);
                                                            // returns "PinPoint der eingegebenen Adresse" which is ok
                                                            } else {
                                trace("unable to load XML");
/* Output
The default system: en-GB
The new system: de
The IDS_001 field is: PinPoint der eingegebenen Adresse
Part 2 is the Button. AND is is this that is tricking me.
I repeat - how do I put the contents of IDS_001 into btnGPS.local with
IF I can put 'loc' into the label, with
btnGPS.label = loc;
why can't I do this
btnGPS.label = Locale.loadString("IDS_001");
btnGPS = new Button();
btnGPS.width = stage.stageWidth - 20;
btnGPS.height = 25;
btnGPS.x = 10;
btnGPS.alpha = 0.9;
//btnGPS.label = "PinPoint My Current Location";
// ==============================================
// This actually works - it places "de" into the button. as it should
  btnGPS.label = loc;
// this doesn't put the contents into the label
//btnGPS.label = Locale.loadString("IDS_001");
btnGPS.setStyle("textFormat", btnFormat);
btnGPS.y = stage.stageHeight - 46;
btnGPS.addEventListener(MouseEvent.CLICK, btnGPSMouseClickHandler);
addChild(btnGPS);

Similar Messages

  • How can i read local excel file into internal table in webdynpro for abap a

    Could someone tell me how How can i read local excel file into an internal table in webdynpro for abap application.
    thank u for your reply

    Deep,
    File manuplations...............................
    1. At the presentation level:
    ->GUI_UPLOAD
    ->GUI_DOWNLOAD
    ->CL_GUI_FRONTEND
    2. At the application server level:
    ->OPEN DATASET : open a file in the application server for reading or writing.
    ->READ DATASET : used to read from a file on the application server that has been opened for reading
    -> TRANSFER DATASET : writing data to a file.
    -> CLOSE DATASET : closes the file
    -> DELETE DATASET : delete file
    If file is on the local PC,use the function module GUI_UPLOAD to upload it into an internal table by passing the given parameters......
    call function 'GUI_UPLOAD'
    exporting
    filename = p_file
    filetype = 'ASC'
    has_field_separator = '#'
    tables
    data_tab = t_data
    p_file : excel file path.
    t_data : internal table
    <b>reward points if useful.</b>
    regards,
    Vinod Samuel.

  • How Can I put A quicktime clip into keynote??

    Two Questions,
    One:
    How Can I put a "get a mac" commercial into keynote. (Like how do i download it and how do i put it in)
    Two:
    If I download a quick time clip (say, pirates of the Caribbean 2 commercial) How can I insert it into keynote??
    Zach

    You can put a QuickTime clip on a Keynote slide just by dragging the movie file onto the slide. If the clip is in your Movies folder in your home directory, you can also use the Media browser to insert it. Finally, you can use the Insert menu, and use the Choose... item to pick the file.
    To grab one of the "Get a Mac" ads, go to the ad page. Hover your cursor over the thumbnail of the ad, hold down the Control key, and click and hold the mouse button to pop up the contextual menu. Choose "Download Linked File", and the file should be saved to your hard drive.

  • How can I put my mp3 files into my iTunes library? Every time I download a song from a website and try to drag it to my library, it won't add on. How can I fix this?

    Back then when I had the older update with iTunes i never had this problem with trying to put my mp3 files of music into my iTunes library. Now it doesn't want to be put into the library. Once I try to drag the music file to the iTunes library nothing happens, it just keeps showing a cancellation sign with my mouse. So how can I fix this?

    Hi William.
    The problem is probably that the index is corrupt and you need to completely re-create it rather than rebuilding individual mailboxes. I have no idea what the situation really is now after having tinkered with the contents of ~/Library/Mail/, though, so the following procedure may or may not work.
    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    After having fixed all filesystem issues, if any, and making sure that there’s enough space available on the startup disk (a few GB, plus the space needed to make a backup copy of the Mail folder), try this:
    1. Quit Mail if it’s running.
    2. In the Finder, go to ~/Library/Mail/. Make a backup copy of this folder, just in case something goes wrong -- e.g. by dragging it to the Desktop while holding the Option (Alt) key down.
    3. Locate Envelope Index and move it to the Trash. If you see an Envelope Index-journal file there, delete it as well.
    4. Open Mail. It will tell you that your mail needs to be “imported”. Click Continue and Mail will proceed to re-create Envelope Index -- Mail says it’s “importing”, but it just re-creates the index if the mailboxes are already in Mail 2.x format.
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder, i.e. ~/Library is the Library folder within the user’s home folder.

  • How can I put Lightroom 4 video into a format for viewing on DVDs?

    I have made as slideshow in Lightroom 4. It translates well into MP4. This MP4 file runs on some computers and all BluRay players I've tested.
    I want this slideshow to play on all DVD playeres. How can I take the MP4 file... and make it into an AVI or other file format? Is there a better file format than AVI?
    How should I proceed? Thanks.

    I don't do a lot of video. But when I do I use Adobe Premiere Elements. Since I don't do a lot of video, I don't have the most current version. But it is a pretty good program. You can use AVI or mp4 and I think some other file formats. You can trim your video and add special effects and transitions as needed. There are other video editing programs as well. I started with a program called Pinnacle Studio. I prefer PE, however. I'm sure there are numerous other video editing software programs available. Just do a Google search.

  • HT2518 After using Migrate Assistant, I made several accounts for every attempt to migrate files from PC to Mac. How can I put all accounts together into one? How can I transfer the files from the other accounts to my primary account?

    Okay, so I did the entire Migrate Assistant process to transfer all my files and what not to my MacBook. Problem is that I did it on seperate occasions and now I have several accounts.
    How can I transfer my files from the other accounts to my primary account and delete the other accounts?

    Problem is that I did it on seperate occasions and now I have several accounts.
    If you had read carefully, Migration Assistant asks what you want to do in this event. That would have precluded the redundancy.
    Part of the fundamental design of OS X is to separate user accounts so that one user can't interfere with another. It's not possible to directly merge an account with another, but you can copy whatever you need to the Shared folder - it is in your Users folder.
    Log in to one account, prefereably a smaller one, and drag the files and folders into Shared. Log out, log into the account you want to be "primary" and drag the files from Shared into their appropriate locations. When you have copied everything you need delete the redundant account.
    Do this for each of them.
    Or, you can just run Migration Assistant again and follow the prompts that address the situation you described. It involves creating a secondary, temporary account from which you can administer the transfer. When it is complete you delete the temporary account(s).

  • How can I put ID3-Tag info into my MIDI songs

    http://www.mp3machine.com/software/IDTunes/ says: "idTunes fixes those missing or wrong ID3 tags automatically, once and for all. Systematize, organize, remove duplicates and correct irregularites in your music collection, even add lyrics. Once and for all clean up your MP3 song collection without having to spend weeks typing and checking the info." but that's OS X and my computers can't run it
    In Quicktime Player Pro when I get-properties then create annotations they only show up in QuickTime player - I need a method to embed them in the file so that in WindowsMediaSlayer the author, URL, title, length, recorded date, artists on track and such can be displayed.
    Is there a version of QuicktimePlayerPro (for OS 9) that will let me export or save-as MIDI file so that WMP will 1) read the file and 2) recognize the annotations as ID3-Tags?
    SOMEONE has to look out for the recognition of music creators and talented performers!
    Thank you very much for this forum to ask my questions, and thank you dearly in advance for your answers.
    Sincerely,
    Teo

    Teo4...
    OK, I have a big heart...
    Yep! And me too, which is why I'm sharing this 1/2 solution!
    "Artly There" has forums, real Applish looking! Well, in a topic there:
    http://www.artlythere.com/cgi-bin/forum/Blah.pl?m-1154280348/s-0/#num3
    I got this lead:
    From: http://www.harmony-central.com/Software/Mac/midi.html
    I got MIDI Kit 2.7.1, I think it has put these tags in correctly:
    1. Full Song Name
    2. Copyright
    3. Author
    To see if it worked: http://givnology.com/eve/forums/a/ga/ul/8341026442/WhatYouSynco.mid
    This is also all in my site's discussions here: http://givnology.com/eve/forums/a/tpc/f/80560593/m/7641057422 well the easy way is:
    http://Givnology.com/music and click the "First try MIDI" topic. I wanted to let you know that I did find at least THIS MUCH of a solution...
    In the © tag I put some good relational database type cross indexables.... yay!

  • How can I put a numeric indicator into a case structure using VI scripting

    I'm using VI scripting and I'm trying to add a numeric indicator inside a case structure.  I'm able to add the case structure and the numeric indicator just fine, but as soon as I specify the case structure as the "owner" of the numeric (as opposed to the block diagram being the owner) I get error 1060.  Is there any way around this?
    Note:  The reason I am doing this is because this specific pattern (indicator in a case structure) will prevent a VI from being inlined when it is being built.  This pattern will provide no functionality in itself, it only prevents the inlining.  It is added to a larger VI which is use to initialize objects in a simulation, and there are many of them in the total simulation.  If they are inlined, it takes a VERY long time to generate the C code, and performance on this VI isn't an issue since it is performed only once at the beginning of the simulation.  The rest of the VIs do need to be inlined for performance reasons.  Therefore, I'm open to other options to prevent a VIs from being inlined if the "indicator in a case structure" cannot be performed via scripting.
    If any of this is unclear please let me know and I can clarify.  Thanks.
    Solved!
    Go to Solution.

    I now understand what you were saying about inlining a subvi.  I did as you said and made a subvi with a case structure and an indicator within it.  I use the New VI Object node to add that subvi to the slow-inlining parent VI.  Then I tried to inline it using the invoke node, but I got error 1399, which make sense.  Is this what you meant for me to do, or did I misunderstand?
    Also, I tried the ControlTerminal reference approach you mentioned earlier.  Unfortunately when I called the move method on the control terminal property and had the 0th frame of the case structure as the owner I got error 1060 again.
    I really appreciate your help.  Do you have any other thoughts?

  • How can I put a background image into the cell of a table using Dreamweaver CC.

    I want to place an image in a table cell and then be able to place editable HTML in the same cell on top of image. I also have Dreamweaver CS6. I can't get either one to do it using solution I found searching on web. Please help ASAP. What am I doing wrong. Example code would be great. Thanks!

    No tables required for any of this.  You simply need a 3-column starter page. 
    In DW, go to File > New > Blank page > HTML. 
    Select a 3-column layout from the 3rd panel.
    Hit Create button.
    Learn to use CSS floats, margins and padding to align elements.  DO NOT use positioning.
    Start with & bookmark these links for future reference:
    CSS Box Model
    http://css-tricks.com/all-about-floats/
    CSS Float
    Floatutorial: Step by step CSS float tutorial
    CSS Margin
    CSS Padding
    Nancy O.

  • How can I put text in Tab into vertical alignment??

    Dear friends, I have following code,
    package com.swing.test;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    import javax.swing.SwingConstants;
    public class NewTabbedPane {
         private JFrame frame;
          * Launch the application
          * @param args
         public static void main(String args[]) {
              try {
                   NewTabbedPane window = new NewTabbedPane();
                   window.frame.setVisible(true);
              } catch (Exception e) {
                   e.printStackTrace();
          * Create the application
         public NewTabbedPane() {
              initialize();
          * Initialize the contents of the frame
         private void initialize() {
              frame = new JFrame();
              frame.setBounds(100, 100, 500, 375);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              final JPanel panel = new JPanel();
              panel.setLayout(new BorderLayout());
              frame.getContentPane().add(panel, BorderLayout.CENTER);
              final JTabbedPane tabbedPane = new JTabbedPane();
              tabbedPane.setTabPlacement(SwingConstants.LEFT);
              panel.add(tabbedPane, BorderLayout.CENTER);
              final JTabbedPane tabbedPane_1 = new JTabbedPane();
              tabbedPane.addTab("AAAAA", null, tabbedPane_1, null);
              final JTabbedPane tabbedPane_2 = new JTabbedPane();
              tabbedPane.addTab("BBBBB", null, tabbedPane_2, null);
              final JTabbedPane tabbedPane_3 = new JTabbedPane();
              tabbedPane.addTab("CCCCC", null, tabbedPane_3, null);
    }but here all tabs' title AAAAA, BBBBB, CCCC are aligned horizontally, I need them to align vertically, Any guru can help??
    Thanks
    sunny

    there's an example here (works OK on winxp)
    http://www.macdevcenter.com/pub/a/mac/2002/03/22/vertical_text.html
    Test() class needs a small change, for the direction you want
    //panel.add(makeTabpane(null, sEnglish, VTextIcon.ROTATE_DEFAULT));
    panel.add(makeTabpane(null, sEnglish, VTextIcon.ROTATE_LEFT));

  • How can I put the "open new tab" button back to the right of the right most tab in FF 4?

    It's very annoying to have to go up to the corner to click on the open new tab button when it used to be to the right of the right most tab. I have other buttons, like print up there and have to think about which one to click. What was wrong with where it was? It worked for me. At least tell me how, or allow me to change it back. It is one thing to make a product faster but allow the users to keep things in familiar places if they want. I've liked that option on Firefox with most things. I've been a Minefield then Shiretoko user for a number of years an I think I will stick with it for the foreseeable future.

    Thanks. I don't know why it wouldn't just go back there when I tried putting it back? I didn't change anything, so I assumed the new "default" was over on the left. Glad it was a simple solution after all.

  • How can I put my icloud photos to camera roll or photo stream?

    I got a nee iphone, i backed up everything and restored it into mu new iphone, but the pictures didn't restore so i did it manually but now on my phone i got different albums icloud photo stream and camera roll. How can i put the icloud picture into camera roll or photo stream. Any ideas?? On my old iphone ive deleted everything.

    Hello Ozzie94,
    Thanks for the additional information. The camera roll is designed for photos taken on your device, or saved images from Mail and other applications. Photos synced from a computer are organized into their own album(s):
    View photos and videos - iPhone
    http://help.apple.com/iphone/7/#/iph3d267610
    - Camera Roll—photos and videos you took on iPhone, or saved from an email, text message, webpage, or screenshot
    - Shared photos and videos—Photos and videos that you’ve shared with iCloud Photo Sharing or that others have shared with you (see iCloud Photo Sharing)
    - Photos and videos synced from your computer (see Sync with iTunes)
    Additionally, you may find more information by using another one of Apple's support resources - https://getsupport.apple.com
    Thanks,
    Matt M.

  • How can I put a still photo in to a iMovie tralier  on the iPad 2

    How can I put a still photo into a iMovie tralier on a iPad 2

    Here's one way.
    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import.
     Cheers, Tom

  • How can we put the report which is generated by the program into spool??

    How can we put the report which is generated by the program into spool??
    I had generated a file in Unix which had the report but now the requirement has changed.
    Regards,
    Shashank.

    Hi Shashank,
    If the program is executed in the background and it has the write statement then the spool will automatically generated.
    Reward points if useful.
    Regards,
    Atish

  • How can I put the report generated by a program into a File?

    Hi all,
       How can I put the report generated by a program into a File?It can be in TXT format or excel format which ever is possible.
    I need to export this file to memory,How can I do that??
    Regards,
    Shashank.

    Hello Shashank,
    Please ignore my previous answer... Ofcourse it works...
    There are several ways to do this...
    two of them are
    1. List -> Save -> File and press enter..
        it will ask for the format, then path where to save it. Just give the path.
    2. Using function module 'GUI_DOWNLOAD'.
    I'm giving the example bellow which explains the usage of both GUI_UPLOAD and GUI_DOWNLOAD.
    To do this... you need to have folder with name 'TEST' and a .txt file in it with name 'test'. And contents of it are :
    TEST1             ,BOT 
    TEST2             ,BOT 
    TEST3             ,BUT 
    with spaces.
    REPORT zssr_bdc .
    DATA: BEGIN OF g_t_itab OCCURS 0,
            matnr LIKE mara-matnr,
            maktx LIKE makt-maktx,
          END OF g_t_itab.
    DATA: g_t_bdcdata TYPE TABLE OF bdcdata.
    DATA: path TYPE string,
          path1 type string.
    path = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test.txt'.
    path1 = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test1.txt'.
    *contents of test.txt    *
    *TEST1             ,BOT  *
    *TEST2             ,BOT  *
    *TEST3             ,BUT  *
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename = path
      TABLES
        data_tab                      = g_t_itab.
    LOOP AT g_t_itab.
      WRITE:/1(18) g_t_itab-matnr, 20(40) g_t_itab-maktx.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       filename = path1
       filetype                      = 'ASC'
      TABLES
        data_tab                      = g_t_itab.
    Now you will get one .txt file with name 'TEST1.TXT' in the TEST folder.
    <b>REWARD POINTS IF IT IS HELPFUL</b>
    Regards
    Sasidhar Reddy Matli

Maybe you are looking for

  • HT201317 how do i take my photos from my iphone & icloud and upload them to my computers hard drive?

    is it possible to put my photos on my hard drive?

  • Multilingual actions in Web dynpro

    Hi I created an application in web dynpro.In the starting project i given the default language as " American english"..... But now i want my screen to be displayed in French. Please any one help me how to proceed. Is it possible in Web dynpro  or els

  • How to deal with this problem?

    How to deal with this problem? We plan to use Oracle Coherence (In Memory Data Grid) for a large-scale application. In order to keep the database table data in Coherence caches, we will create all the corresplonding Java objects (entities) and constr

  • Cursor & large number of rows

    hello ! i have an application wich interrogates my Oracle 8i Databse using OCI, my problem is that the number of rows returned is so large ( the totality of rows is 1 million) , how can i have rows returned by packets (as the same way as results retu

  • C: drive won't start loading windows

    Building a new system - I have a KT4V mainboard in aqn Antec case with a 2000+ CPU, GeForce 4 video card and a single floppy, CD-Rom, and 40 Gbyte drive.  Very easy install, zipped thru BIOS process with no problem, system correctly recognizes the co