Decompress and different platforms

Tim tim11 at bellatlantic.net
Sat Jan 26 02:35:01 EST 2002


Hi,

One way I share one revo project between 2 platforms (PC and Mac) is by
having the shell stack (the stack that opens the real modifiable stack)
compress and ftp the stack that gets modified to a server. Then the same
shell stack on a different platform downloads the modified stack and does
the same thing. The script looks something like this:

-- Script in the shell stack

on preOpenStack
  get the platform
  if it is "MacOS" then
    put "PowerBookHD/Revolution Projects/someProject.rev" into tLocalFile
  else
    put "C:/Documents and Settings/Administrator/Desktop/someProject.rev"
into tLocalFile
  end if
  set the cursor to busy
  put URL 
"ftp://username:password@ftp.ispname.com/www/somefolder/someProject.rev"
into tRemoteFile
  put decompress(tRemoteFile) into URL tLocalFile
  toplevel stack tLocalFile
end preOpenStack


--Script in the ³Close² button of the modifiable stack that gets uploaded

on mouseUp
  get the platform
  if it is "MacOS" then
    put "PowerBookHD/Revolution Projects/someProject.rev" into tLocalFile
  else
    put "C:/Documents and Settings/Administrator/Desktop/someProject.rev"
into tLocalFile
  end if
  set the cursor to busy
  save stack "someProject.rev"
 put compress(tLocalFile) into URL
"ftp://username:password@ftp.ispname.com/www/somefolder/someProject.rev"
  close stack "someProject.rev"
end mouseUp

--End of Tip--

Now, everything worked fine until I tried it under OS X. Now when I open the
shell stack and it tries to download and decompress someProject.rev, I get
the following error message:

Error description: decompress: string is not compressed data

SomeProject.rev does not open. While compressing it and uploading is no
problem. I should add that both comression/decompression work fine under
W2K. The problem is only under OS X. Anyone have any thoughts?

TIA,
-- 
Tim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20020126/e72aff16/attachment.html>


More information about the use-livecode mailing list