unpacking

Jim Ault JimAultWins at yahoo.com
Sun Mar 2 00:54:00 EST 2008


First, use the stack inspector to confirm that your property is indeed the
value you think it is.

Do this by opening the stack inspector, then choose the "custom properties"
drop down.  Now inspect the values:

set the jDate of this stack to "99/88/77"

then 
put the jDate of this stack into tJournal

By the way, why would you be doing....
>     delete char 1 of jDate -- j
>     convert jDate to long date
>     answer "Sorry, there's no journal for" && jDate &"."

since jDate is the name of the custom property and contains no data itself,
and why would you want to delete char 1 of jDate?

Hope this helps

Jim Ault
Las Vegas


On 3/1/08 9:32 PM, "Paul Foraker" <wfsmail at gmail.com> wrote:

> I'm building a stack that is a data entry app for a daily journal. Once the
> day's entries have been posted (emailed to myself), I want to store them in
> the stack. I came up with a scheme of prepending "j" to the seconds
> representing the day and using that as the name of a custom property. No
> problem storing that. When I retrieve it in a script, however, it's always
> empty.
> 
> on unpackTheData jDate -- in seconds
>   put "j" before jDate
>   put empty into tJournal
>   put the jDate of this stack into tJournal
>   -- do "put the" && jDate && "of this stack into" && tJournal -- didn't
> work
>   put the jDate of this stack into tJournal
>   if tJournal is empty then
>     delete char 1 of jDate -- j
>     convert jDate to long date
>     answer "Sorry, there's no journal for" && jDate &"."
>     exit to top
>   end if
>   -- ...
> end unpackTheData
> 
> I'm passing the seconds for a date I know exists, and I can execute code
> similar to the above in the Message Box and it works fine. In the script,
> however, tJournal is always empty.
> 
> I thought maybe it was a data-typing error, but this works in the Message
> Box:
> 
> put empty into tJournal
> put "2/29/08" into jdate
> convert jDate to seconds
> put "j" before jDate
> put the jdate of this stack into tJournal
> put tJournal
> 
> Any suggestions?
> 
> Thanks,
> 
> -- Paul
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the Use-livecode mailing list