nseslo ---> lesson (='.'=)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: nseslo ---> lesson (='.'=)
Actually, I did just think of a possible solution. Since it works for Klaus on the Mac, and Linux says the information is not compressed, perhaps Klaus would decompress the cust. prop. to a text file, and we could alter the code to just read it from there (assuming of course that this is the actual problem, I'm betting it is).
Re: nseslo ---> lesson (='.'=)
Dear friends!
That many colored petals of fragrant flowers fall on you!
I started from the analysis of Bogs and its code.
And in fact the list of words that I expected, is loaded as in the picture that I attach.
So it seems that in fact the word list is stored inside the stack in a compressed manner, but Windows can not decompress it correctly. Instead the Mac (Klaus) seems to have no problems).
Now, Klaus, which opens and uses the stack without problems, can it make a port for Win bypassing the decompression problem? Maybe by providing us with a list of words in an external txt?
And then a question to increase my LC culture.
But inside the stack where this list (uAllWords) is kept?
I do not see this variable in the variable list!
How do I "hide" a compressed text file inside the stack and how can you recall it?
Sorry, maybe it's something stupid !!!!
Grazie a tutti gentili signori!
(='.'=)
That many colored petals of fragrant flowers fall on you!
I started from the analysis of Bogs and its code.
And in fact the list of words that I expected, is loaded as in the picture that I attach.
So it seems that in fact the word list is stored inside the stack in a compressed manner, but Windows can not decompress it correctly. Instead the Mac (Klaus) seems to have no problems).
Now, Klaus, which opens and uses the stack without problems, can it make a port for Win bypassing the decompression problem? Maybe by providing us with a list of words in an external txt?
And then a question to increase my LC culture.
But inside the stack where this list (uAllWords) is kept?
I do not see this variable in the variable list!
How do I "hide" a compressed text file inside the stack and how can you recall it?
Sorry, maybe it's something stupid !!!!
Grazie a tutti gentili signori!
(='.'=)
"I'm back" - The Cyberdyne Systems Model 101 Series 800 Terminator
Re: nseslo ---> lesson (='.'=)
Hi friends,
I put a TXT file of the uncompressed wordlist into my dropbox (2.7 MB):
https://www.dropbox.com/s/b7lcyqsd8sazx ... w.txt?dl=0
Will delete it again later this evening (it is 4:15 PM over here in germany)...
Best
Klaus
I put a TXT file of the uncompressed wordlist into my dropbox (2.7 MB):
https://www.dropbox.com/s/b7lcyqsd8sazx ... w.txt?dl=0
Will delete it again later this evening (it is 4:15 PM over here in germany)...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Re: nseslo ---> lesson (='.'=)
Hi All,
Looks like the original author uses a zip file format (sit/stuffit) that is automatically known by LC/Mac because there is no "uncompress" code" that I can see.
Lagi
Looks like the original author uses a zip file format (sit/stuffit) that is automatically known by LC/Mac because there is no "uncompress" code" that I can see.
Lagi
Re: nseslo ---> lesson (='.'=)
Hi Lagi,
nope, see here, it is called "decompress":
Not sure, but i think LC uses GZ for its de-/compress routines.
Best
Klaus
nope, see here, it is called "decompress":
Code: Select all
on preOpenCard
-- Fetch the compressed list of words and decompress it
local tWords
put decompress(the uAllWords of this stack) into tWords
...
Best
Klaus
Re: nseslo ---> lesson (='.'=)
That makes sense Lagi. Thanks for the plain text, Klaus!
Decompress through Lc didn't work on non-Macs most likely due to this (was the first thing I tried), but it *did* work on Klaus's mac of course.
It is in a custom property, as seen here IF I knew exactly how it was compressed, I would have given it a run through unar, but without knowing which extension to use, I'd only be guessing at the result. Klaus has graciously remedied this issue for us
You don't have to hide it, I suspect it was compressed simply to reduce the size. If you study the lines of the preOpenCard handler, the author is simply decompressing the contents of the custom property into the tWords variable.How do I "hide" a compressed text file inside the stack and how can you recall it?
Sorry, maybe it's something stupid !!!!
Decompress through Lc didn't work on non-Macs most likely due to this (was the first thing I tried), but it *did* work on Klaus's mac of course.
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Re: nseslo ---> lesson (='.'=)
Hi Klaus,
I was looking for something like unZip or unArc or unSit so we could tell what they used. Windows has built in Zip support so should uncompresss GZip - but obviously not. Linux certainly should.
Lagi
I was looking for something like unZip or unArc or unSit so we could tell what they used. Windows has built in Zip support so should uncompresss GZip - but obviously not. Linux certainly should.
Lagi
Re: nseslo ---> lesson (='.'=)
GZip is built into LC -> de-/compress!
So it should work on all platforms, if does not, then it is a bug!
So it should work on all platforms, if does not, then it is a bug!
Re: nseslo ---> lesson (='.'=)
Gz would work if it had been initially compressed anywhere but on a Mac heh. On linux, .sit can be unzipped with unar. I don't know of a windows equivalent, sorry.
On to the fun!
1. download Klaus's file
2. save it as whatever you want, I used 'wordFinder.text"
3. modify the line in preOpenCard from 'decompress' to
4. the file path has to be added. If your in the IDE, you can paste it to documents which I believe is the default folder, otherwise set up the path for the URL command.
Alternately, you can create a different custom property and put the text from the file in that, or stuff it in a field that is hidden, or etc etc etc. For me, the text file worked just fine.
On to the fun!
1. download Klaus's file
2. save it as whatever you want, I used 'wordFinder.text"
3. modify the line in preOpenCard from 'decompress' to
Code: Select all
put url("file:wordFinder.text") into tWords
Alternately, you can create a different custom property and put the text from the file in that, or stuff it in a field that is hidden, or etc etc etc. For me, the text file worked just fine.
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: nseslo ---> lesson (='.'=)
It was compressed using the built-in "compress" function in LC:
However, it's non-compliant somehow. I saved the custom property to a file on disk, and tried to open it in BBEdit, which auto-extracts compressed files. BBEdit threw an error. But it does decompress fine in LC on my Mac just as it did for Klaus.
Code: Select all
on preOpenCard
-- Fetch the compressed list of words and decompress it
local tWords
put decompress(the uAllWords of this stack) into tWords
put compress(tWords) into tGZ
get tGZ = the uAllWords of this stack -- TRUE
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: nseslo ---> lesson (='.'=)
Does BBEdit handle gzip, or just Zip?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: nseslo ---> lesson (='.'=)
Since the uAllWord has surely been compressed inside of LC with teh compress command LC,
then we have a bug here. LC (Mac) should be compatible with LC (Win), right?
Anyone created a bugreport?
then we have a bug here. LC (Mac) should be compatible with LC (Win), right?
Anyone created a bugreport?
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: nseslo ---> lesson (='.'=)
I would if I could reproduce it. I use LC-generated gzip files regularly in Mac, Win, and Linux, and have always been able to open them with other gzip-savvy apps.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: nseslo ---> lesson (='.'=)
So you could open that namely stack without problems on Windows?
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: nseslo ---> lesson (='.'=)
Hadn't tried it. I'd only tried what I'd written.
Since then I hunted back in this thread to find the stack, and it opens but the compressed data does appear to be corrupted.
To clarify, if the bug report is against LC's gzip functionality, I can't reproduce that.
If the report is against the that one property in the tutorial stack, I can reproduce that.
Since then I hunted back in this thread to find the stack, and it opens but the compressed data does appear to be corrupted.
To clarify, if the bug report is against LC's gzip functionality, I can't reproduce that.
If the report is against the that one property in the tutorial stack, I can reproduce that.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn