SmalltalkImage>>#imageName

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

SmalltalkImage>>#imageName

Sean P. DeNigris
Administrator
After a brief IRC chat, it seems like returning just the file base (i.e. without the extension). Any objections before I open an issue?

SeanDeNigris_: I found it surprising that `Smalltalk imageName` returns the full path. Just me?
[11:34am] maxleske: ++
[11:43am] SeanDeNigris_: Worth an issue? Only sender seems to be Spotter
[11:49am] DamienCassou: all these little things are annoying. So, +1 to create an issue
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage>>#imageName

Peter Uhnak
+1

Only sender seems to be Spotter
Its quite useful for startup scripts.

On Fri, Apr 24, 2015 at 6:23 PM, Sean P. DeNigris <[hidden email]> wrote:
After a brief IRC chat, it seems like returning just the file base (i.e.
without the extension). Any objections before I open an issue?

SeanDeNigris_: I found it surprising that `Smalltalk imageName` returns the
full path. Just me?
[11:34am] maxleske: ++
[11:43am] SeanDeNigris_: Worth an issue? Only sender seems to be Spotter
[11:49am] DamienCassou: all these little things are annoying. So, +1 to
create an issue



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/SmalltalkImage-imageName-tp4821681.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage>>#imageName

Sean P. DeNigris
Administrator
Peter Uhnák wrote
> Only sender seems to be Spotter
Its quite useful for startup scripts.
Yes, but we have #imageFile fullName already...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage>>#imageName

Nicolai Hess


2015-04-24 19:26 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Peter Uhnák wrote
>> Only sender seems to be Spotter
> Its quite useful for startup scripts.

Yes, but we have #imageFile fullName already...

And there is
FileLocator image resolve
 



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/SmalltalkImage-imageName-tp4821681p4821692.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage>>#imageName

Ben Coman
In reply to this post by Sean P. DeNigris

On Sat, Apr 25, 2015 at 12:23 AM, Sean P. DeNigris <[hidden email]> wrote:
After a brief IRC chat, it seems like returning just the file base (i.e.
without the extension). Any objections before I open an issue?

SeanDeNigris_: I found it surprising that `Smalltalk imageName` returns the
full path. Just me?
[11:34am] maxleske: ++
[11:43am] SeanDeNigris_: Worth an issue? Only sender seems to be Spotter
[11:49am] DamienCassou: all these little things are annoying. So, +1 to
create an issue


+1. We have...

Smalltalk>>imageName
"Answer the full path name for the current image."
^ FilePathEncoder decode: self primImageName "<primitive: 121>"

Smalltalk>>imagePath
"Answer the full path name for the current image."
^ FilePathEncoder decode: self primImagePath "<primitive: 121>"

...same duplicate comment, same duplicate result.  
cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage>>#imageName

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Given that there is consensus, I created:
Issue 15399 SmalltalkImage>>#imageName is redundant

But, thinking more deeply, maybe the cleaner approach would be to remove it completely. Since #imageFile returns a FS object, one already has easy access to whatever variant of the name one wants:
#fullName
#basename
#base

Why pollute the protocol? I don't think it's worth it to save from `imageFile base` to `imageName`... And this would apply to #changesName as well...
Cheers,
Sean