Hi all,
When reading code in `objects/core/unix.self`, I can not figure out what's purpose of `command:Executing:IfFail:`. Could anyone give me a hint?
Regards, Xin Wang
Hi,
I wouldn’t recommend reading the actual .self files. They were created by the Transporter and aren’t particularly human friendly. It is much easier to work within the UI.
That said, if I am in the UI and type command:Executing:IfFail: in to a shell, highlight and right click it, and choose ‘Implementors’, I see that the method has a comment which reads:
Execute cmd as a shell command. If it fails, see if aFileName exists somewhere in $PATH. If not, prompt the user and try again. — dmu
And if I right click again on the name and choose “Senders” I see that there is one sender: readUsingImageMagick: fileName Type: type which uses it to check that the ‘convert’ command line app is present.
Cheers Russell
On 11 Oct. 2016, at 11:16 pm, Xin Wang dram.wang@gmail.com [self-interest] self-interest@yahoogroups.com wrote:
Hi all,
When reading code in `objects/core/unix.self`, I can not figure out what's purpose of `command:Executing:IfFail:`. Could anyone give me a hint?
Regards, Xin Wang
2016-10-12 14:39 GMT+08:00 Russell Allen mail@russell-allen.com [self-interest] self-interest@yahoogroups.com:
Hi,
I wouldn’t recommend reading the actual .self files. They were created by the Transporter and aren’t particularly human friendly. It is much easier to work within the UI.
That said, if I am in the UI and type c*ommand:Executing:IfFail:* in to a shell, highlight and right click it, and choose ‘Implementors’, I see that the method has a comment which reads:
Execute cmd as a shell command. If it fails, see if aFileName exists somewhere in $PATH. If not, prompt the user and try again. — dmu
And if I right click again on the name and choose “Senders” I see that there is one sender: *readUsingImageMagick: fileName Type: type* which uses it to check that the ‘convert’ command line app is present.
Cheers Russell
A cool tip! Thanks.
After reading comments and code of command:Executing:IfFail: and related command:ExecutingAll:IfFail:, I think comment and code are not consistent, maybe one of them should be adjusted.
On 11 Oct. 2016, at 11:16 pm, Xin Wang dram.wang@gmail.com [self-interest] self-interest@yahoogroups.com wrote:
Hi all,
When reading code in `objects/core/unix.self`, I can not figure out what's purpose of `command:Executing:IfFail:`. Could anyone give me a hint?
Regards, Xin Wang
self-interest@lists.selflanguage.org