1 Jul 12:56
Re: TIP #321: Add a tk::busy Command
From: Lars Hellström <Lars.Hellstrom@...>
Subject: Re: TIP #321: Add a tk::busy Command
Newsgroups: gmane.comp.lang.tcl.core
Date: 2008-07-01 10:56:35 GMT
Subject: Re: TIP #321: Add a tk::busy Command
Newsgroups: gmane.comp.lang.tcl.core
Date: 2008-07-01 10:56:35 GMT
Jos Decoster skrev:
> TIP #321: ADD A TK::BUSY COMMAND
[snip]
> HOLD SUBCOMMAND
> -----------------
>
> *tk::busy* /window/ ?/option value/?
>
> *tk::busy hold* /window/ ?/option value/?
>
> Makes the widget window (and its descendants in the Tk window
> hierarchy) busy. /Window/ must be a valid path name of a Tk widget. The
> busy window is mapped the next time idle tasks are processed, and the
> widget and its descendants will be blocked from user interactions.
This TIP seems to be written with the presumption that the reader
already knows how the blt::busy command works -- is that acceptable?
What I find particularly confusing is this part about the "busy
window". Is it the /window/ in this call, or is it rather some new
window that is used to cover the /window/ (thus blocking events), or
what? In the latter case, does this "busy window" have a name?
[snip]
> FORGET SUBCOMMAND
> -------------------
>
> *tk::busy forget* /window/
>
> RELEASE SUBCOMMAND
> --------------------
>
> *tk::busy release* /window/
In the pre-discussion, it seemed that these commands provided duplicate
functionality, i.e., some users always used one and some users always
used the other, the difference merely being how much resources are
released. The TIP should probably comment upon this issue, e.g. whether
it would be feasible to unify the two, and if not, then why.
> ISBUSY SUBCOMMAND
> -------------------
>
> *tk::busy isbusy* ?/pattern/?
>
> Returns the pathnames of all widgets that are currently busy. If a
> /pattern/ is given, the path names of busy widgets matching /pattern/
> are returned.
My feeling is that this kind of subcommand should be named "names"
(isbusy sounds like a test -- cf. [string is]), but I understand the
compatibility argument. However, [namespace ensemble] makes it fairly
simple to "rename" subcommands for compatibility, e.g.
namespace ensemble create -command blt::busy -map {
isbusy {tk busy names}
names {tk busy windows}
forget {tk busy release}
release {tk busy release}
...
}
Lars Hellström
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
RSS Feed