Adobe Dreamweaver Forums



Last 10 THreads :         problems linking PDFs (Last Post : Alan - Replies : 1 - Views : 2 )           »          Changing RadioButton Label (Last Post : justintoflex - Replies : 2 - Views : 5 )           »          Table Borders MIssing in JavaHelp (Last Post : soxmann - Replies : 3 - Views : 8 )           »          Clock .getUTC not working (Last Post : bolszo - Replies : 2 - Views : 3 )           »          cfimage error (Last Post : masoud_amen - Replies : 2 - Views : 3 )           »          Dragging components (Last Post : hsfrey - Replies : 2 - Views : 4 )           »          Is file too large? (Last Post : tweaked_eye - Replies : 0 - Views : 1 )           »          Could not find the included template (Last Post : azuro28 - Replies : 2 - Views : 3 )           »          flash loader reappears after movie plays (Last Post : lyshamo - Replies : 3 - Views : 4 )           »          How to turn IMAGE into MOVIECLIP??? (Last Post : Snufferson - Replies : 7 - Views : 8 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-24-2008, 12:03 PM
nikos101
 
Posts: n/a
Diggs:
Default Is it possible to refer label functions to a functioncontained in a class

Is it possible to refer label functions to a function contained in a class. eg

labelFunction = myClass.formatFunction

This would save me repeating code.


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-25-2008, 04:02 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Is it possible to refer label functions to a function contained in a class


"nikos101" <webforumsuser@macromedia.com> wrote in message
news:gge4nd$h5v$1@forums.macromedia.com...
> Is it possible to refer label functions to a function contained in a
> class. eg
>
> labelFunction = myClass.formatFunction
>
> This would save me repeating code.


Yes, but you might want to consider just creating a custom toString().

HTH;

Amy


Reply With Quote
  #3 (permalink)  
Old 12-11-2008, 05:42 PM
nikos101
 
Posts: n/a
Diggs:
Default Re: Is it possible to refer label functions to afunction contained in a class

As my applications grow I'm finding it more and more appealing to starting
moving my common funcitons into classes, functions like this for example:

private function dateFilterFunction(item:Object):Boolean
{
var t:Boolean = false;
if(item.valueDate.time >=slider.values[0] && item.valueDate.time
<=slider.values[1]){
t = true;
}
return t;

}

Can Other developers share their experiances of doing things this way please
;-)

Reply With Quote


  #4 (permalink)  
Old 12-11-2008, 07:23 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Is it possible to refer label functions to a function contained in a class


"nikos101" <webforumsuser@macromedia.com> wrote in message
news:ghrj6p$m8l$1@forums.macromedia.com...
> As my applications grow I'm finding it more and more appealing to starting
> moving my common funcitons into classes, functions like this for example:
>
> private function dateFilterFunction(item:Object):Boolean
> {
> var t:Boolean = false;
> if(item.valueDate.time >=slider.values[0] && item.valueDate.time
> <=slider.values[1]){
> t = true;
> }
> return t;
>
> }
>
> Can Other developers share their experiances of doing things this way
> please
> ;-)


I don't see where that makes sense as a class method. Could you provide
more details about how you're using this?


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:53 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk