On Wed, Feb 27, 2002 at 11:40:51AM +0000, Mikhael Goikhman wrote:
> On 27 Feb 2002 10:58:05 +0000, Mikhael Goikhman wrote:
> > 
> > On 27 Feb 2002 07:17:12 +0100, Dominik Vogt wrote:
> > > 
> > > We shouldn't mix both because it would become hard to understand for
> > > example
> > > 
> > >   Current (foobar) Read <file>
> > > 
> > > returns (the rc of Read or the rc of Current?).
> > 
> > It should return rc of Current. If someone needs to branch over Read, he
> > should do this in a function:
> > 
> >   Current (foobar) ReadOrWrite
> 
> Sorry, I was too fast to reply.
> 
> It should return:
> 
>   * Current syntax: SyntaxError
>   * Current failed: NoMatch
>   * Read syntax:    SyntaxError
>   * Read passed:    Success
>   * Read failed:    NoFile
> 
> Note, there is no Match status, it is usually Success instead.
> 
> If you think this is a mix, yes, but it is not different from this:
> 
>   Current (foobar) Next (foobar2) Close
> 
> For me it should return:
> 
>   * Current syntax: SyntaxError
>   * Current failed: NoMatch
>   * Next syntax:    SyntaxError
>   * Next failed:    NoMatch
>   * Close syntax:   SyntaxError
>   * Close passed:   Success
>   * Close failed:   NoWindow
> 
> What should it return as it is now? Which is more useful? :)

I don't know, but I do know that you did not get the idea what the
"error" return code stands for in the current code.  The idea was
to use it if the pre conditions to run the command at all are not
fulfilled, e.g.  if you issue "Pick" but select no window.  This
is quite different from syntax errors.  Handling syntax errors may
not be necessary at all.  Fvwm already prints error messages in
this case.

> I remember I thought about all this several months ago, and my decision
> was one return code for all commands should be enough, functions may be
> used to refine it. The only alternative is to keep an array of status
> codes, one per a command in the line (three in the last Close example).

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [EMAIL PROTECTED]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to