Binding does not work well when you reach up to a parent component.  You
will have better luck passing a reference into the sub-component.
In the main app("Myapp"):
<MyComponent id="mc1" app="{this}" .../>

And in MyComponent:
public var app:MyApp;           //data typing is required!

then:
text="{app.someComponent.someProperty}"

Tracy
-----Original Message-----
From: gevgelija50 [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 04, 2005 2:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Events and Components



Tried that and got the following Warnings:

2 Warnings found. 
 
Warning /Component.mxml:219 
Changes for dynamic property, parent, with no declared [ChangeEvent] 
will not be detected.



Warning /Component.mxml:219 
Changes to unknown property, result, will not be detected







--- In flexcoders@yahoogroups.com, Ashley Streb <[EMAIL PROTECTED]> wrote:
> You can bind to the result from the GetResults function directly, 
flex 
> takes care of generating the binding code for you. (no need to 
dispatch 
> events)
> 
> E.g.,
> <mx:ComboBox 
dataProvider="{this.parent.Webservice1.GetResults.result}"/>
> 
> Or, if you need to invoke a method with the results
> <mx:ComboBox 
> dataProvider="{myFunction
(this.parent.Webservice1.GetResults.result)}"/>
> 
> 
> define your operation like:
> <mx:operation name="GetResults"/>
> 
> -ashley
> 
> gevgelija50 wrote:
> > 
> > I have a component that contains a combobox. The component is 
called
> > by the parent application. I want to populate the component's
> > combobox with the result received from the webservice in my parent
> > application.
> > 
> > How can I listen to the result event of the main webservice?
> > 
> > Currently I have the following setup in my main webservice:
> > 
> >      <mx:operation name="GetResults" result="{dispatchEvent
> > ('GetResults');}" />
> > 
> > In my component, I am trying to add a listener as follows:
> > 
> > this.parent.Webservice1.GetResults.addEventListener("GetResults",
> > doSomething)
> > 
> > 
> > This DOES NOT work! Please help.
> > 
> > Thanks,
> > Alex
> > 
> > 
> > 
> > 
> > ------------------------------------------------------------------
------
> > *Yahoo! Groups Links*
> > 
> >     * To visit your group on the web, go to:
> >       http://groups.yahoo.com/group/flexcoders/
> >        
> >     * To unsubscribe from this group, send an email to:
> >       [EMAIL PROTECTED]
> >       <mailto:[EMAIL PROTECTED]
subject=Unsubscribe>
> >        
> >     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >       Service <http://docs.yahoo.com/info/terms/>. 
> > 
> >





 
Yahoo! Groups Links



 







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to