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


Groups > comp.lang.python > #105603

Re: Key Binding Problem

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Newsgroups comp.lang.python
Subject Re: Key Binding Problem
Date Thu, 24 Mar 2016 08:06:28 -0400
Organization IISS Elusive Unicorn
Lines 36
Message-ID <mailman.90.1458821171.2244.python-list@python.org> (permalink)
References <o6ydncSeoNfrnm_LnZ2dnUU7-IfNnZ2d@giganews.com> <mailman.27.1458702187.2244.python-list@python.org> <L6KdnXoY773thm_LnZ2dnUU7-QOdnZ2d@giganews.com> <mailman.31.1458715678.2244.python-list@python.org> <GZ-dnUtlpauMIG_LnZ2dnUU7-S-dnZ2d@giganews.com> <mailman.74.1458780091.2244.python-list@python.org> <06adnbnMouHI027LnZ2dnUU7-XednZ2d@giganews.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de CAbp6h64zFTnDuYvhlTkmgIxb/j4I9D/Fsu2U1dVlx7A==
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'mouse': 0.07; 'argument:': 0.09; 'callback': 0.09; 'called.': 0.09; 'event):': 0.09; 'handler.': 0.09; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'state)': 0.09; 'assume': 0.11; 'def': 0.13; 'wed,': 0.15; 'argument': 0.15; '2016': 0.16; 'coordinates': 0.16; 'framework,': 0.16; 'placeholder': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'structure.': 0.16; 'subject:Problem': 0.16; 'instance,': 0.18; 'url:home': 0.18; 'gui': 0.18; 'arguments': 0.22; 'class,': 0.22; 'referring': 0.22; 'code.': 0.23; 'defined': 0.23; 'second': 0.24; '(which': 0.26; 'header:X-Complaints-To:1': 0.26; '-0500,': 0.29; 'handled': 0.29; "i'd": 0.31; 'guess': 0.31; 'screen': 0.32; 'etc.)': 0.32; 'class': 0.33; 'structure': 0.34; 'text': 0.35; 'instance': 0.35; 'but': 0.36; 'there': 0.36; 'framework': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'method': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'button': 0.38; 'self': 0.38; 'mean': 0.38; 'skip:o 20': 0.38; 'means': 0.39; 'data': 0.39; 'to:addr:python.org': 0.40; 'called': 0.40; 'some': 0.40; 'your': 0.60; 'mar': 0.65; 'elsewhere': 0.66; 'python-list': 0.66; 'receive': 0.71; 'click': 0.76; 'as:': 0.79; 'difference.': 0.84; 'fields,': 0.84; 'dennis': 0.91; 'received:108': 0.93
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host adsl-108-73-117-233.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 6.00/32.1186
X-No-Archive YES
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:105603

Show key headers only | View raw


On Wed, 23 Mar 2016 21:17:57 -0500, Wildman via Python-list
<python-list@python.org> declaimed the following:

>
>I was referring to procedures called by a button click as
>opposed to a procedure calledd from elsewhere in the code.
>I guess there is no difference.  I assume that is what you
>meant.

	I'd have to see /how/ it is called. The "button click" is an event
handled by the GUI framework, to which you've bound a handler. Such items
(which may be attached to resize, menu, text fields, etc.) would need the
structure the framework uses... So if a method of a class, that means a
first argument placeholder of "self", and most likely a second for some
"event" data structure. You'd have to check the documentation for what it
expects.

	callback by framework:	theButton.pressed((clock, x, y))
		defined as:				def pressed(self, event):
	(granted, having the mouse x/y coordinates may not mean much for a
screen button)

	callback by framework:	mouseHandler.move((clock, x, y, lmb, rmb, mmb))
		defined as:				def move(self, event):
	(xmb is left/right/middle mouse button state)


	But if it is not being called by the framework, the arrangement/number
of arguments is under your control. If it is a method of a class instance,
it will receive the instance object as the first argument:
object.method(arglist) => method(self, arglist) {where self IS object}.

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-22 21:46 -0500
  Re: Key Binding Problem MRAB <python@mrabarnett.plus.com> - 2016-03-23 03:02 +0000
    Re: Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-22 23:28 -0500
      Re: Key Binding Problem Terry Reedy <tjreedy@udel.edu> - 2016-03-23 02:47 -0400
        Re: Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-23 10:40 -0500
        Re: Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-23 10:58 -0500
          Re: Key Binding Problem Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-23 20:34 -0400
            Re: Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-23 21:17 -0500
              Re: Key Binding Problem Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-24 08:06 -0400
                Re: Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-24 11:19 -0500
                Re: Key Binding Problem Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-24 21:43 -0400
                Re: Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-24 23:37 -0500
                Re: Key Binding Problem Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-25 12:50 -0400
  Re: Key Binding Problem Terry Reedy <tjreedy@udel.edu> - 2016-03-22 23:52 -0400
    Re: Key Binding Problem Wildman <best_lay@yahoo.com> - 2016-03-22 23:30 -0500

csiph-web