Simple question AS... Convert a string to a component name

This should be a fairly simple thing to do, but I don't see what to look for when looking for an answer...

I have a datagrid that when selected compares the datagrid selected with a value in a table in componentList. If the values match, I do the componentList [0]. NomComposant visible canvas. How I do at the moment, but there must be a better way.

LitVar.visible = false;
for (var i: int = 0; i < componentList.length; i ++)
{
If (reportsGrid.selectedItem.RptCnt == componentList [0].) RptCnt)
{
If (componentList [0].) NomComposant == 'LitVar') {}
LitVar.visible = true;
}
}
}


My question is how to that the component componentList [0]. NomComposant visible?

The values stored in the [n] componentList. NomComposant are names of paintings on my form. I intend adding about 15 paintings hidden on this form and I don't want to go through all these names, as does the above code. What I want to do is to convert the string to the [n] componentList. NomComposant table and make sure that visible canvas.

Or in other words, how to rewrite componentList [0]. ComponentName.visible = true; If it actually works?

Thanks in advance for the help!

Have an ordinary day...
KomputerMan ~ |  :-)

The answer to this is provided by Jeff Tapper to me, so a BIG thank you Jeff! All he needed to do is to take my thong and turn it into a component name, and then make it visible like this...

for (var cc:int = 0;< componentlist.length;="">
{
var componentName:String is componentList [cc]. NomComposant;
This [NomComposant] .visible = true;
}

I knew it was simple...

Have an ordinary day...
KomputerMan ~ |  :-)

Tags: Flex

Similar Questions

  • simple question about verification of string

    Hi guys I have a problem that I am sure most of you will know, and im probably do something stupid, I have a folder and I'm eager to check the values of some fields and so I have:

    IF Rec1.next_record = "Renault" AND Rec1.prev_record! = "Vauxhall".

    the! = part doesn't seem to work, I use another method to check if the string does not match the given text?

    Thank you.

    NVL is perfect:

    IF Nvl('Rec1.next_record,'-') = 'Renault' AND Nvl(Rec1.prev_record,'-') != 'Vauxhall' 
    

    François

  • simple question to function test of value chain

    Hey guys,.

    I m just started using teststand.

    My simple question is related to the function "test string value '. What is the difference between the "type of comparison' CASE SENSITIVE and IGNORE CASE? From my point of view are not really meaningful names.

    To avoid simple and stupid questions like that, I tried to use the internal helper function. I'm wrong when I say that the help features are not as good as in labView? I couldn t find any answer to my question... hmmm... How other people handle this situation? (outside of just trying?)

    Thanks for your help

    Hello

    Case SENSITIVE: it will fail if you compare "HELLO" with 'Hello' or 'A' with 'a '.

    IGNORE CASE: this will pass if you compare "HELLO" with 'Hello' or 'A' with 'a '.

    Hope that explains

    Jürgen

  • Converts a string (float single precision) in decimal

    Hello

    I use reading series base and write vi to communicate with a device.  The answer I receive (shown in hexadecimal format) is 4606 8D3B, which from what I understand (this discussion: http://forums.ni.com/t5/LabVIEW/string-to-number-conversion-a-very-interesting-observation/m-p/32170... ) the data is not actually hexadecimal but rather binary and appears just hex for the user.

    My camera manual says that this information is "Float - 4-byte ANSII standard simple precision, low to high" and I'm trying to convert this string to a decimal value.  (it should be 0.004 or e-3 xx 4)  So far I've written a program that separates the bytes in a table of 4 bytes, each binary converts and then separate all binary bits and try to group return the binary bits in the exponent and the mantissa to calculate the value, but it seems rather convoluted and I hope that there is a more simple function in that all this is done automatically.  Also, since the answer is low to high, I understand that I must first return the number of 3B8D 0646 make high to low, but I think I did that already, it's just the conversion that I do not know how.

    Any help would be appreciated, thanks

    Alex

    Try this:

  • Simple question Timestamp

    Why is the output of this give me 12:00?

    Select the double to_timestamp(systimestamp-1);

    I think that if is specified by default the at 12:00 timestamp values.  So, indeed the part "To_timestamp' of my channel is originally the output at 12:00?

    Also how could I get this example to show the actual hours... currently less than a full day... ?

    Thank you.

    Sorry for what may seem like a vague question, any opportunity to learn is what I'm after, and that way I don't have makes a lot of values timsestamp, it seems to be a good opportunity.

    2776946 wrote:

    Why is the output of this give me 12:00?

    Select the double to_timestamp(systimestamp-1);

    I think that if is specified by default the at 12:00 timestamp values.  So, indeed the part "To_timestamp' of my channel is originally the output at 12:00?

    Also how could I get this example to show the actual hours... currently less than a full day... ?

    Thank you.

    Sorry for what may seem like a vague question, any opportunity to learn is what I'm after, and that way I don't have makes a lot of values timsestamp, it seems to be a good opportunity.

    Why are you applying to_timestamp to something that is already a timestamp?

    TO_TIMESTAMP converts a string to a timestamp.

    You need to_char to convert a timestamp into a string with the format required when you want to display it.

    Select to_char (systimestamp-1, 'dd-mon-yyyy hh24:mi:ss') twice;

    for example (or another string format, you need).

  • Converts a string to AD: User

    Is it possible to convert a string to an AD: user, or somehow query AD for a particular user?  If I need to ask, could I choose an area to ask questions?  These could extend over 3 different areas.

    Hello, this is actually a very frequent request. Here you go:

    // Here's a quick one-liner to get a user by name.
    // Inputs: username (string), adHost (AD:AdHost) - "adHost" host param optional. If not specified, only the default AD host is searched.
    // Output: user (AD:User)
    // Option 1: quick 1-liner
    user = ActiveDirectory.searchExactMatch("User", username, 1, adHost)[0];
    
    // Option 2: If you want a bit more error handling, try this:
    /*
    var users = ActiveDirectory.searchExactMatch("User" , UserID, 1, adHost);
    for each (usr in users){
        if (UserID.length == usr.accountName.length){
            var user = usr;
            break;
        }
    }
    if(user == null){
        throw "No matching user found: " + UserID;
    }
    */
    

    This code can be placed in an action so that it is easily re-used. If placement in an action, then the last line of code should be:

    return user;
    

    I added this as a gist on GitHub as well: getADUserByName.js · GitHub

  • Converts a string to vcFolder

    Hello everyone, in our Vcenter, each user has a folder bearing his name.

    I have a simple workflow that create the new virtual machine for the model.

    for example, when the user start the workflow - I get the full name of the current user and I want the new virtual machine will be created in his file (by name).

    for example:

    get the full name of the user

    var user = Server.getCurrentLdapUser ();

    displayName - DisplayName

    try to set the virtual machine folder:

    vcFolder = displayName?

    I don't know how to convert the string to the vcFoldet object.

    The method that you use is excessive because it seeks all the VM folder on your virtual Center (and you may end up having a folder in a location that is different from what you want).

    Create an action with an input parameter parentFolder (the folder in which you will search other folders) of type vmFolder and a foldeName of string attribute (the name you're looking for).

    for each (var child in parentFolder.childEntity) {
        if ((System.getObjectType(child) == "VC:VmFolder") && folderName == child.name) return child;
    }
    return null;
    

    You can now use this action setting with your usernames & parent folder vm.

  • convert a string to a clip in as3.0

    Hi all,

    I am quite new to the 3.0 action script and before you ask I have google, but without much success. So my question is how to convert a string to a movie clip instance?

    I need to manage then this movie clip instance with the methods of the tween class.

    So, I

    var str:String = "a";

    var mc:MovieClip = new MovieClip();

    and I want to have is how the film clip mc contains the letter 'a' on the inside.

    Any suggestions are appreciated.

    import flash.text.TextField;
    import flash.display.MovieClip;
    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;
    Import fl.transitions.TweenEvent;

    var str:String = "a";

    var myText:TextField = new TextField();

    myText.text = str;

    var myMC:MovieClip = new MovieClip();
    myMC.addChild (myText);
    addChild (myMC);
    var myTween:Tween = new Tween (myMC, "x", Strong.easeOut, 40, 300, 5, true);

    OR

    import flash.text.TextField;
    import flash.display.MovieClip;
    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;
    Import fl.transitions.TweenEvent;

    var str:String = "a";

    var myText:TextField = new TextField();

    myText.text = str;

    addChild (myText);

    var myTween:Tween = new Tween (myText, "x", Strong.easeOut, 40, 300, 5, true);

    There are several ways to do so. The foregoing cannot be the best or most effective. Essentially, the text in your channel must be defined as a container of text field text property, and then the container of text field should be added to the displaylist. Then it can be interpolated.

  • A simple question please help.

    Hello

    I have 2 textfields and a button. I want to enter a number (in diameter) in the first textfield (inputField) and by clicking the button (myButton), I want to get the (circumference) result in the second textfield (inputField1). diameter * 3.14. I know it's a simple question, but it is a very simple mind. Then, have mercy on me.

    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
    import flash.text.TextFormatAlign;
    import flash.events.MouseEvent;

    var inputField:TextField = new TextField();
    var myFormat:TextFormat = new TextFormat();
    myFormat.size = 44;
    inputField.defaultTextFormat = myFormat;
    inputField.restrict = "0-9";
    inputField.maxChars = 6;
    inputField.multiline = false;
    inputField.textColor = 0 x 000000;
    inputField.border = true;
    inputField.width = 150;
    inputField.height = 50;
    inputField.x = 75;
    inputField.y = 50;
    inputField.borderColor = 0xFF0000;
    inputField.type = "input";

    addChild (inputField);


    var inputField1:TextField = new TextField();
    var myFormat1:TextFormat = new TextFormat();
    myFormat1.size = 44;
    inputField1.defaultTextFormat = myFormat;

    inputField1.maxChars = 1;
    inputField1.multiline = false;
    inputField1.textColor = 0 x 000000;
    inputField1.border = true;
    inputField1.width = 150;
    inputField1.height = 50;
    inputField1.x = 275;
    inputField1.y = 50;
    inputField1.borderColor = 0xFF0000;

    addChild (inputField1);


    myButton.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler_2);

    function fl_MouseClickHandler_2(event:MouseEvent):void
    {
    {
    trace ("mouse clicked");

    }
    }

    use:

    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
    import flash.text.TextFormatAlign;
    import flash.events.MouseEvent;

    var inputField:TextField = new TextField();
    var myFormat:TextFormat = new TextFormat();
    myFormat.size = 44;
    inputField.defaultTextFormat = myFormat;
    inputField.restrict = "0-9";
    inputField.maxChars = 6;
    inputField.multiline = false;
    inputField.textColor = 0 x 000000;
    inputField.border = true;
    inputField.width = 150;
    inputField.height = 50;
    inputField.x = 75;
    inputField.y = 50;
    inputField.borderColor = 0xFF0000;
    inputField.type = "input";

    addChild (inputField);

    var inputField1:TextField = new TextField();
    var myFormat1:TextFormat = new TextFormat();
    myFormat1.size = 44;
    inputField1.defaultTextFormat = myFormat;

    inputField1.maxChars = 1;
    inputField1.multiline = false;
    inputField1.textColor = 0 x 000000;
    inputField1.border = true;
    inputField1.width = 150;
    inputField1.height = 50;
    inputField1.x = 275;
    inputField1.y = 50;
    inputField1.borderColor = 0xFF0000;

    addChild (inputField1);

    myButton.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler_2);

    function fl_MouseClickHandler_2(event:MouseEvent):void
    {
    {
    inputField1.text = String (Math.PI * Number (inputField.text));

    }
    }

  • Simple question about calling script

    Hi people,

    I am new to flash and actionscript, so only to learn one simple question. (I have not found an answer while the former posts surf/reading again)

    If I wrote a script at the top of my project:

    btnTest1._visible = false;

    btnTest2._visible = false;

    btnTest3._visible = false;

    etc.

    I can create something to call this script in without having to re write the original code if I need to use it again, for example:

    btnTest4.onrelease = function() {}

    btnTest1._visible = false;

    btnTest2._visible = false;

    btnTest3._visible = false;

    }

    I'm looking for a way to store need to unnecessarily repeat the script

    See you soon

    Yes, you can create features and reuse them as long as they remain accessible.  Just be aware that you are showing code Actionscript 2, Actionscript 3.  Below it is rewritten in AS3...

    function hideEverything (): void {}

    btnTest1.visible = false;

    btnTest2.visible = false;

    btnTest3.visible = false;

    }

    And that the function could be further simplified because of the way you named elements (more sense if there is more than a mere 3)...

    function hideEverything (): void {}

    for (var i: uint = 1; i<4;>

    This ["btnTest" + String (i)] .visible = false;

    }

    }

    Place the strings in parentheses causes their names of proceedings for assessment.

  • I have a simple question about the meta-data.

    Hello. It is a simple question about the meta-data. How can I get the video bitrate of a flv or mp4 (video playing via NetStream file) file

    right now I have this:

    Code
    var netClient:Object = new Object();
    netClient.onMetaData = function(meta:Object)
    {
    for (var in meta props) {}
    trace (props + ":" + meta [props]);
    }
    MovieClip (root) .durations = meta.duration;
    trace (MovieClip (root) .durations);
    };
    NS.client = netClient;

    And my output is:

    videocodecid: avc1
    audiocodecid: m4as
    aacaot: 2
    Width: 960
    AudioChannels: 2
    videoframerate: 23.976
    TrackInfo: [object Object], [object Object]
    moovposition: 32
    avcprofile: 77
    audiosamplerate: 48000
    avclevel: 31
    seekpoints: [object Object], [object Object], [object Object], [object Object]
    height: 540
    Duration: 221.312

    As you can see, there is nothing of video bitrate.

    I know that the video bitrate of my videos, but then I have to manually type each number of bitrate into my flash project, and it would be such a fuss when I have a lot of videos. Would be nice if flash can detect the video bitrate.

    It's for my online portfolio.

    Why you divide by 8?  If you want to convert bytes into bits, multiply by 8.

  • Simple question... How do to add pictures on the body of my MAILS found 1000 results for how can I add photos to my Thunderbird emails

    How can simple question - I add photos to my mail body. But instead of the answer - found 1000 results for how can I add photos to my Thunderbird emails. There are answers that don't apply at all to the question anyway. Why must it be so difficult to get a simple answer to a simple question?

    Thunderbird is a bit like Microsoft, all the reasons as I dumped MS Live Mail.

    First, a lot of help for Thunderbird refers to the menus that may not be visible. It would be useful to you and us if you have your menus and toolbars visible.

    http://chrisramsden.vfast.co.UK/13_Menus_in_Thunderbird.html

    Then, open a window of writing. Activate the menu and operate.

    Now that you see an option "Insert"?

    If this isn't the case, you can assign composing in plain text, which does not support embedded images.

    Tools | Account settings| {Select account} | Composition & addressing and ensure "Compose messages in HTML format" are checked. If it is not already checked, go back to writing a message. No better now?

    Once you have the mode of composition HTML goes, you can use Insert | Image or various permutations of copy - paste and drag - move to the body of your message.

    A manual of sorts: http://en.flossmanuals.net/thunderbird/composing-messages/

  • MacBook Pro (retina, 15 inches, beginning 2013) El Capitan 10.11.3, Simple question here: I can't open FinalCut Express (4, I believe). The wheel turns for hours. How can I install/uninstall and will I lose all my old films (for the most part stored on ex

    MacBook Pro (retina, 15 inches, beginning 2013) El Capitan 10.11.3, Simple question here: I can't open FinalCut Express (4, I believe). The wheel turns for hours. How can I install/uninstall and will I lose all my old films (for the most part stored on external hard drives). Thanks for your suggestions.

    You will not lose anything, but the app if you uninstall. If you decide to uninstall use this app to make sure that all the other files which depends on FCE are also deleted however I can't give you any assurance as to whether you will be able to reinstall so that it works correctly. It is a software that has not been supported for almost 5 years and there are conflicting reports as to its compatibility with OS X 10.11. Can't I test it myself.

    Maybe someone else will chime in with their own experiences.

    Russ

  • The simple question is "where can I find the installer for the HP Quick start?

    The simple question is "where can I find the installer for the HP Quick start?

    BESR regards

    Hello:

    And here's one for W8...

    http://h20565.www2.HP.com/hpsc/SWD/public/detail?swItemId=ob_140915_1#tab1

  • How to convert the string to a full decimal point and left shift

    Hey guys I tried to convert gps string to an integer, like this

    A string that is 2467.8976 and I need to convert it to a similar integer as point of this 2467.8979 so that I can shift the decimal point to the left (24.678979) which i coudnt do it with the chain. It's just been my 2 weeks with the labview so be gentle. Thank you

    Hi Awais07,

    Once you have created an indicator that signals the output of parsing the string, right-click on this indicator > display... Format > increase the value of the digit 9

    Kind regards

    Lennard.C

Maybe you are looking for

  • Left button of the mouse on the A30

    Someone at - he heard of a problem with the mouse button on a Satellite A30, the left button of the mouse is solid, it just support at all so I have to use an external mouse, careful to try this price Im look without damanging it again, anyone know t

  • Problem importing Sony EX1

    I recently bought an iMac 27 running 10.10.5 Yosemite. I have FCPX 10.2.3. I installed the update to version 2.0.4 Pro video Formats. All I want to do is get up a race and I thought I was set up. I have connected my Sony EX1 and with FCPX open, I tur

  • Photosmart 7520 e: quality test ok, print faded, print new ink cartridges. In / uninstalled Adobe R DC

    My printer went from fine print only for color printing and now only copying glass screen.  The print quality test is very good, all the colors, including black are very good.  All new ink cartridges.  Recently installed Adobe Reader DC and then remo

  • Is it possible to change the sine wave 'exit' a simulation device?

    I work on a LV collection and analysis VI in LabView that interfaces with a CDAQ-9178 loaded with 9215 modules/a. chassis.  In the Measurement & Automation Explorer, I was able to set up simulated devices that work with my code and I get the sinewave

  • The driver installation fails after custom Windows 7 Pro install

    Hi all.  I just replaced the drive hard on my ProBook s 4440 as the original, one crashed unexpectedly.  I then reinstalled Windows 7 Professional but now have no way to connect to the internet.  I installed the driver of "Sierra Wireless Driver Pack