unpacking

Paul Foraker paul at whitefeather.com
Sun Mar 2 01:34:48 EST 2008


Problem solved, but I don't know why.

If I pass jDate with the "j" already prepended, it works.

-- Paul


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



More information about the Use-livecode mailing list