believe me, I've tried to attack this problem from a number of ways :)

here's the quick description:

My form design:

Policy 1: accordion
  Division 1: accordion
    State 1: Tab
      VBox
        Code 1: text input
        Code 2: text input
        Code 3: text input
      Add Code: button
      /VBox
    State 2: Tab
      VBox
        Code 1: text input
        Code 2: text input
      /Vbox
    State 3: Tab
  Division 2: accordion
    State 1: tab
    State 2: tab .etc


This is directly created from an XML doc read in the e4x format.  I've got the code working so that I'm able to add code via the button in the state tab.

When debugging, I can see that the vbox's repeater item now reflects the changed XML, but the screen is not redrawn to reflect the new line for the code.

My first plan was to just reset the dataProvider for the the entire form.  Bad idea, it causes the whole form to redraw and loses the current location within the form.

My next plan was to reference the vbox's repeater and reset it's dataProvider to be mine XML snippet.  So far no go :(  

My next plan is to try to figure out how to create a data model for a dynamic xml document.  I figure this is going to be just as successful as the first two plans. :)

Marlon




On 10/17/06, Tracy Spratt <[EMAIL PROTECTED]> wrote:

Yes, you should probably back up a little and think about what you are trying to do.

 

Directly accessing elements of data-driven controls is usually a bad idea, mainly because the controls re-use the visual elements when you scroll.

 

Tracy

 


From: [EMAIL PROTECTED]ups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Michael Labriola
Sent: Monday, October 16, 2006 8:19 PM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Re: Is there a way to find an object if you know the name

 


..one more note..

You may want to also check out "Referencing repeated child components"
in the help docs, which is specifically about components within a
repeater.

--Mike



--- In flexcoders@yahoogroups.com , "Marlon Moyer" <[EMAIL PROTECTED]>
wrote:
>
> sorry, I didn't phrase the question correctly. I have the name of a
> component in a string variable (e.g. I've named a component
> 'name="repeater_state_{divisionRepeater.currentItem.id}") and now I
want to
> be able to refer to that component dynamically.
>
>
> On 10/16/06, Gordon Smith <[EMAIL PROTECTED]> wrote:
> >
> > You simply refer to components by their id. You don't have to "look
> > them up" by it. For example, if you have
> >
> >
> >
> > MyApp.mxml:
> >
> >
> >
> > <mx:Application>
> >
> > <mx::Canvas id="c1">
> >
> > <mx:Button id="b1">
> >
> > ...
> >
> >
> >
> > then in the Application's <mx:Script> methods you can write
expressions
> > like b1.label.
> >
> >
> >
> > Technically, what is happening is that the MXML compiler autogenerates
> >
> >
> >
> > var c1:Canvas;
> >
> > var b1:Button;
> >
> >
> >
> > as instance vars of a MyApp class which extends Application. The
methods
> > you write in the <mx:Script> become methods of this MyApp class,
so they can
> > acess these instance vars.
> >
> >
> >
> > To access components inside components, you simply use the dot
operator.
> >
> >
> >
> > - Gordon
> >
> >
> > ------------------------------
> >
> > *From:* flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] *On
> > Behalf Of *Marlon Moyer
> > *Sent:* Sunday, October 15, 2006 7:03 PM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] Is there a way to find an object if you
know the
> > name
> >
> >
> >
> > What's the equivalent of _javascript_'s getElementById in Flex? I've
> > searched the help files numerous times and can't seem to find it.
> >
> > Thanks
> >
> > --
> > Marlon
> >
> >
> >
>
>
>
> --
> Marlon
>




--
Marlon

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to