Accessing components created thru AS addChild

I am working on an application that requires me to add
componts on the fly, based on the field type as entered into the
database. (code attached).
So, I have no idea how many componets will be added, or what
types they will be.
On click of a save button, I need to be able to access the
values typed in to the boxes. Normall its textbox.text, but since I
don't know the names of the boxes, I'm stumped.
I have tried adding the name of the component to an array
just before I use the .addChild() in the switch statments, but that
only gives me an array of the names, and looping through the array,
using array(i).text gives me an error.
Any ideas? I'm stuck on this. Maybe there is a better way of
adding the boxes to the page than what I'm doing.
Thanks!

I strongly urge you to consider using mx:Repeater. It does a
lot of work for you , including creating arrays of references to
repeated components. If you give some tag in the repeater an id,
say mytext", then you can access the instances of that component
using mytext[n].text, where "n" is the index of the dataProvider
item.
Doing this below does NOT create an id you can use to
reference the component instance:
myEditor.id = "Answer"+i.toString();
If you want to stick with manual addChild, you will need to
keep a reference to the created components yourself. One effective
way is to use an associative array, like a hash table. This is just
a dynamic "Object".
private var _myEditors:Object = new Object();
myEditor = new RichTextEditor();
myEditor.text = "Answer question here";
_myEditors["Answer"+i] = myEditor; //toString is not
necessary here
vbLabBk.addChild(myEditor);
Then you can later access those instances like this:
var myEditor:RichTextEditor = _myEditors["Answer"+i];
But consider Repeater. It does this and much more for you,
such as destroying unwanted child components when the data changes.
Tracy

Similar Messages

  • Just set up our Apple TV and it works fine for NetFlix.  However want to stream photos and I Tune library from home computer but this computer accesses the internet thru a VPR at my wife's place of enployment. Other than a 2nd computer any suggestions?R

    Just set up Apple TV on home network. Works fine for NetFlix but we can't stream I Tune libruary or digital photos thru it to our home TV as because of my wife's work we bypass COX and access the internet thru a VPN offered by her employer.  Was told we either have to buy a second computer (two expensive for just these two functions) or keep turning on and off the VPN(not practical). Any other ideas? Thanks

    Does she need to access the internet through her employer, or is she just trying to access her internal network at work?
    If it's the latter, split-stream VPN clients (like Cisco AnyConnect) will split traffic so that only that directed at a particlar domain gets tunneled. 
    I have an AnyConnect client at home, but I normally only activate it when I'm using it, so I've never tested it with HomeSharing.  I'm currently traveling, but when I get home tomorrow, I'll try it out and let you know if it works.  If it does, your wife can check with her employer to see if she can configure AnyConnect to work with them.

  • How can I give me the access to create a developer key in the market?

    Hi!
    I'm new in the basis area and I don't have access to create a developer key. A consultant need a developer key.
    How can I give me the access in the market place to create it?
    Thanks!

    Hi
    You need to get the access key from SAP.
    Refer to the procedure of obtaining access keys from SAP in BASIS.
    Security
    Regards,
    Raj

  • How do I find the MAC address of a CLIENT ACCESS POINT created from the FILE SERVICES ROLE

    I have several Client Access Points created within the clustered File Services Role.  The only way I seem to be able to determine the MAC address of each of these, is by visiting the DHCP server.
    Does anyone know if there is a way of reporting on this from the server (active node) itself?  I have tried ipconfig all, checked the properties of the CAP in the FCS console etc.
    Many thanks.
    Kathleen Hayhurst Senior IT Support Analyst

    Hi,
    As far as I know there have no original option for query all the CAP MAC address, may you can create a PowerShell command then filter the configuration result, you can ask
    in PowerShell forum for the further help.
    More information:
    PowerShell forum:
    http://social.technet.microsoft.com/Forums/en-US/bf0e249b-a9f3-4bef-a536-c210b3f09340/powershell-script-to-alert-on-failed-system-state-backups?forum=winserverpowershell
    The related KB:
    Failover Clusters Cmdlets in Windows PowerShell
    http://technet.microsoft.com/en-us/library/hh847239.aspx
    The related article:
    PowerShell for Failover Clustering: Frequently Asked Questions & Enabling CSV
    http://blogs.msdn.com/b/clustering/archive/2009/05/23/9636665.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to Install Oracle Data Access Components (ODAC) on Windows Server 2003?

    I recently installed "32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio" on my computer (Windows 7, 64bit). Everything seems fine and I can develop and run my application in Visual Studio 2010 and IIS 7.
    Now, when I deploy my application to the Server, it raises error:
    Exception: System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
    Obviously I need to install ODAC on the server, too. My server is:
    - Windows 2003 32 bit R2 (I know, I know!)
    - IIS 6
    So. I downloaded the same installation from Oracle website (ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio [11.2.0.3.20]) and installed it on the server. But still getting the same error.
    PS: When I was installing, I chose Oracle Data Access Component for Oracle Client 11.2.0.3.20 in Oracle Universal Installer. hmmmm. Should I choose "Oracle Server" instead? Screenshot
    Edited by: 1000434 on Apr 17, 2013 6:35 AM
    Edited by: 1000434 on Apr 17, 2013 6:36 AM

    ODP.NET, Unmanaged Driver uses unmanaged dependencies in the Oracle Client. The error you see means you have another Oracle Client installed on the Win2003 machine and ODP.NET is attempting to load the incorrect Oracle Client version, rather than the version you installed ODP.NET with.
    What you need to do is direct ODP.NET where to find the correct version of its unamanaged Oracle Client dependencies. This will be generally the bin directory of your Oracle Client home that was installed with ODP.NET.
    You can learn more about DllPath here:
    http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/InstallODP.htm#sthref94
    If you're not familiar with how to set ODP.NET settings in the Registry or .NET config files, you can read how to do that here:
    http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/featConfig.htm#sthref106

  • How to check if Oracle Data Access Components  is installed?

    How to check if  Oracle Data Access Components is installed and version on my computer?
    Also How to check if Oracle Data Provider is installed and version?
    TIA
    Steve42

    Regedit HKLM->Software->Oracle.  See what's there...
    At the very least, that can give you paths and can check file versions from there.

  • No Setup.exe in 64-bit Oracle Data Access Components (ODAC) Dowload

    Why is there no Setup.exe in the 64-bit Oracle Data Access Components (ODAC) Download? Are the only instructions for installing in the dowloaded readme file?

    You're probably looking at an XCOPY bundle.
    If you're looking for an x64 11.2 bundle installed via the Oracle Installer, you'd need to get either the 11201 full client on OTN, or the 11202 full client on My Oracle Support. The 11202 full client includes support for .NET 4 if you need that.
    Hope it helps,
    Greg

  • Error in accessing the create method declared in Home interface

    hi,
    I have create method in home interface which takes the following syntax:
    public ShipRemote create(ShipPK id,String name,int capacity,float tonnage) throws CreateException,RemoteException;
    In the client I create a remote object and try to call this create method, but I get a compilation error :
    it says unable to resolve the symbol with a cursor pointing the create method
    interface sampleEJB.ship.shipInfo.ShipHome ShipRemote remoteRef=(ShipRemote)homeRef.create(spk,sname,5000,100.7);
    how can i resolve this.
    I have implemented this create method in my bean

    hi i have compiled the client interfaces and the bean successfully.
    I have also imported the classes in the in the client code .
    I even deployed my jar successfully, but i have problem in accessing the create method specified .
    thank you

  • IFS-30027: Insufficient access to create a SchemaObject

    I receive the following error when I to parse a XML file. IFS-
    21005 indicates, I need administrator mode. What I want know is
    this misleading and I just need to modify the ACL or does the
    administrator need grant a higher level of access?
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new
    LibraryObject oracle.ifs.common.IfsException: IFS-30027:
    Insufficient access to create a SchemaObject
    oracle.ifs.common.IfsException: IFS-21005: Administrator mode is
    required for this operation
    Thanks,
    Art

    If the XML file you are uploading is specifying the creation of a
    SchemaObject (e.g. a ClassObject, ValueDomain, ClassDomain, or
    ValueDefault), the session must be in admin mode. There is no
    way to circumvent this by changing an ACL.
    regards,
    dave

  • How can I give a co-worker access to create a form?

    I have an account under my name with Adobe and would like to give a co-worker access to create a form, how can I do this?

    Hi,
    Each user that is creating forms should have their own FormsCentral account. Accounts should not be shared between users. Note that you can share forms between users, so if your co-worker signed up for a free account he/she would be able to access forms that you create.
    Regards,
    Brian

  • Accessing Dynamically created Button

    Hi,
    Can someone give me an example how to access dynamically created button? 
    I know how to create a button dynamically but don't know how to access from AS3.
    Thanks!

    Hi,
    Please go through following links.
    1) http://www.daveoncode.com/2009/05/20/objectcollector-accessing-dynamic-generated-flex-obje cts-by-id/
    2) http://stackoverflow.com/questions/6740813/flex-assigning-events-to-dynamically-created-bu ttons
    3) http://www.justskins.com/forums/adding-click-event-to-35785.html
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Access dynamically created JTextField

    i need to create an unknown number of JTextField in my GUI, and this number depends on a user-input value.
    Subsequently, i will need to read the strings from the JTextField. This is how I dynamically created my JTextField:
    while (i < num-1) {
    rangePanel.add(new JTextField("0")); // 0 is merely a default value
    how can i access the created JTextFields?
    thanx

    Is this the preferred style?
    I currently have an array of JTextFields but am having real grief (input on screen not availble fro getText(), etc.), code fragment:
    JTextField [] tf = new JTextField[10];
    for (i=0, i<10; i++) {
    ft[i] = new JTextField(15);
    user enters data on screen...
    String str = tf[0].getText() returns blank. Also <tab>ing jumps between first position and where ever mouse originally landed in field.

  • Can't access the Create or Share Menus, using Window 7

    Using Windows 7, I can't access the Create or Share menus, please help

    Hi,
    Did they ever work and have just behaving like this or is this a new install?
    Does the user that you are running under have administrator rights?
    Sounds like it was a bad install, have you tried uninstalling/re-installing?
    Brian

  • How to access Templates created in PAGES iwork06?

    How to access Templates created in PAGES iwork 06?
    I also want to eliminate default template folders and recreate my own as in 06 version of PAGES.
    Templates file is located where in '08?
    Don't need all the pre-made templates!

    The pre-made templates are contained in the Pages application package. Any templates you create yourself are stored in HD > Users > [your account] > Library > Application Support > iWork > Pages > Templates > My Templates. There is no separation of user created templates by Pages version. Those I created with Pages 1 & 2 are in the same place where my Pages 3 templates are & are all available to me in Pages 3. The only problem with this would be if you decide to use a previous version of Pages, you won't be able to access templates created with a newer version.

  • Cannot access my webmail thru moonfruit since latest firefox update

    I have been using firefox to access my business webmail for about a year. Firefox updated about a month ago and I can no longer access my webmail. The message that pops up when trying to access webmail says to contact my host provider which is moonfruit. I contacted them and they said the problem was with firefox since I can access the account thru IE.

    Look for an updated version of that Yahoo Toolbar, one that is compatible with Firefox 4.0.1.

Maybe you are looking for

  • How do I move apps from one TouchPad to another?

    Hi all!! I picked up a new 16gb TouchPad a few months ago and love the heck out of it.  I liked it so much that I got a refurb 32gb to replace it with so I would have enough space to store a pretty decent video library plus my tunes and pics.  What I

  • Create Cursor from File with big mouse cursor

    Hi All, I'd like to change the mouse cursor to a picture (.cur file) and back to normal again. With the LabView vi "Create Cursor from File" and "set cursor" VIs it works, but the cursor is limited to 16x16 pixels (it will be shrinked if I load a big

  • Unable to check in .sda file for ess in the track for NWDI

    Hi Gurus; We have created the track and added the three dependencies along with PCUI_GP.We have imported these into the track. However after placing the .sda file for ess under Jtrans/CMS/Inbox folder  and adding it as software component to the track

  • Currency field value in script

    Hi, In script i want to print  currency field value is 123.000 in this formate. It is possible or not. Edited by: Alvaro Tejada Galindo on Feb 6, 2008 5:14 PM

  • Invoice Tolerance Not Working for Percent

    Hello - I have searched and couldn't find another user with the same issue.  The invoice tolerance levels are set at $250 or 2.50%.  When I go to test the 2.50% level, I enter an amount that is over the limit by a few pennies.  It did not trigger.  B