To access the nested UIComponents

The purpose of the script is to be able to access the component children and their children and their children, etc. by their index.

I tried the following:

script

public function deployNesting (): void {}

var container: canvas = new Canvas();
var chldA:Canvas = new Canvas();
var chldB:Canvas = new Canvas();
var chldC:Canvas = new Canvas();

this.addChild (this.container);
this.container.addChild (chldA);
this.container.addChild (chldB);
this.container.addChild (chldC);
return;
}

public function accessNesting (): void {}
trace (this.childAt (0) .childAt (0)) / / error 1119 *
trace (this.childAt (0) .numChildren) / / error 1119 *
return;
}

* 1119: access to property may be undefined numChildren through a reference with static type flash.display:DisplayObject.


I am aware that this nesting is generally not recommended, but in some cases, it is necessary, and I would be recognizing an opinion on this matter.

a.Neko

Well... It's time to assume the therapeutic values of this forum in my particular case :) once more, just after recurring in all ways possible to solve, and then post a topic here, I changed my approach and find the solution...

In this case, it is necessary to cast the return of all the getChildAt() in nesting structure, except the last.

You can access a nested child to add a new child to his list to display as follows:

Canvas (this.getChildAt (0)). AddChild (chldC);

Access the name property of the deeply nested child is as follows:

Canvas ((Canvas (this.getChildAt (0))) .getChildAt (0)) .getChildAt (0) .name;

etc...

A bit complicated, but solve the problem of access nested children when, for example, the variables used to create disappeared, or to navigate freely through the nested lists display...

(Checked with Flex 2.0 Builder mx.* components, but I guess that it also works for objects of flash.display. *.)

a.Neko

Tags: Flex

Similar Questions

  • cannot access the rows of a table not nested element

    What Miss me? I'm under Oracle 12 c (12.1.0.1.0)

    CREATE TYPE dim_O AS OBJECT )

    dimension_id number

    label_en varchar2()300( )

    );

    CREATE TYPE dim_T AS TABLE OF dim_O;

    DECLARE

    dims_t dim_T

    START

    SELECT CAST(MULTISET( )) 

    SELECT  DIMENSION_ID LABEL_EN

    DE    DIMENSIONTABLE -actual physical table in oracle

       DIMENSION_ID IN (3001 3002 3003()

    ) AS dim_T) "dim_rec"

    BY dims_t

    DE    DOUBLE;

    FOR I IN dims_t. FIRST... dims_t. LAST LOOP

    DBMS_OUTPUT. Put_line() dims_t() I). dimension_id);

    END LOOP;

    -exit from the loop above is

    -3001

    -3002

    -3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE ( SELECT dimension_id FROM TABLE (dims_t) ( )

    Dimension_id SET = WHERE = dimension_id 3004 3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE ( SELECT dimension_id FROM TABLE (CAST (dims_t in dim_T () ) ( )

    Dimension_id SET = WHERE = dimension_id 3004 3003


    END;

    I'm trying to understand this example very simple, but to no avail.

    Can someone tell me why I get this error?

    Thank you all in advance for your time.

    Marc

    What Miss me? I'm under Oracle 12 c (12.1.0.1.0)

    CREATE TYPE dim_O () AS OBJECT

    number of dimension_id

    label_en varchar2 (300)

    );

    CREATE TYPE dim_T AS TABLE OF dim_O;

    DECLARE

    dims_t dim_T;

    BEGIN

    SELECT CAST (TYPE MULTISET)

    SELECT DIMENSION_ID, LABEL_EN

    OF DIMENSIONTABLE -actual physical table in oracle

    WHERE DIMENSION_ID IN (3001,3002,3003)

    () AS dim_T) 'dim_rec '.

    IN dims_t

    FROM DUAL;

    I'm IN dims_t.FIRST... dims_t.Last LOOP

    DBMS_OUTPUT. Put_line(dims_t (i) .dimension_id);

    END LOOP;

    -exit from the loop above is

    -3001

    -3002

    -3003

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE (SELECT dimension_id FROM TABLE (dims_t))

    SET dimension_id = dimension_id = 3003 3004 WHERE;

    -The following statement fails: cannot access the rows of a table not nested element

    UPDATE TABLE (SELECT dimension_id FROM TABLE (CAST (dims_t as dim_T)))

    SET dimension_id = dimension_id = 3003 3004 WHERE;

    END;

    I'm trying to understand this example very simple, but to no avail.

    Can someone tell me why I get this error?

    You get it because dims_t is an array of OBJECTS - not a table of scalars. But your SELECT statement returns scalar.

    There IS NO such object, named "dimension_id"; It is an ATTRIBUTE of the object DIM_O. DIMENSION_ID is a SCALAR which, as says the exception, is a "No nested table element; If you cannot select/Update lines of it.

    What you do is equivalent to the following:

    DECLARE

    dims_t dim_T;

    number of dim_id;

    dim_o design;

    BEGIN

    Design: = dim_o (3, 'ghi');

    SELECT DIM_O (DIM_ID, LABEL) BULK COLLECT INTO table DIMS_T (d_o);

    end;

    /

    ORA-06550: line 7, column 59:

    PL/SQL: ORA-22905: cannot access the rows of a table not nested element

    ORA-06550: line 7, column 1:

    PL/SQL: SQL statement ignored

    This SELECTION is trying to design it as a table when it's a SCALAR - so the same exception you get.

  • Cannot access the synology on nested host iscsi datastore

    I installed a Synology ds 414 version - 5-2-5592, with 2 volumes prescribed as 2 iscsi targets, I'm running 2 esxi 6 guests, a physical and a nested, phyiscal host I can access the target immediately without any problem, the host nested when I use the dynamic discovery, I can see the target via the static mapping but LUNS never appear and I can't add them as data stores.

    I put the target to allow multiple sessions on the synology, I can ping from the nested host synology vmk. I added the host nested as initiator allowed on the Synology, although I didn't need to do it on the first host as default value is set to read / write and there is no authentication set to synology.

    I have attached a few screenshots

    Any help would be greatly appreciated.

    iscsi targets.PNGCapture.PNGsynology.PNG

    You have activated on your physical host vSwitch promiscuous mode? See this thread to another: Nested ESXi 5.1 and iSCSI Shared Storage

  • How to access the model nested via library DAM?

    I'm trying to use the dam library to access a list of objects data center as well as a list of objects to store data that is associated with each of them. I have not found anything that talks about how to use the relations of model and tables at the same time.

    My data objects look like this (they are in packs, with imports, etc.) that compile cleanly.

    [Bindable]

    [Model(type="Datacenter")]

    SerializableAttribute public class DatacenterDataItem extends to {DataObject

    [Model (property = "name")]

    public var name: String;

    [Model (relation = "datastore", property = "name")] / / works but only name returns

    [Model (= "datastore" relationship, nestedModel = "com.example.model.DatastoreDataItem")]

    public var datastoreList:ArrayCollection;

    }

    [Bindable]

    [Model(type="Datastore")]

    SerializableAttribute public class DatastoreDataItem extends to {DataObject

    [Model (property = "summary.name")]

    public var name: String;

    [Model (property = "summary.type")]

    public var type: String;

    [Model (property = "summary.url")]

    public var url: String;

    }


    When I try and interrogate customer data centers list explodes with a message box that says "an internal error occurred - error #1065" so obviously something is not correct.


    Can I return a list of names if I specify the property directly, however based on the documentation, it seems that the nested object should work... Ideas?

    This should be

    [Bindable]

    [Model(type="datastore")]

    NOT

    [Bindable]

    [Model(type="Datastore")]

  • Airport Extreme a different IP address than the NEST

    Hi all

    I have an Airport Extreme new set up a network of comments.  The guest network is configured for the IP addresses in the 172.16... range, compared to the 192.168 range (which is for the network no comments).

    I put my nest on the network of comments.  I see in the settings on the nest indeed connected to the network with an IP 172.16 comments...

    But, when I look at the Airport utility it says the nest is connected using the IP 192.168... which means it is NOT on the network of comments.

    Something is wrong here - is there a bug in Airport utility, causing this or something else, you know?

    Thank you

    Allen

    Something isn't bad. It is normal, unless you want to call normal a "bug".

    AirPort Extreme uses VLAN technology... Virtual local area network... to provide Internet access to the nest using one and only available Internet connection to AirPort Extreme.  Indeed, the NEST uses the same network and the same Internet connection as your other devices that are not on the network of comments.

  • Can not access the rows of an item of table no-netsed in execution of the embedded R

    Hi all

    I am running a script R (R running embedded) oracle database

    I use under request

    Select *.
    table (rqEval (cursor (select 'divider' 50, 500 "numDots" of the double),))
    "select 1 id, 1 double val,"
    'myRandomRedDots2'));


    I want to save the result in a variable. So under anonymous block has written


    declare

    ID number (10);

    Val number (10);

    Start

    SELECT id, val in id, val

    table (rqEval (cursor (select 'divider' 50, 500 "numDots" of the double),))

    "select 1 id, 1 double val,"

    'myRandomRedDots2'));

    end;

    /

    But I get the error "can not access an element of no nested table lines.

    The one you suggest please how to fix this.

    Thank you

    Billa


    Billa,.

    You see the error "can not access the lines of a no nested table element" of PL/SQL, because rqEval (..., ' select 1 id, 1 double val ',')

  • Subselect query returns "invalid identifier", but the nested query return lines

    I don't think it's a general SQL question.

    Select * from persons where person_id in)

    Select person_id with people whose name = 'Obama' - subquery

    ) and age > 18;

    When I run the subquery, I get:

    ORA-00904: "PERSON_ID": invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    Error on line: column 5: 8

    This is because the table people do not have the person_id field.

    But when I run the nested together query it returns all the lines in people with the AGE greater than 18.

    How is he succeeds when the subquery is obviously wrong?

    363f652b-263D-4418-933F-74a1d0a41b4c wrote:

    I don't think it's a general SQL question.

    Select * from persons where person_id in)

    Select person_id with people whose name = 'Obama' - subquery

    ) and age > 18;

    When I run the subquery, I get:

    ORA-00904: "PERSON_ID": invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    Error on line: column 5: 8

    This is because the table people do not have the person_id field.

    But when I run the nested together query it returns all the lines in people with the AGE greater than 18.

    How is he succeeds when the subquery is obviously wrong?

    Yes - this is a general SQL question and ask often enough.

    Correlated subqueries depend on the inner query, be able to see and access to the columns of the outer query. Normally see you referenced in the WHERE clause of the subquery and not in the SELECT clause, but the reference is valid in both places. This works because the columns of the tables in the main query are accessible in the subquery. "Person_id" is probably a column in the table 'people '.

    Which can be a cause of problems 'odd' when the column (in your case "person_id") is more of a table.

    Use an alias in the subquery in the subquery and you will find that it will not succeed.

    See these two articles AskTom where he addresses this specific issue

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:3317493900346468494

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:155200640564

  • How to access a nested h AM roots

    Hello

    I have a Module of Application root, and 2 nested Apllication Modules:

    RootAM
    | _NestedAM1
    | _NestedAM2

    In a view object executeQuery() method, published on NestedAM1, I want to call a public method published in NestedAM2.

    I try to do something like this:
        @Override
        public void executeQuery() {
            BasicApplicationModuleImpl rootAm = (BasicApplicationModuleImpl)this.getRootApplicationModule();
            NestedAM2Impl nestedAm2 = (NestedAM2Impl)rootAm.findApplicationModule("NestedAM2");
            
            String lanCode = (String)nestedAm2.myMethod();
            this.setutiLanCode_BV(lanCode);
            
            super.executeQuery();
        }
    But 'this.getRootApplicationModule ()' give me NestedAM1 and not RootAM. So I don't know how to access the NestedAM2 application module.

    Do you know how I can do this?

    Thank you.

    First of all, a few comments:

    (1) you are defeating the spirit of the AMs nested If VO in a nested AM depends on something in a root AM
    (2) even worse, you are really defeating the spirit of the nested AMs if VO in a nested AM depends on something in a nested siblings AM
    (3) you are beating the separation of concerns if VO is based on a method in an AM at all

    So, I'd be looking to change my approach, if I were you.

    That said, I did it in 11.1.2.2 (you don't mention a version, then I went at latest).

    (1) created a simple VO based on "select user to twice.
    (2) overrode executeQueryForCollection as follows:

      protected void executeQueryForCollection(Object object, Object[] object2, int i)
      {
        ApplicationModuleImpl i1 = this.getRootApplicationModule();
        ApplicationModuleImpl i2 = i1.getRootApplicationModule();
    
        _LOG.severe(i1.getName());
        _LOG.severe(i2.getName());
        super.executeQueryForCollection(object, object2, i);
      }
    

    (3) created an AM called "IAmNested" and added the VO above to the data model
    (4) created an AM called "IAmRoot" and added to the data model IAmNested
    (5) ran the IAmRoot AM (also tested with a JSF page)
    (6) a noted two messages in the window of the newspaper, who were both "SEVERE: IAmRoot.

    So, in short, I don't see the behavior you report. Maybe you are actually using AOS nested root AM in this case?

    John

  • Actions on the nested items

    I have two symbols on a stage with several items each.  I want to be able to click on symbole1-Element1 and play Symbol2-item2 animation.

    I tried to put

    sym.getSymbol("Symbol2") .getSymbol ("item2").play("Start");

    in the Actions of S1 - E1, but nothing happens, as it does not record it is clicked.

    If I pull S1 - E1 off symbole1 and just as a component on the stage, he plays very well.

    Is there a way to execute actions of the nested elements?

    Access a timeline of symbol of in another symbol

    To access another symbol from a symbol, precede using getSymbol with sym.getComposition () .getStage (), as shown in the following example:

    // Get the stage from the composition level, get the symbol, and play the timeline
    sym.getComposition().getStage().getSymbol("symbolName").play();

    To access a timeline of symbol nested in a symbol, nest using getSymbol, as shown in the following example:

    // Get the stage from the composition level, get the parent symbol, then get the nested symbol timeline
    sym.getComposition().getStage().getSymbol("symbolName1").getSymbol("symbolName2").play(0);

    More information:

    Adobe Edge animate JavaScript API - Version 1.0.0

  • Want to access the current index of the DataGroup component in the datagroup brood

    Hello

    I have 2 dimensional Arraycollection collection that contains the details of people. I want to view those using component Datagroup. because it is a dimentional 2 I use datagroup nestead. but I'm not able to access currentIndex (as Repeater, we have access to). Please help me how can I access

    currentIndex.

    example code:

    <? XML version = "1.0"? >

    <!-repeater\RefNestedComponents.mxml->

    < s:Application

    " = xmlns:fx 'http://ns.adobe.com/mxml/2009"" "

    xmlns:mx = "library://ns.adobe.com/flex/mx".

    xmlns:s = "library://ns.adobe.com/flex/spark" xmlns:local = "" * "creationComplete =" testd () ">"

    < fx:Script >

    <! [CDATA]

    import mx.collections.ArrayCollection;

    import mx.collections.ArrayList;

    import mx.collections.IList;

    [Bindable]

    public var tests: ArrayCollection collection;

    function public testd (): void {}

    test = new ArrayCollection([)

    {name: collection new ArrayCollection ([{name: "Wilma Carter", bats: "R", lance: "R", year: "So", home: "Redlands, CA"}])},

    {name: collection new ArrayCollection ([{name: "Sue Pennypacker", bats: "L", lance: "R", year: "Fr", home: "Athens, GA"}])},

    {name: collection new ArrayCollection ([{name: "Jill Smithfield", bats: "R", lance: "L", year: "Sr", home: "Spokane, WA"}])},

    {name: collection new ArrayCollection ([{name: "Shirley Goth", bats: "R", lance: "R", year: "Sr", home: "Carson, NV"}])},

    {name: collection new ArrayCollection ([{name: "Jennifer Dunbar", bats: "R", lance: "R", year: "Fr", home: "Seaside, CA"}])},

    ]);

    }

    public void change(e:Event):void {}

    tests [1] .name = "test";

    tests.refresh ();

    }

    ]]>

    < / fx:Script >

    < s:layout >

    < s:VerticalLayout / >

    < / s:layout >

    < s:DataGroup id = "datagroup" dataProvider = "{test}" >

    < s:layout >

    < s:VerticalLayout / >

    < / s:layout >

    < s:itemRenderer >

    < fx:Component >

    <!-< s:DataGroup dataProvider = "{outerDocument.tests [1] .name}" >-->

    < s:DataGroup dataProvider = "{outerDocument.tests [INDEX] .name}" >

    < s:itemRenderer >

    < fx:Component >

    < mx:Text text = "{data.name}" / >

    < / fx:Component >

    < / s:itemRenderer >

    < / s:DataGroup >

    < / fx:Component >

    < / s:itemRenderer >

    < / s:DataGroup >

    < s:Button click = "Exchange (event)" label = "click to change" / > "

    < / s:Application >

    in the code above:

    <!-< s:DataGroup dataProvider = "{outerDocument.tests [1] .name}" >-->

    < s:DataGroup dataProvider = "{outerDocument.tests [INDEX] .name}" >

    I want to get the INDEX value...

    Please help me... Thank you

    The ItemRenderer class should be in spark the root inside your fx:Component tags tag.  This class has a built-in itemIndex property.

    Here is your code tweaked to show the itemIndex in the nested DataGroup and the external DataGroup:

    "xmlns:FX ="http://ns.adobe.com/mxml/2009"

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    "xmlns:s ="library://ns.adobe.com/flex/spark"xmlns:local =" "*" creationComplete = "testd ()" >

    Import mx.collections.ArrayCollection;

    Import mx.collections.ArrayList;

    Import mx.collections.IList;

    [Bindable]

    public var tests: ArrayCollection collection;

    public function testd (): void {}

    testing = new ArrayCollection([)

    {name: collection new ArrayCollection ([{name: "Wilma Carter", bats: "R", lance: "R", year: "So", home: "Redlands, CA"}])},

    {name: collection new ArrayCollection ([{name: "Sue Pennypacker", bats: "L", lance: "R", year: "Fr", home: "Athens, GA"}])},

    {name: collection new ArrayCollection ([{name: "Jill Smithfield", bats: "R", lance: "L", year: "Sr", home: "Spokane, WA"}])},

    {name: collection new ArrayCollection ([{name: "Shirley Goth", bats: "R", lance: "R", year: "Sr", home: "Carson, NV"}])},

    {name: collection new ArrayCollection ([{name: "Jennifer Dunbar", bats: "R", lance: "R", year: "Fr", home: "Seaside, CA"}])},

    ]);

    }

    public void change(e:Event):void {}

    tests [1] .name = "testing";

    tests. Refresh();

    }

    ]]>

  • buttons nested access to nested within MC MC...

    Hi everyone, I would be very happy if someone could help me with the following...

    I have a MC instance in the main storyline in a layer and another layer called 'actions' (keyframefor only once)
    This MC is containing an another MC2
    The MC2 is containing an another MC3
    The MC3 is containing the buttons.

    In a main timeline:

    Stop();

    trace ("waiting for click");
    _root.finalIntro_mc.roller_mc. OldIntro_mc.starwars_btn.onRelease = function() {}
    trace ("Success");
    }

    will do nothing... and that's the problem. If I put the same piece of code in the timeline of 1st MC then it works. All instances have their names. It seems that I can't access button located at more than 3 nested MC.

    Any ideas? You can download the FLA from the Web site: http://home.exetel.com.au/news/oldintros1.fla

    Thank you!

    wbexperience... Yes, the Star Wars button (better by saying that one is enough) send me the command trace.
    This is the code I want to have on the first frame of the main timeline (to access the button here)
    Stop();

    trace ("waiting for click");
    _root.finalIntro_mc.roller_mc. OldIntro_mc.starwars_btn.onRelease = function() {}
    trace ("Success");
    }

    But it did not work. Test it.
    However, after several hours to completely disassemble the MC, I found where the problem was. It is in the first MC, where is the mask. I have several keyframes for the mask as well, but just after I did the mask alone with in a keyframe for all the time, and then it worked.
    Guys, thanks a lot anyway! I'm about to publish another thread - loading the video output with sound... I'm stuck... need help... a soon.

  • To access the tips of existing PL/SQL API

    Hi all in the JDev/ADF community,

    I am a beginner in ADF coming from a form and background of PL/SQL. Using JDeveloper 11.1.1.2, I lived quite a few examples and read a lot of different guides developers. I'm happy with the basics of the model controller architecture and display when simply based on database tables. For example, I can create a fairly complex page with tabs, master relationships / detail, editing etc.

    The app I am writing to you in the end is to sit on top of an existing PL/SQL packages that provide most of the data and logic that surround it.

    So, to finally get to my question... I wonder what is the best way to approach using aspects of the API of PL/SQL in British Colombia ADF? I saw some things in the background documentation around the use of an API of simple table with procedures for insert/update/delete, however I cannot find directions on how to access the data returned in associative arrays. For example, there is a procedure that is called with a particular key value (will be passed as a parameter to the page) which returns then several tables of different records PL/SQL (for example, the OUT parameters). I need to access this information during a session of the app, so I think I need somehow to load it into an entity or view object. Y at - it an interface to access the record types and table PL/SQL in this way?

    Obviously, I want to reuse as much of the existing infrastructure, as I can, but if there are areas where this would result in unnecessary complexity on the side of the ADF, I'd consider reworking of these parts.

    I'm not a complete solution at this stage - just a few pointers on what direction to look would be much appreciated.

    Thank you very much

    Kevin.

    Published by: user11363101 on March 11, 2010 11:33 (added version JDev)

    I would like to just one part of your question, given that Frank has indicated you in the General documentation to call PL/SQL from ADF business components address.

    You asked specifically about the transmission of arrays and associative arrays to and from PL/SQL procedures. These are artifacts of PL/SQL that do not interact with the outside environment. The main problem is that the modules developed in Java and other languages cannot easily discover the metadata for these tables. You'll need to translate into objects Oracle you set with the CREATE TYPE command. Here is one of my favorites:

    CREATE TYPE vc_arraytype AS TABLE OF VARCHAR2(4000);
    

    Then you declare objects of this type, and given that plug-ins can ask the database 'what is a VC_ARRAYTYPE?', they can use these objects. You would change your PL/SQL so that it uses tables from database nested as it instead of collections of native PL/SQL, or create procedures of wrapper which translate the tables of database embedded in the forms required by your initial proceedings, call the initial procedures, can translate the results if necessary.

    Associative arrays with non-integer index are a particular problem, because there is no equivalent type that you can create with CREATE TYPE. You can use a pair of nested tables, one for the clues and one for values, or create a record type such as

    CREATE TYPE assoc_rectype AS OBJECT(name VARCHAR2(30), val VARCHAR2(4000));
    

    Then a table nested in these folders:

    CREATE TYPE assoc_arraytype AS TABLE OF assoc_rectype;
    
  • I can't access the backups on Time Capsule

    A month ago I deleted from my hard drive and more. I have a MacBook Pro 2012 running macOS. I can't access the files on Time Capsule before is erased in the month of August, I can see the story in the timeline panel, but I don't have access to anything before erasure. Is it possible to access to the files before the wipe?

    A month ago I deleted from my hard drive and more.

    What hard drive you are talking about: one internal on your MacBook Pro (MBP), an external drive attached to the MBP for Time Machine backups, or internal hard drive to time Capsule?

  • Can I access the real coordinates of an image in iPhoto?

    Can I access the real coordinates of an image in iPhoto? Places shows a rudimentary map of the location of the photo, but I would like to retrieve numeric values.

    Not in ipHoto, but if you export the non modified original and then open with preview the Inspector will display numeric values assuming that they are in the EXIF data

    LN

  • To access the video and music files downloaded from an application

    I downloaded some music and videos using an application, the JW library, but I can't access the music or videos with the exception of this app. Is there a solution?

    I really need to put these media on a playlist in media player so I can listen to songs while on other activities.

    What should I do to make media players to access the music and videos?

    Thank you

    Hello

    Maybe these applications help you ☞ JW Player & Music JW.

Maybe you are looking for