Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9508

Re: Multiplicity and Asininity in Tkinter Event API

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'parameter': 0.05; 'down,': 0.09; 'indicates': 0.09; 'tkinter': 0.09; 'interfaces': 0.12; 'am,': 0.13; 'wrote:': 0.15; 'around,': 0.16; 'event:': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guessing': 0.16; 'handlers.': 0.16; 'keys.': 0.16; 'ook': 0.16; 'rantingrick': 0.16; 'object,': 0.16; 'written': 0.17; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; 'specifies': 0.19; 'detect': 0.22; 'header:In-Reply-To:1': 0.22; 'releasing': 0.23; 'skip:k 20': 0.23; 'drag': 0.25; '(or': 0.25; 'moving': 0.25; 'fri,': 0.28; 'objects': 0.28; 'message-id:@mail.gmail.com': 0.28; 'facility': 0.29; 'mind.': 0.29; 'beauty': 0.30; 'programmers': 0.31; 'chris': 0.32; 'implementing': 0.32; 'pointing': 0.32; 'propose': 0.32; 'does': 0.32; 'it.': 0.33; 'to:addr:python-list': 0.34; 'keys': 0.35; 'location,': 0.35; 'trouble': 0.37; 'another': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'holding': 0.38; 'parallel': 0.38; 'should': 0.39; 'to:addr:python.org': 0.39; 'needed.': 0.40; 'received:209': 0.40; 'your': 0.60; 'released': 0.62; 'prove': 0.64; 'intuitive': 0.67; 'mouse': 0.67; 'movement': 0.68; 'wish': 0.70; 'mouse,': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Fp01MVo8BjzmOVOdcxq+1H49kRvKOyVUdXjzvENCltI=; b=n3QoWDwOXVNq05ganconW+NZ33nAPrMGfRG7+/6gbMsjmyeOxL4QL4pJcqdY6EHu1M ihwZFMuljZRfllA1nweBcIPp2aznTlTU6zLB20n4hZW+exoCdtbY7H0hViNsaDocxcy+ lQ3rDuBJbNT2eZnbvzp6PVdMThgbuXwX8KQQE=
MIME-Version 1.0
In-Reply-To <faec2643-7be7-4c92-80d2-e10592af2c17@v7g2000vbk.googlegroups.com>
References <faec2643-7be7-4c92-80d2-e10592af2c17@v7g2000vbk.googlegroups.com>
Date Fri, 15 Jul 2011 16:17:56 +1000
Subject Re: Multiplicity and Asininity in Tkinter Event API
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1045.1310710680.1164.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1310710680 news.xs4all.nl 23904 [2001:888:2000:d::a6]:37702
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9508

Show key headers only | View raw


On Fri, Jul 15, 2011 at 8:34 AM, rantingrick <rantingrick@gmail.com> wrote:
>  <KeyPress>
>  <KeyRelease>
>  <MouseClick>
>  <MouseMotion>
>  <MouseRelease>
>  <MouseWheel>
>
> That's it. Go ahead, try to prove me wrong!
>

Does MouseClick mean Mouse Button Down, or does it mean Mouse Button
Pressed Then Released Within A Short Time Without The Mouse Moving In
Between? Both events are needed. Since you have MouseRelease, I am
guessing that it's MouseButtonDown (or MousePress, to parallel your
KeyPress/KeyRelease).

If you only have MouseDown and MouseUp events (or MousePress and
MouseRelease, whatever you wish to call them), then users have a lot
of trouble implementing CUA-compliant mouse-click handlers.

In the spirit of Ook and its predecessor, I propose one single event:
InputEvent. It will have a parameter that specifies the key ID or
mouse button that triggered the event; 0 means no key/button, and
indicates a mouse movement event. It will contain the location of the
mouse, and it's up to the program to keep track of the last known
mouse location, to detect movement. The beauty of this system is that
programmers can build interfaces that involve pointing at an object,
holding the four keys D-R-A-G, and moving the mouse to another
location and releasing those keys. This is far more intuitive than the
classic mouse-button way of dragging objects around, and avoids the
age-old debate of whether to drag with the left or right mouse button.
Tkinter should provide this facility so that all new programs will be
written with this in mind.

Chris Angelico

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Multiplicity and Asininity in Tkinter Event API rantingrick <rantingrick@gmail.com> - 2011-07-14 15:34 -0700
  Re: Multiplicity and Asininity in Tkinter Event API Chris Angelico <rosuav@gmail.com> - 2011-07-15 16:17 +1000
    Re: Multiplicity and Asininity in Tkinter Event API rantingrick <rantingrick@gmail.com> - 2011-07-15 06:54 -0700
      Re: Multiplicity and Asininity in Tkinter Event API Chris Angelico <rosuav@gmail.com> - 2011-07-16 00:02 +1000

csiph-web