DOH! Sorry about that... assumptions can get you every time!

 

Thanks, I just pulled that up in livedocs; I'll read more about it now.

 

 Regards,

  Scott

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Tuesday, July 15, 2008 2:08 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Accessing public function from a
different mxml

 

This may be the time to learn about the singleton pattern/class if you
are not familiar with it.  I "discovered" its benefits only recently,
and it is quite simple to implement and very, very convenient.  I know
there are several examples in the archives.

 

I am a guy, by the way.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott
Sent: Tuesday, July 15, 2008 2:13 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Accessing public function from a different
mxml

 

I'm working on the same issue right now and have been for a few days
now.

 

In all my different iterations of code I believe what Tracy is saying is
probably the best way to go.  She also said basically the same thing to
me.

 

Either set up an Application.application or a data model (which is what
I'm doing).  Either can be bindable so that you can trigger events in
the other objects based on data changing.

 

  sj

 

________________________________

From: flexcoders@yahoogroups.com on behalf of Tracy Spratt
Sent: Tue 7/15/2008 12:22 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Accessing public function from a
different mxml

Work expressions like this one step at at time.

 

Also, Application.application will resolve to the top-level application,
which might ease the expression.

 

Events are also a good way to effect change in distant components.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sid Maskit
Sent: Tuesday, July 15, 2008 3:40 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Accessing public function from a different
mxml

 

I can't say that I fully understand the distinction between the two, but
I have found that sometimes this.parentDocument works better than
this.parent

Hope that helps,

Sid

 

----- Original Message ----
From: andrewedwards39 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, July 14, 2008 7:54:53 PM
Subject: [flexcoders] Accessing public function from a different mxml

Hello all,

I have a public function in an mxml document (lets call it a.mxml, and
pubfunction ) and I want to access it from another MXML.

this is what I am trying (based on my old as2 knowledge :)

this.parent. parent.a. pubfunction( );

where the mxml calling 'a' is two levels below 'a's parent.

this is not working, so I was wondering if anyone had any tips?

cheers

andrew

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 

Reply via email to