Update button label when locale changes, in AS3

What I'm trying to do is pretty do what this does:
<s:Button label="{resourceManager.getString('Strings', 'some_resource')}"/>
but in ActionScript code. I have a function to add a new tab button to a layout which takes a string and just trying to set the label to the same string doesn't work obviously. So what I need is a way to set the button label to some bindable value that will update whenever the locale changes, like it does automatically when doing it in MXML.

Nevermind, I figured it out. For those of you that are curious about the solution I found it's in the code below. The only way I could figure out how to get it working is by declaring a local function right after creating a button and attaching it as a "change" event handler to the resourceManager.
public function addTab(resourceName:String):uint
     var newTab:Button = new Button();
     newTab.label = resourceManager.getString('Strings', resourceName);
     newTab.setStyle("skinClass", Skins.Buttons.TabButton);
     // Create a local function that will update the button label whenever the locale changes
     var localeChangeHandler:Function =
          function (e:Event):void
               newTab.label = resourceManager.getString('Strings', resourceName);
     resourceManager.addEventListener("change", localeChangeHandler);

Similar Messages

  • How to updating plugin.xml when it changed in 12C?

    After Importing the Plug-in Archive and Deploying it on Management Service with 12C, I need to make a change with plugin.xml in Plug-in Archive. Here it's the change,
    --- Old one:
    <PluginAttributes Type="MP" ReleaseStatus="Test"/>
    --- Change to:
    <PluginAttributes Type="MP" DisplayName="MySQL Database" Category="Databases"/>
    So I un-deployed Plug-in from Management Serbice, and used command "emcli import_update" to update the brand new OPAR file successfully, and the deployed again. But it seems the new plugin.xml didn't work at all, neither from UI nor the plugin.xml located under Management Server folder. I am sure it should work cause after I changed the Target Type and etc. in all related files to made a new plug-in, it works well.
    So how to updating plugin.xml when it changed in 12C? (It seems there is no option with MRS.)
    Thanks in advance!
    Best wishes,
    Satine

    Hey Caroy,
    Thank you for your help.
    It seems there is no entrance within page "Setup->Extensibility->Self Update" to delete a plugin. Would you please tell me more specific position?
    I will upgrade the version of plugin and try again to see if it works.
    Thanks,
    Satine

  • Incorrect date when locale changes

    Hi,
    Can somebody help me with this.
    The following formula is used to get the month out of a date input by a                                                            
    user at the prompt.                                                                               
    =Month(ToDate(UserResponse("Start Date");"MM/dd/yyyy HH:mm:ss a"))                                                                               
    when the user locale is US and input value is 06/01/2009 00:00:00 AM                                                               
    gives "June" as the output which is correct. However, when the user                                                                
    locale changes to UK the same date 01/06/2009 00:00:00 with the below                                                              
    mentioned formula gives "January" which is incorrect.                                                                               
    =Month(ToDate(UserResponse("Start Date");"MM/dd/yyyy HH:mm:ss"))
    Thanks,
    Florencio.

    Hi,
    Based on Operating System the date format changes. So try to create a package with required date format and install in our System for consistency or based on the date standards followed in the country we can change it report as select the required date column -> properties -> select date and define the required date format.
    Thanks & Regards,
    Suresh

  • Update inspection lot when MIC changes

    Hello Gurus,
    Is there a way to update existing inspection lot when master characterstic changes?
    Any help would be really appreciated!
    Regards,
    Owais

    Hi
    You can change the Existing Inspection plans by doing setting at Cleint level as Replace MIC
    When you cahnge MIC it will give popup of where used.You can change the task lists.
    But this changes will not automatically reflect in an inspection lot.
    for this you have to
    Go to Qa02
    Enter Inspection lot
    Click on reset
    save
    check status of lot CRTD in QA32
    now go to QA02
    enter
    click on Inspection Specification
    selct sample
    save
    check status in QA32 as REL
    Regards
    Sujit

  • Delta update not working when i change material master data

    Hi SAP Guru's
    can any body help me in solving my issue.
    My issue is i created a data source with a function module to create delta in change date field LAEDA.
    .Full upload is working fine based on the selection screen but delta update is not working properly .
    it is working as full load run for every first run of the day.
    Please can any body help me in this.
    What i did in ECC.
    I copied the FM 'RSAX_BIW_GET_DATA_SIMPLE to Z function module.
    Done a select on three tables and passed the data into e_t_data
    In Rso2 i attached LAEDA filed after clicking generic delta field.
    after completing the steps in ECC
    Any help will be apperitiated .
    Thanks in advance

    Did you actually change the sold-to party though or just the payer?  The sold-to party's price list type controls the price list type value copied into the order header.  Even if the payer has a different value, it's not copied to the order header.  You can see this behavior in FV45KFKD_VBKD_FUELLEN.  If you switch sold-to's then you should get a pop-up that new pricing was carried out; you should also see your new price list type value in the order header and you can use the 'analysis' function at the item level to verify that the correct price was used.

  • Photoshop CC: Save For Web function does not update filesize previews when I change filetypes

    I recently tried to save some web banners and wanted to optimize for smallest filesize with best looking output, and as I changed filetypes from Gif to Jpeg to PNG, the preview at the bottom of the window that usually updates with estimated filesize was not changing and the preview image would not change as well. The issue made it impossible to predict the output and required that I actually save in all the variations, then reopen them to see the end result.
    My software is up to date.
    Not really sure what it can be.
    Please help.
    Casey

    Same issue. Hoping someone responds to this thread soon

  • How to update enum labels when enum is inside an array of clusters?

    Hello LabVIEW gurus,
    I'm stuck with a design aspect, and was wondering if you could share some ideas as to how to get past it: I would like to fill a table with strings, and then populate an enum inside an array with the string values. 
    For purposes of discussion I'll break the steps into two actions, where one takes place before the second (sequential, not in parallel)
    Action one - The user will be first asked to populate a table with "strings". The table would look like,
    row0 - "string0"
    row1 - "string1"
    row2 - "string2"
    and so on....
    Action two - When ever the user "selects action two" I would like to populate an ENUM inside a cluster with values from "Action one". In other words, I'm trying to dynamically write enum values.
    The cluster has several objects such as boolean controls, string controls, AND AN ENUM control (see attached .png)
    I have tried using Ring, and enums at this point, and have not been successful at it. I read somewhere that because the enum/ring is inside a cluster, and the cluster inside an array, that what I'm trying to do is simply not possible. If that's the case, can you please throw ideas my ideas my way? :-)
    In advance, thank you very much.
    Cheers,
     

    Is this in the full development environment?  Is the cluster (that I assume is a type def) reserved for running at the time?  Because what you described is totally do able IF you are not in an EXE, and this is intended for making an enum to be used elsewhere.  Otherwise this won't work the way you want.  An enum must have it's type defined at run time.  Through scripting you can make the cluster or the enum, or edit ones that already exists (or use one as a template) but as soon as you are in an EXE you have no scripting, and even if you did your code can't compile, so you can't use the new controls even if you could make them.
    But if you are looking for a way for a user to enter strings into a table, and then update a drop down with those options that is possible using the combo box which keeps track of the string selected, or a ring control which keeps track of the index (or value) associated with the selected item.
    You gave lots of information, but not the important bits like how this will be used.

  • Why is the label color not changing when my file is updated?

    I would like the label color to change to white when a file has been updated/changed. Since upgrading to 10.7.2 the file color stays the same. Is there a setting I am missing that will allow the file to go back to white when updated?
    Thanks for any input...

    As far as I know, this is not standard functionality in the Mac OS.  Granted this, some third party application, or a script of something, was making this happen for you. Somehow the system update broke it. If you can figure out what software was giving you this feature, maybe you can update it or re-install it.
    charlie

  • Sed an iPad from someone and I want to go into App Store to update apps, but when I click on the update button, the previous owners' apple Id username appears and it won't take my apple id password. How do I replace their username w/ mine?

    I purchased an ipad from someone and i set up my apple id for it but when i go to the app Store to update apps, i click on the update button for an app, the previous owners' apple Id username appears and it won't take my apple id password. How do I replace their username w/ mine? It doesn't give me an option... Help! Please!

    Cc2528 wrote:
    The iTunes Store on my iPad is set up with all my music already. And at the very bottom it shows my apple Id username. The only place it shows the previous owners id is in the App Store...
    You can probably change the ID in the "iTunes and App stores" settings on the iPad....click on the wrong account ID , select sign out, then log in with your own ID, I have not done this but I think it works.....
    but I would be more inclined to to the factory reset and start afresh.

  • DAX error "Formula is invalid" when updating underlying data, but not changing the formula?

    Hello,
    first of all: I use the 64-bit versions of Excel 2010 and PowerPivot on Windows Server 2008 R2.
    I use this formula to calculate the median of my data:
    MINX( FILTER( VALUES( TableName[ColumnName] ),
                  CALCULATE( COUNTROWS( TableName ),
                             TableName[ColumnName] <= EARLIER( TableName[ColumnName]
                  > COUNTROWS( TableName ) * 0.5 ),
          TableName[ColumnName] )
    The data comes from a view on an MS SQL Server and has about 3.5 million rows. With one dataset ("dataset 1"), everything is working out fine and VERY fast ;-). When I change the view on the SQL server to filter for different data ("dataset 2", the result
    set still containing about 3.5 million rows) and update the PowerPivot data and then the pivot table, the status bar reads "Executing OLAP query..." and excel.exe utilizes one CPU core at 100% for a long time and its memory usage increases significantly, but
    nothing happens. If I interrupt that process by pressing Esc, I get the following error (original German text included):
    ============================
    Fehlermeldung: (Error message:)
    ============================
    Ausnahme von HRESULT: 0x800A03EC (Exception from HRESULT: ...)
    Das Median-Feld konnte der PivotTable nicht hinzugefügt werden, weil die Formel ungültig ist. (Could not add the field "Median" to the PivotTable because the formula is invalid.)
    ============================
    Aufrufliste: (Stack trace:)
    ============================
    Server stack trace:
    Exception rethrown at [0]:
       bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       bei Microsoft.Office.Interop.Excel.PivotTable.AddDataField(Object Field, Object Caption, Object Function)
       bei Microsoft.AnalysisServices.Modeler.FieldList.ExcelInterOpUtil.AddToDataFields(ICalculatedMember calculatedMember, Int32 positionIndex, Boolean isSpecialColumnBasedNamedSetPresent)
       bei Microsoft.AnalysisServices.Modeler.FieldList.ExcelInterOpUtil.AddToDataFields(ICalculatedMember calculatedMember, Int32 positionIndex, Boolean isSpecialColumnBasedNamedSetPresent)
       bei Microsoft.AnalysisServices.Modeler.FieldList.GeminiPivot.SetFieldOrientation(FieldLocation location, IGeminiColumn column, Int32 positionIndex)
       bei Microsoft.AnalysisServices.Modeler.FieldList.GeminiPivot.SetFieldOrientation(FieldLocation location, IGeminiColumn column, Int32 positionIndex)
       bei Microsoft.AnalysisServices.Modeler.FieldList.GeminiPivot.AddField(IGeminiColumn column, Int32 index)
       bei Microsoft.AnalysisServices.Modeler.FieldList.FieldListControl.fieldsTreeView_AfterCheck(Object sender, TreeViewEventArgs e)
    ============================
    I have analyzed the two datasets for differences and found the following ones:
    Dataset 2 has also negative values in its ColumnName column, dataset 1 does not. Filtering dataset 2 (by changing the view on the SQL server) so that the column contains only positive values does not help.
    A displayed column contains text with square brackets in it in dataset 2. Changing the SQL view to replace them with an empty string (replace(column2, '[', '')) does not help.
    I do not know what else to try. Can anybody help me? The two datasets are very large, but if anyone can give a recommendation how to export them in a reasonable size, I can make them available.
    Best regards
    Michael

    Hello Javier,
    I use a new measure (button "New Measure" in the toolbar or option in the context menu of the table). Here are the data samples:
    Dataset 1:
    Probability    RThreshold    SThreshold    vector    value
    0    -1    -1    DHTTestApp: Total GET Success Ratio    0.98
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    0    -1    -1    DHTTestApp: Total GET Success Ratio    0.98
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    0    -1    -1    DHTTestApp: Total GET Success Ratio    1
    Dataset 2:
    Probability    RThreshold    SThreshold    vector    value
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.011353711790393
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.20522161505768
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.12309191295875
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.26926457661881
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.1911946574326
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.066699727250186
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.32597014925373
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.11977454203852
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.24751410911045
    0    -1    -1    [MKTBR] BaseOverlay: All nodes: Own routing trust value    0.076218041485769
    In both datasets, probability has a range from 0 to 1, both thresholds from -1 to 1. In dataset 1, value has a range from 0 to 1, in dataset 2, it's -1 to 1.
    Thanks for your help!

  • [Solvd]XFCE mixer panel plugin doesn't get updated when volume changed

    XFCE audio mixer panel plugin used to show the correct volume when I change the volume either with my Laptop touchbuttons or keyboard volume buttons.
    1.  To make sure if I am actually changing the volume, I opened alsamixer and tested pressing keys they work fine.
    2.  I even opened properties option from the indicator and set it to "Master"(the one I use) of my speaker, still no luck.
    3. The only problem is the indicator doesnt update when the volume is changed or muted.
    But for unknow reason this problem started last week.
    Thanks for the help.
    Last edited by vikyboss (2013-06-23 16:27:36)

    vikyboss wrote:
    Actually the problem seems to be resolved. I have a fully updated system and installed xfce again few days ago. And it works miraculously..
    Installed versions:
    1. xfce4-mixer 4.10.0
    2. Advanced Linux Sound Architecture Driver Version k3.9.3-1-ARCH
    ravicious wrote:Oh, I actually fixed this myself yesterday. I installed pulseaudio, pulseaudio-alsa and xfce4-volumed-pulse (from AUR) and then removed volume shortcuts from xfce4-keyboard-settings. In xfce4-mixer, you just have to choose a proper playback as a sound card.
    Wow, actually it now works for me, too! Amazing!

  • [Bug?] Defer Panel Update not working when changing scale property

    Hi,
    I found that Defer Panel Update [when True] does not work properly when changing the scale fit property of an intensity graph.
    Try the VI.
    When Defer Panel Update is True, and you change the Numeric controls, the Intensity graph is not updated (as expected).
    But now change the "Z Scale.Scale Fit" button and.... the Intensity graph is updated (only the Z-color, not the axis).
    This looks to be a bug to me!
    Nicolas
    Attachments:
    [Bug] Defer Panel Update not working when changing scale property.vi ‏27 KB

    Hi Nicolas,
    This indeed looks like a bug. I will do more research on it and file a bug report if it's not already filed.  Thank you for posting this information!
    Yi Y.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Change dynamic button label

    Hi,
    In apex 3.0 can I have a button which changes dynamic? e.g. if an item is null then the button label to be 'tes' else button label 'ok'?
    Thank you

    Hi,
    Maybe easiest way is create 2 buttons and set condition for those.
    Use condition when item in expression 1 value is / value is not in expression 2
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Et_validate doesn't fire if user changes value and presses update button

    I am maintaining a flag for "dirty" records in a potentially large number of rows in a matrix. To set this flag I check for the et_Validate event and ItemChanged = true. This works fine if the user changes a value and then presses tab to leave the field.
    My problem is that et_Validate does not fire if the user changes a field's value and then presses the update button.
    It's like the screenpainter where if you change a field's value and then select a different field before pressing tab your change isn't saved.
    I suppose I could always send a tab keypress or automatically update the current row but I'm wondering how others handle this.
    I am currently using SBO2005A SP1 PL11.

    Additional info:
    If I change a matrix cell and click on the update/ok button then the ItemEvent.row = -1 and the active item is still the matrix. If I force a "click" in a field on the first row then the et_validate fires otherwise it does not.
    Does anyone have any other ideas on forcing et_Validate to fire when the user clicks on a button?

  • HT4097 I'm having problems updating my apps, when I press updates, it's just a white screen, but when I push the featured or genius buttons, apps appear, what can I do?

    I'm having problems updating my apps, the screen just stays white....

    Read this on iLounge posted by ahMEmon
    Go into Settings > General > International > Language and choose British English, then hit the Done button. The screen will go black with a comment about Language Settings. Be Patient, especially if you have a lot of apps. Let it run it's course and Then open the App Store again. Voila! Upgrade list is back. And it stuck when i changed back to plain English. He doesn't know why. I don't either. But I am now a happy camper. Worked on my 3rd gen iPad and iPad Mini.
    Hope it works for you!

Maybe you are looking for

  • Xf86-video-intel vs hibernate

    I have recently updated by laptop with xorg7.3 (ie, xorg-server 1.4 + xf86-video-intel (instead of xf86-video-i810) + xrand 1.2).  After a long struggling period I have managed to make all these new things working reasonably well on my Dell X1 laptop

  • Slow System reset

    I have been running a system reset for over 4 hours now and it's still on 7%. What do I do? It's a hp envy core i7....kindly help

  • Executing a .bat file from java code

    Im writing a utility and i need to be able to create and execute a .bat file from my program. I can create the .bat file fine but when i try to execute it nothing happens. I tried to use the following line of code to try to execute the .bat file (cal

  • How do I compare these text files (aka spell check)

    I'm having the hardest time figuring out how to get this spell check to work. Basically, I need to open the dictionary.txt file and then another file which will be spell checked. Ignoring case sensitivity, punctuation, and word endings (such as ly, i

  • Downgrading Time Capsule firmware versions for OS X 10.6.8

    I have a first generation Time capsule and I recently installed firmware version 7.6.4. Following the update there have been various problems with my network. I presume the problems were caused because I am running OS X 10.6.8 and the particular vers