Bob,

I'm curious. Try this change and see what happens.

On Sep 27, 2006, at 4:37 PM, Robert Sneidar wrote:

Okay I went back and checked the permissions thing. I have read and write to it and I copied the file to my desktop to make sure. Permissions are not the issue. But I am getting empty when I read from the file now, whereas before "it" never changed when I read from a file. BTW I AM running code in a button that is part of a group that is a background. Possible issue?? Here is the updated code:

ON mouseUp
    answer file "Select the program file to import:" of type "F+PR"
    put it into mfilename
    IF mfilename is empty THEN exit mouseup

    put slyfilefrompath(mfilename) into mshortfile
    IF char -4 of mshortfile is "." THEN
        put char 1 to -5 of mshortfile into mmodule
    END IF

    IF there is a card (mmodule) THEN
        go card (mmodule)
    ELSE
        new card
        set the name of this card to tolower(mmodule)
    END IF

    -- Read from file method
   -- open file mfile

      open file mfile for read

    put the result into mres
    -- mres is empty here indicating a successful open
    read from file mfile at 1 until eof
    -- it is empty here!!!!! AAAAAGGGGKKKKKKKK!
    put it into field code
    close file mfile

    -- URL method
    -- put "file:" & mfilename into mfile
    -- put url mfile into field code

set the text of field "lblcode" to "Code: " & tolower (slyfilefrompath(mfilename))
END mouseUp


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to