On 17 Jan 2008, at 14:44, Richard Gaskin wrote:

Dave wrote:
I always set the "Variable checking by default" preference on so that Local's have to be defined. This has been working fine for at least 6 months (when I installed this version on RunRev). Now today, I get an error on the following code:
function TestFunc
local myValue
put it into myValue
return empty
end testFunc
The problem is that it's complaining that the "it" is not defined!

Is that the full code for that handlers? Where is the value of "it" assigned?


Here's the full code for the function:

------------------------------------------------------------------
--
--  LibiPodTranslateField
--
------------------------------------------------------------------
function LibiPodTranslateField theFieldName,theFieldValue
  local myFieldValue

  put theFieldValue into myFieldValue
  switch theFieldName
  case "DateAdded"
  case "ModDate"
  case "PlayedDate"
  case "TrackSkippedDate"
    convert myFieldValue to long date and long time
    put it into myFieldValue

    break

  end switch

  return myFieldValue
end LibiPodTranslateField

After a bit of playing around, I discovered that if I change the code to use:


    convert 60 to long date and long time

Then it works, if I use:

    convert myFieldValue to long date and long time

Then I get the error. How can I pass a seconds value other than a literal???

Also, why, after getting the error can I no longer open the prefs dialog?

Thanks a lot
All the Best
Dave

--
 Richard Gaskin
 Managing Editor, revJournal
 _______________________________________________________
 Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to