Are you still passing in the "this" reference? I suspect that may be the
reason why you getting the error.
> Would you be so kind and provide me with a link for this
> solution. I have my Flex book @ home and I am on tour till
> tuesday...
Well, I don't know if this will work for you because this really depends
on the way your application is working and if the basicSearchCompany
needs to know about the component it is sitting in.
You're already passing in a parameter to basicSearchCompany which is ok,
but if you really only need this parameter pO (i.e. reference to parent)
for the very reason to tell the parent what to do, then you'd better try
to create an event and let the parent decide what to do.
Say, you want your basicSearchCompany component to dispatch a event
called "someEvent" and have the embedding component react accordingly:
1) inside basicSearchCompany.mxml add the following script to your
mx:Script block
// function to dispatch a custom event
private function dispatchCustomEvent():Void {
var event:Object = new Object();
event.type = "someEvent";
event.foo = "bar";
dispatchEvent(event);
}
2) add a mx:Metadata tag to basicSearchCompany
<mx:Metadata>
[Event("someEvent")]
</mx:Metadata>
3) inside marketingMain.mxml
<basicSearchCompany xmlns="*" someEvent="handleSomeEvent(event)" />
4) inside marketingMain.mxml write a function handleSomeEvent() that
handles the event emitted by basicSearchCompany - I'll leave this up to
you :)
Of course, the final piece is to have the basicSearchCompany component
emit the event (i.e. call dispatchCustomEvent() from inside
basicSearchCompany).
I Hope this gets you on the right track.
> PS: Do we know each other from CeBIt tis year?
Yes, we do :)
Dirk.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
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/