Home   Archive   Permalink



Debugging VID

Hi everyone! I wrote an encapped script back in 2005 when I was using MS Windows. I'm now using Linux, and I can't get the script to work. It encaps just without error message using enface, but when I try to run the program, I get this error message:
    
** Script Error: trans-date has no value
** Where: forskip
** Near: forall args [
     val: first args
     switch/default type?/word val [
         pair! [append pairs val]
         integer...
    
I've traced the error to this line of code:
    
style dater txt bold right [trans-date/text: copy (to-string now/date)] 48x24
    
Does anyone have any idea what is wrong?

posted by:   Louis       18-May-2014/17:42:16-7:00



Does it still work under Windows?

posted by:   Steven White       18-May-2014/21:43:07-7:00



Louis, you have a field or some other style in the same layout properly labeled as 'trans-date? This works for me:
    
view layout [
     trans-date: field
     style dater txt bold right [trans-date/text: copy (to-string now/date) show trans-date] 48x24    
     dater "asdf"
]
    
Have you tried 'set-face?
    
view layout [
     trans-date: field
     style dater txt bold right [set-face trans-date copy (to-string now/date)] 48x24    
     dater "asdf"
]

posted by:   Nick       18-May-2014/22:22:57-7:00



Steven, I'm not sure.
    
Nick, adding "trans-date: field" solved the problem. Many thanks!

posted by:   Louis       19-May-2014/4:58:06-7:00