Tk Source Code

View Ticket
Login
Ticket UUID: 577906
Title: %P substitution not documented
Type: Bug Version: obsolete: 8.4b1
Submitter: dgp Created on: 2002-07-05 19:45:29
Subsystem: 65. Generic Window Operations Assigned To: jenglish
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2003-09-15 17:22:27
Resolution: Fixed Closed By: jenglish
    Closed on: 2003-09-13 20:27:33
Description:
TIP 47 allegedly added a %P substitution to [bind] scripts,
but it is not mentioned in doc/bind.n
User Comments: jenglish added on 2003-09-14 03:27:33:
Logged In: YES 
user_id=68433

Committing the patch, with dkf's suggested rewording. 
Leaving %s undocumented for now.

jenglish added on 2003-09-07 23:39:46:
Logged In: YES 
user_id=68433

... Blech.  For XButtonEvent et. al:

"The state member is set to indicate the logical state of
the pointer buttons and modifier keys just prior to the
event, which is the bitwise inclusive OR of one or more of
the button or modifier key masks: Button1Mask, Button2Mask,
Button3Mask, Button4Mask, Button5Mask, Shift-Mask, LockMask,
ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, and
Mod5Mask."

Reporting this as a decimal string violates the Tcl Way. 

Do we want to document all of those too, or provide a
library routine that converts a %s integer to a modifier
specification and refer to that?  (Or just leave it
undocumented, which is my preferred solution.)

dkf added on 2003-09-07 23:37:08:
Logged In: YES 
user_id=79902

"and" as you are selecting from a list (and that's the style
used elsewhere in the paragraph, which is my real criterion
there!)  However, your longer version is better still.  :^)

Clarifying %s for other situations is a nice longer-term
goal, but we're probably justified in ignoring it within the
scope of this bugfix.

jenglish added on 2003-09-07 23:28:56:
Logged In: YES 
user_id=68433

"one of the strings _NewValue_, and _Delete_ is
substituted", or "one of the strings _NewValue_ or _Delete_
is substituted"?

Hm.

How about: "For _PropertyNotify_ events, substituted with
either the string _NewValue_ (indicating that the property
has been created or modified) or _Delete_ (indicating that
the property has been removed)"

... and while we're on the subject of the '%s' substitution,
probably ought to clarify the meaning of the "decimal
string" which is substituted for ButtonPress et. al.

dkf added on 2003-09-07 22:50:36:
Logged In: YES 
user_id=79902

I prefer the following wording as being more in keeping with
the rest of the manpage and perhaps a little bit less obscure:
  For \fBProperty\fP events, one of the strings
\fBNewValue\fP, and \fBDelete\fP is substituted.
...
  The name of the property being updated or deleted (which
may be converted to an XAtom using \fBwinfo atom\fR.) Valid
only for \fBProperty\fP events.
Aside from that, the patch is good for application to both
the HEAD and the 8.4 branch (given that the %P substitution
was introduced as part of TIP#47.)  Boosting priority...

jenglish added on 2003-09-02 00:15:34:

File Added - 60354: bind.n.patch

Logged In: YES 
user_id=68433

Must have missed that one.  Attached patch rectifies.

Attachments: