Hussein Shafie wrote:
> Manuel Collado wrote:
> 
>> I've recently discovered the 'execute' command that allows command 
>> test and debugging.  ...
>>  ...
>> 1.- If the command doesn't return a value, the alert message displays 
>> a literal '%_' instead of an empty string. Is that the intended 
>> behaviour?
> 
> Yes. The rationale is to make a difference between no result at all and 
> a result which is the empty string.
> 
> Is this behavior the most sensible one? Well, I don't know. If you think 
> it is not the right behavior, do not hesitate to explain us why.

No harm. I pointed it out only because I didn't expect it after reading 
the PowerUser manual:

    "... Each executed command overwrites %_. This variable is set to the
     empty string for commands which do not return a result."

> 
> 
>> 2.- The "Failed" alert message is never got. ...
> ...
>> If so, is there a way to know if the command fails or not?
> 
> To make it simple, a command does not fail. It can be executed given 
> current context or it cannot be executed.
> 
> "alert 'Failed'" would be executed if sequence "execute+alert" cannot be 
> executed.
> 
> This never the case: sequence "execute+alert" can *always* be executed 
> because "execute", without any parameter, can be executed whatever is 
> the context.

In that case I would suggest an improvement for debugging purposes. If 
the command cannot be executed as requested, a message box could inform 
about why, like:

- Invalid command name
- Invalid parameter
- Invalid parameter value
- Command cannot be executed

Similar messages are already given when invalid commands appear in 
configuration files.

Hope this help,
-- 
------------------------------------------------------------------------
Manuel Collado Machuca                    | Facultad de Informatica UPM
Universidad Politecnica de Madrid         | Campus de Montegancedo
Dep. LSIIS                                | Boadilla del Monte
Tel.+34-91-336.74.57 Fax.+34-91-336.74.12 | 28660  MADRID  -  SPAIN
------------------------------------------------------------------------


Reply via email to