Hi Igor,

Thanks for your answer.

As far as I understand the function, it gets one parameter passed in 
(secs in the function). The error is in the DataGridCollumn, there it's 
complaining, that it can not find the length_seconds value, although it 
is included in the XML, that gets retrieved. Must I first read out the 
value and then pass it? Or is my solution not usable in a 
DataGridCollumn? How can I access the value? perhaps by using 
video.length_seconds? (video is the xml returned).

Thanks for your answer and best regards,


Pascal

Igor Costa wrote:
>
> you are trying to access a undefined variable in my concern you didn't 
> have in your function the lengh_seconds but also just secs.
>
>
> Regards
>
> On 11/3/06, * Pascal Schrafl* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi all,
>
>     I have a DataGridCollumn where I display the time in Seconds (i.e.
>     77).
>     I would like to convert the diplayed time into minutes and seconds.
>
>     I have a function, that converts the seconds into minutes and
>     seconds,
>     i.e. 1:17 The function is named secondsToMinuteString.
>
>     Here's the code:
>
>     private function secondsToMinuteString(secs:Number):String
>     {
>     if (isNaN(secs) == false) {
>     var m:Number = Math.floor(secs / 60);
>     var s:Number = secs - (m * 60);
>     var r:String = m + ":";
>     if (s < 10) {
>     r += "0";
>     }
>     return r + s;
>     }
>     return "";
>     }
>
>     I now try to seconds of the DataGridCollumn, by using this approach:
>
>     <mx:DataGridCollumn headerText="Duration" dataField="length_seconds"
>     labelFunction="secondsToMinuteString(length_seconds)" />
>
>     I try to pass the value, that is received to the function, and
>     then it
>     shall be displayed. This doesn't work, as I get a cast error (Error
>     #1067) and an access of undefined property length_seconds error
>     (Error
>     #1120). Can anyone tell me, how I can convert this correctly?
>
>     I am still seeking for a Flex Developer, who could assist me. If
>     you are
>     interested, please let me know by private email.
>
>     Thanks a lot for your answers.
>
>     Best regards,
>
>     Pascal
>
>
>
>  



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

Reply via email to