Menu

#90 Frontier FSRef Migration 2 - file.delete - breaks script

v10.0 Mac OS X
open
5
2006-08-07
2006-08-02
Anonymous
No

Hi,

just tested the FSRef Migration 2 with my workflow - great to see long file
names.

I might have found a bug:

file.delete seems to break out of try block

The files are on a mounted image.

Regards

Tom
spivey@nureg.de

Discussion

  • Thomas Creedon

    Thomas Creedon - 2006-08-02

    Logged In: YES
    user_id=1464347

    Hello Tom,

    Is the image one created by Disk Utility and is it read/write?

    I just tried the following on a read/write image and it
    worked here...

    try {
    file.delete ( "Test Image:Untitled.txt" );
    speaker.beep ( )}

    The behavior you describe seems like you're working with a
    read only or compressed image.

    Could you add an else to your try and tell me the error
    returned? Something like...

    try {
    file.delete ( "Test Image:Untitled.txt" );
    speaker.beep ( )}
    else {
    scriptError ( tryError )}

    I tried this on a compressed image and got a write
    permission error, which is to be expected as it is locked.

    In the Finder could you bring up a Finder window for your
    disk image and look to see if there is a no write icon in
    the lower left corner of the window?

    Thank you for the bug report.

    Toodle-loooooooo.........
    creecode

     
  • Nobody/Anonymous

    Logged In: NO

    Hi Creecode,

    I works from Quickscript, however if I create a script like the following it
    breaks the whole script and no else block is executed...
    This also happens on other occasion, if an Applescript executed within
    Frontier returns values that Frontier doesn't like. Maybe the return value is
    not properly casted?

    local ( imagepath = "Scratch:image.jpg" )
    try
    file.delete( imagepath )
    else
    msg( tryerror )

    The disk image is read/write and I use it to create temporary image files that I
    import into FileMaker...
    The Frontier.root is from DP2...

    Cheers

    Tom

     
  • Thomas Creedon

    Thomas Creedon - 2006-08-03

    Logged In: YES
    user_id=1464347

    Hey Tom,

    I am unable to reproduce the problem you are having. I used
    the following script without error.

    local ( imagepath = "Scratch:image.jpg" );
    try {
    file.delete ( imagepath );
    speaker.beep ( )}
    else {
    msg ( tryError )}

    Scratch is a Disk Utility ( v10.5.6 ) created read/write image.

    I'm running Mac OS X v10.4.7 w/latest system updates. Power
    Mac G4 Dual 1 GHz. Frontier Developer Preview 2 and Frontier
    FSRef Migration Preview 2.

    Please tell me about your setup. If the disk image isn't to
    large perhaps you could send it to me and I could test with
    that image. Or perhaps you could create an image with just
    one picture that you have verified doesn't work and send
    that to me.

    The FSRef-ized version of the Frontier application that you
    are using, did you compile it yourself, or are you using an
    Frontier FSRef Migration Preview 2 that you downloaded from
    our website?

    Toodle-loooooooo.......
    creecode

     
  • Thomas Creedon

    Thomas Creedon - 2006-08-07
    • assigned_to: nobody --> creecode
    • summary: Re: Frontier FSRef Migration 2 - file.delete - breaks script --> Frontier FSRef Migration 2 - file.delete - breaks script
     
  • Thomas Creedon

    Thomas Creedon - 2006-08-09

    Logged In: YES
    user_id=1464347

    I have found an instance where file.delete breaks the script
    and I'm looking into it.

     

Log in to post a comment.

MongoDB Logo MongoDB