still having a problem with path or filename from 2.8 to 2.9

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Apr 23 06:36:34 EDT 2008


Tiemo,

I had a look at your stack, pressed the Select Picture button, but  
didn't choose any picture because this is too cumbersome a way to do  
such a task.

Why don't you simply use the answer file command?

Looking at your script, I noticed that you don't set the default  
folder and you don't check whether the file actually exists.

The following script works perfectly fine for me on my Mac:

on mouseUp
   answer file "" with type "PNG|png|PNGf" or type "GIF|gif|GIFf" or  
type "JPEG|jpg|JPEG"
   if it is not empty then set the filename of img 1 to it
   put it
end mouseUp

Above script still works fine in a standalone.

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

A large collection of scripts for HyperCard, Revolution, SuperCard and  
other programming languages can be found at http://runrev.info




On 23 apr 2008, at 12:12, Tiemo Hollmann TB wrote:

> Hello,
>
> First thank you Sarah for your comment.
>
> Actually my problem is setting the filename to image, which worked  
> with 2.8,
> but doesn't works anymore on 2.9 on Mac in an existing program without
> having changed anything. On Mac the image is still empty after  
> setting the
> filename. My first thought was, that setting the path to the file  
> was going
> wrong, but as it appears, that is working ok. The next relevant  
> statement is
> setting the filename to the image, where I have used
>
> set the filename of img "img1" to tPic
>
> could here has something changed in 2.9? I have seen in the docs  
> that it
> actually should be coded with "image" instead of "img". Could this  
> be the
> problem in 2.9?
>
> I have put a small test stack in my revonline space (Tiemo) for any  
> body who
> could do a little test for me on a Mac ( I still don't have a Mac to  
> test)
> Any comments are highly appreciated!
>
> Perhaps the problem even doesn't occur, when you will test it on Mac  
> In the
> IDE. Perhaps only when compiled on windows and run under Mac? I  
> really don't
> know, where my problem is located.
>
> Thank you
>
> Tiemo





More information about the use-livecode mailing list