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

Tiemo Hollmann TB toolbook at kestner.de
Wed Apr 23 07:41:34 EDT 2008


Hi Mark and Eric,
thank you for your quick response.
Sorry, I should have explained, that this example stack is just a quick and
dirty test stack, because the real stack has too much other stuff included,
so I just wanted to reduce to the two or three relevant statements (setting
the path and setting the filename). In the real stack there isn't any ask to
the user, all files are included in my app and the path is hard wired...
Thanks
Tiemo


> -----Ursprüngliche Nachricht-----
> Von: use-revolution-bounces at lists.runrev.com [mailto:use-revolution-
> bounces at lists.runrev.com] Im Auftrag von Eric Chatonet
> Gesendet: Mittwoch, 23. April 2008 12:40
> An: How to use Revolution
> Betreff: Re: still having a problem with path or filename from 2.8 to 2.9
> 
> Bonjour Thiemo,
> 
> I had a quick look at your stack:
> 
> on mouseUp pMouseBtnNo
>      global myPic
>      ask "name of image file? (with suffix)" with myPic
>      put it into myPic
>      put the defaultfolder into tPathDef
> 
>      answer "image in defaultfolder or in subfolder pics?" with
> "pics" or "defaultfolder"
>      if it is "pics" then
>          put tPathDef & "/pics/" & myPic into tPic
>      else
>          put tPathDef & "/" & myPic into tPic
>      end if
> 
>      answer "set the filename of img or image" with "img" or "image"
>      lock screen
>      if it is "image" then
>          set the filename of image "img1" to tPic
>          set the height of image "img1" to 200
>          set the width of image "img1" to 200
>      else
>          set the filename of img "img1" to tPic
>          set the height of img "img1" to 200
>          set the width of img "img1" to 200
>      end if
>      unlock screen
> end mouseUp
> 
> This works using 2.9 on Mac but you don't ensure the process:
> . What happens if the user says OK in the ask dialog but letting it
> empty?
> . Is the current defaultFolder the expected one?
> . Does the file exists?
> etc.
> 
> In addition, from an ergonomic point of view, I would say it's not
> perfect ;-)
> In short why don't you use something like:
> 
> answer file "Choose an image:" with type "JPEG|jpg|JPEG" or type "PNG|
> png|PNGf"
> if it  = empty then return "Cancel"
> set the filename of img "img1" to it
> set the height of img "img1" to 200
> set the width of img "img1" to 200
> 
> Le 23 avr. 08 à 12:12, Tiemo Hollmann TB a écrit :
> 
> > 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
> 
> _______________________________________________
> 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