Imagesfiles in Squeak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Imagesfiles in Squeak

Rob Van Pamel

Hello

 

If i want to use some images to embed them into my application.

            (Form fromFileNamed: 'test.jpg') asMorph openInWorld

 

This works, but how can I specify that he searches in a subdirectory. I don’t want to use an absolute path but a relative path.

 

Thanx in advantage

  Rob Van Pamel


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Imagesfiles in Squeak

cdavidshaffer
Rob Van Pamel wrote:

>
> Hello
>
> If i want to use some images to embed them into my application.
>
> (Form fromFileNamed: 'test.jpg') asMorph openInWorld
>
> This works, but how can I specify that he searches in a subdirectory.
> I don’t want to use an absolute path but a relative path.
>
> Thanx in advantage
>
> Rob Van Pamel
>
Rob,

Did you try:

(Form fromFileNamed: 'subdir/test.jpg') asMorph openInWorld

??? It works fine for me and the directory name is interpreted relative
to the image directory.

David


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

RE: Imagesfiles in Squeak

Rob Van Pamel
Yes i've tried that but he tells me the following

        subdir#test.jpg does not exist.

I've checked the case sensitivity from the folder but it is exactly the
same. Do i have to escape the / sign? Because he looks in "subdir#test.jpg"
I am working on a Windows Xp PC

Thanks for the advage


-----Oorspronkelijk bericht-----
Van: [hidden email]
[mailto:[hidden email]] Namens David Shaffer
Verzonden: donderdag 3 mei 2007 20:25
Aan: A friendly place to get answers to even the most basic questions about
Squeak.
Onderwerp: Re: [Newbies]Imagesfiles in Squeak

Rob Van Pamel wrote:

>
> Hello
>
> If i want to use some images to embed them into my application.
>
> (Form fromFileNamed: 'test.jpg') asMorph openInWorld
>
> This works, but how can I specify that he searches in a subdirectory.
> I don't want to use an absolute path but a relative path.
>
> Thanx in advantage
>
> Rob Van Pamel
>
Rob,

Did you try:

(Form fromFileNamed: 'subdir/test.jpg') asMorph openInWorld

??? It works fine for me and the directory name is interpreted relative
to the image directory.

David


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

RE: Imagesfiles in Squeak

Göran Krampe
Hi!

> Yes i've tried that but he tells me the following
>
> subdir#test.jpg does not exist.
>
> I've checked the case sensitivity from the folder but it is exactly the
> same. Do i have to escape the / sign? Because he looks in
> "subdir#test.jpg"
> I am working on a Windows Xp PC

Try using \ (win32 separator) instead of / (unix separator) or even better:

(Form fromFileNamed: 'subdir', FileDirectory slash, 'swiki.gif') asMorph
openInWorld

regards, Göran

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

RE: Imagesfiles in Squeak

Rob Van Pamel
Hey

Thanks you. The FileDirectory slash did it! Thanks a lot. But I was
searching also to shrink my image. To set my height and width by extent but
it doesn't work...

Greetz
  Rob

-----Oorspronkelijk bericht-----
Van: [hidden email]
[mailto:[hidden email]] Namens Göran Krampe
Verzonden: vrijdag 4 mei 2007 15:15
Aan: A friendly place to get answers to even the most basic questions about
Squeak.
Onderwerp: RE: [Newbies]Imagesfiles in Squeak

Hi!

> Yes i've tried that but he tells me the following
>
> subdir#test.jpg does not exist.
>
> I've checked the case sensitivity from the folder but it is exactly the
> same. Do i have to escape the / sign? Because he looks in
> "subdir#test.jpg"
> I am working on a Windows Xp PC

Try using \ (win32 separator) instead of / (unix separator) or even better:

(Form fromFileNamed: 'subdir', FileDirectory slash, 'swiki.gif') asMorph
openInWorld

regards, Göran

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners