binfile and custom properties
ambassador at fourthworld.com
Mon Apr 14 17:46:01 CDT 2003
Roger.E.Eller at sealedair.com wrote:
> This is my first attempt at using custom properties, but I have read on the
> list that it is possible to store binary data this way. I think it is
> partialy working, but is not being saved as a component of the stack. I
> want to do this so my app can be self-contained (no external files). Here
> is my script:
> on mouseUp
> put "C:/PDF_Files/masterForm.pdf" into masterPDFpath
> put URL ("binfile:"&masterPDFpath) into masterPDFvariable
> set the customPropertySet of stack "myStack" to myPDFs
> set the customProperties of stack "myStack" to myPDFs
> put masterPDFvariable into myPDFs[masterPDFform]
> save this stack
> answer myPDFs[masterPDFform]
> end mouseUp
> "answer myPDFs[masterPDFform]" returns the binary data the first time
> through, but if I comment out all but the last line (the answer command),
> it returns nothing even though I save the stack after putting the data into
> a custom property. Do you see what I am doing wrong? Thanks for any help.
If I read that correctly, the last line of your script is showing an array
_variable_, not the value you set in the stack.
set the uPDFs[masterPDFform] of stack "MyStack" \
to URL ("binfile:"C:/PDF_Files/masterForm.pdf)
save stack "MyStack"
answer the uPDFs[masterPDFform] of stack "MyStack"
Where is masterPDFform defined? Is that a literal?
Fourth World Media Corporation
Developer of WebMerge 2.2: Publish any database on any site
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the use-livecode