More on 'there is a file it' returning false for files w/ non-Western European chars
Robert Sneidar
slylabs13 at mac.com
Tue Apr 15 17:40:22 EDT 2008
Oh I see now. Well I will bet it is the file system that is doing it.
I wonder if you create the file using Text Edit what would happen to
the name? What key sequences do you use to produce those characters? I
will try here.
Bob "SlimPikn" Sneidar
Hog Pilot Extraordinaire
On Apr 15, 2008, at 2:03 PM, Robert Sneidar wrote:
> I created an empty Revolution stack called äô.rev. I created another
> stack called bobtest. In the stack script of bobtest I put the
> following script:
>
> ON bobtest
> answer file "Please select a file..."
> put it into theFile
> IF theFile is empty THEN
> answer "The user cancelled." WITH "Darnitall!"
> END IF
> open stack theFile
> END bobtest
>
> This worked for me. The filename remains intact. The stack opens as
> it should.
>
> I noticed you are using open file it. I am not sure what kind of
> file you are trying to open. If it is a stack, that won't work. You
> have to use Open Stack. If it is a file, you have to tell the Finder
> to open the file. If you are trying to do low level file functions,
> then let's explore that.
>
> To write to a low level file you need to use the form "open file
> theFile for write". Like so:
>
> ON bobtest
> answer file "Please select a file..."
> put it into theFile
> IF theFile is empty THEN
> answer "The user cancelled." WITH "Darnitall!"
> END IF
> open file theFile FOR write
> write "This is a test." to file theFile
> close file theFile
> END bobtest
>
> Upon opening the file, I find the text, "This is a test." plain as
> day. So I am still unsure what you are having a problem with.
>
> Bob "SlimPikn" Sneidar
> Hog Pilot Extraordinaire
>
> On Apr 15, 2008, at 10:49 AM, Colin Holgate wrote:
>
>> At 10:41 AM -0700 4/15/08, Robert Sneidar wrote:
>>> Am I missing something here?
>>
>> Yes, you missed the part where you test your theory! I tried for a
>> while to find a solution, and couldn't find one. The issue is that
>> when you get the file that contains those odd characters, the
>> string is already wrecked. You can see the effect by doing this
>> (and pointing to a file with those odd characters in its name):
>>
>> answer file ""
>> open file it
>> close file it
>>
>> You'll now have a new file, that is the distorted variation of the
>> original filename. So for any case where you are asking the user to
>> pick a file, you're not going to have the path to that file, you'll
>> get a modified version of it.
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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