If you're writing an app with multiple components, you need a clear
understanding of how each component will reference the others. For
example, if you write
 
    <Application>
        <SearchView id="searchView"/>
        ...
    </Application>
 
then in the Application script you can refer to searchView to get the
SearchView instance and in the SearchView script you can refer to
parentDocument or application to get the Application instance.
 
If your searchView script has code like
 
    private var filter:SearchViewFilter;
 
    private someMethod():void
    {
        ...
        filter = new SearchViewFilter();
        ...
    }
 
then your searchView can access the SearchViewFilter instance as
'filter'. However, you don't have a back reference from the
SearchViewFilter instance to the SearchView unless you do somethign like
pass 'this' in the constructor and store it.
 
- Gordon

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 11:52 AM
To: [email protected]
Subject: Re: [flexcoders] newbie



I have two pages. The first is the main. In the main I load my  xml data
as follows using Httpservice. I pass this data to the second page as
follows: 
<SearchView id="searchView" label="Search"  accommodations="{accoms}" />
// accommodations has been declared publicly in SearchView.mxml and
accoms is the variable that was used to accept data sent by httpservice.
Once the data is passed, I display in the datagrid. All is fine at this
stage.
 
My second step was to attempt to filter the data in the datagrid and
this is where my trouble began. I have two actionscript files one is for
carrying out the filtering and the other is for the filterEvent. oh by
the way there is yet another actionscript file which is essentially the
class file for accommodations.  At this point, the following sequence of
events can take place:

*       a click on a checkbox calls a func! tion dispatchFilter 
*       the dispatch filter creates an instance of class filterevent and
dispatches the event 
*       the dispatched event takes as its parameter instance of the
filter class and thus reviews what has been checked or unchecked..

I tried using a get function but a while I realised that I miss
something relating to passing data between components.

Tom Chiverton <[EMAIL PROTECTED]> wrote:

        On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
        > I am sorry no code is included. I really didn't know which
part to
        > include.
        
        Be specific, and try one part at a time.
        What have your tried ? Why didn't it work ?
        
        -- 
        Tom Chiverton
        Helping to widespreadedly accelerate eigth-generation
infrastructures
        on: http://thefalken.livejournal.com
        
        ****************************************************
        
        This email is sent for and on behalf of Halliwells LLP.
        
        Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2 2JF. A
list of members is available for inspection at the registered office.
Any reference to a partner in relation to Halliwells LLP means a member
of Halliwells LLP. Regulated by the Law Society.
        
        CONFIDENTIALITY
        
        This email is intended only for the use of the addressee named
above and may be confidential or legally privileged. If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells LLP
or the addressee of its existence or contents. If you have received this
email in error pleas! e delete it and notify Halliwells LLP IT
Department on 0870 365 8008.
        
        For more information about Halliwells LLP visit
www.halliwells.com.
        
        
        
        --
        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
        
        
        
        http://docs.yahoo.com/info/terms/
        
        


________________________________

For ideas on reducing your carbon footprint visit Yahoo! For Good
<http://uk.promotions.yahoo.com/forgood/environment.html>  this month. 

 

Reply via email to