Hi Dirk,
 
Thanks for the suggestion, I hadn't thought of that, but it didn't work when I tried it. So I tried just
 
dg.getColumnAt( 0 ).labelFunction = dgVH.labelFunc;
 
and this did work. Its a big improvement over wrapping external class functions with a function!
 
But what I was originally trying to do was set the labelfunction in the MXML which was giving the error I described. I also tried your suggestion here, but this didn't work either.
 
Thanks for your pointer,
 
Regards,
Simon Fifield
 
-----Original Message-----
From: Dirk Eismann [mailto:[EMAIL PROTECTED]
Sent: 30 March 2005 15:05
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] LabelFunctions and SortFunctions

Have you tried using the mx.utils.Delegate class?

  myGrid.getColumnAt(0).labelFunction = mx.utils.Delegate.create(anotherClassInstance, anotherFunction);

haven't tested it, but it should work.

Dirk.

-----Original Message-----
From: Simon Fifield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 4:03 PM
To: [EMAIL PROTECTED] Com
Subject: [flexcoders] LabelFunctions and SortFunctions


At the moment a labelFunction or sortFunction has to be defined in the MXML file that it is being used in.

It would be nice to be able to use an external Class to achieve this and thus enhance code clarity and re-use.

Does anyone have any ideas on this?

Kind Regards,

Simon Fifield


Yahoo! Groups Sponsor
ADVERTISEMENT






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 the Yahoo! Terms of Service.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to