Hello I want to send a message with a relative path as argument: self getClipart: 'fruits' / 'apples.png' It should look like that but it does not work of course. Then from getClipart method, it should be something like: getClipart: relativePath file := Platform clipartsPath / relativePath I don't understand how to do it. Thanks Hilaire -- Dr. Geo http://drgeo.eu
Hi Hilaire, You what is the Platform clipartsPath ? I am thinking that what you need is : FileSystem workingDirectory / 'fruits' / 'apples.pngâ something like that. Jannik On Jan 17, 2014, at 10:06 PM, Hilaire Fernandes <hilaire.fernandes@gmail.com> wrote:
Hello
I want to send a message with a relative path as argument:
self getClipart: 'fruits' / 'apples.png'
It should look like that but it does not work of course.
Then from getClipart method, it should be something like:
getClipart: relativePath
file := Platform clipartsPath / relativePath
I don't understand how to do it.
Thanks
Hilaire
-- Dr. Geo http://drgeo.eu
Le 17/01/2014 22:13, jannik.laval a écrit :
You what is the Platform clipartsPath ?
It is something like FileSystem disk workingDirectory parent / 'Cliparts
I am thinking that what you need is : FileSystem workingDirectory / 'fruits' / 'apples.pngâ
Yes but no, I want 'fruits' / 'apples.pngâ to be defined in another methods like, in a clean way: getApple self getClipart: 'fruits' / 'apples.pngâ -- Dr. Geo http://drgeo.eu
2014/1/17 Hilaire Fernandes <hilaire.fernandes@gmail.com>
Le 17/01/2014 22:13, jannik.laval a écrit :
You what is the Platform clipartsPath ?
It is something like FileSystem disk workingDirectory parent / 'Cliparts
I am thinking that what you need is : FileSystem workingDirectory / 'fruits' / 'apples.pngâ
Yes but no, I want 'fruits' / 'apples.pngâ to be defined in another methods like, in a clean way:
getApple self getClipart: 'fruits' / 'apples.pngâ
-- Dr. Geo http://drgeo.eu
hi, you can create a relative path with Path class>>* p:=Path * 'fruits' / 'apples.png'. If you want to create an absolute path or the full filename you need a FileReference for that directory and call #resolve: (for example wit hth current directory) FileSystem workingDirectory resolve:p regards Nicolai Hess
Le 17/01/2014 23:41, Nicolai Hess a écrit :
you can create a relative path with Path class>>*
p:=Path * 'fruits' / 'apples.png'.
Thanks Nicolai, I was trying this one but struggle to use it to later get the full path. Your mention to the #resolve: messages makes it clear now. Hilaire -- Dr. Geo http://drgeo.eu
participants (3)
-
Hilaire Fernandes -
jannik.laval -
Nicolai Hess