OT: Rev's spread to the "dark continents"

Bob Warren bobwarren at howsoft.com
Sun Apr 23 18:43:39 EDT 2006


Bob Warren wrote:


 >> Also, there are inconsistencies between the way things work in Rev
 >> Windows and Rev Linux. For example, in Windows, when I imported an
 >> image, I found that the name assigned to the image box created by Rev
 >> actually included the HD path name as well as the file name of the
 >> picture (quite a long resulting name in some cases). In Linux, the same
 >> thing was a little more rational, employing only the actual imported
 >> file name (not including the HD path) to name the image box created.

------------------------------------------------
Chipp Walters wrote:

 >Bob,

I just tried this and didn't get the results you say.

Create a new stack and add a button to it. Set the script of the button to:

on mouseUp pMouseBtnNum
    --> CHOOSE AN IMAGE FILE
    answer file ""
    import paint from file it
    answer the name of last img
    pass mouseUp
end mouseUp

It correctly shows the name of the image as the filename, not the
filepath. Not sure what you're seeing, but I'm on WinXP.

------------------------------------------------
Thanks Chipp.

I've just checked this out and found the source of the problem. It 
happens when you use the Windows standard backslashes for the picture 
path rather than the Rev standard forward slashes.

For example, compare the effects of the following 2 button scripts:

on mouseUp
   put "G:\Denis Construction 0\0DSC00578.JPG" into HDPathToPicture$
   import paint from file HDPathToPicture$
   answer the name of last img
   pass mouseUp
end mouseUp

on mouseUp
   put "G:/Denis Construction 0/0DSC00579.JPG" into HDPathToPicture$
   import paint from file HDPathToPicture$
   answer the name of last img
   pass mouseUp
end mouseUp

In the first one, the imported picture is assigned the name
"G:\Denis Construction 0\0DSC00578.JPG".

In the second one, the imported picture is assigned the name
"0DSC00579.JPG".

Elucidated and logical!

Thanks again.

Regards,
Bob







More information about the use-livecode mailing list