[flexcoders] Re: Call function from itemrenderer?

2007-09-05 Thread big_mad_kev
I've currently go this issue too, but I have the following:


mx:DataGridColumn width=75   headerText=Header
itemRenderer=itemRenderers.columnRenderer/

And thus have a folder called itemRenderers with a MXML Component
columnRenderer. From this component how do a call a function in the
main part where the datagrid is?

I have tried outerDocument but Flex Builder shows an error.

All the MXML Component has is:

mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; 
horizontalScrollPolicy=off verticalScrollPolicy=off
mx:Text text={data.columnData} fontSize=10 width=100%
height=100% textAlign=center click=outerDocument.appFunction()/
/mx:VBox

I get two errors:

1180: Call to a possibly undefined method appFunction. columnRenderer.mxml
1120: Access of undefined property outerDocument. columnRenderer.mxml

All Help Appreciated

Kev.


--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:

 That's not a function call, and if enter=myfunction() doesn't
compile then enter=myfunction shouldn't either.
  
 If myfunction() is a method of the component or application that
contains the DataGrid, then you want
enter=outerDocument.myfunction(). Without outerDocument, you're
calling a method on the mx:Component that defines the item renderer.
  
 - Gordon




[flexcoders] Calling View Stats of one component from another

2006-10-12 Thread big_mad_kev
Hi,

Is it possible from one component to change the view state of another
component in the same main page i.e:

App
comp:comp1
//I want an event in comp2 to change the view state of comp1
comp:comp2
/App

Not sure if this is doable

TIA

Kev




--
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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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/