Re: Event-driven / callback programming of mouse or keyboard
Bruce Sherwood <[email protected]> Mon, 21 May 2012 12:52:56 -0600
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <CAFDG03i_mR5_0jx5Z6yrcQeMDUWpZcYnJiUJ+spvRXaOFYvDmg@mail.gmail.com> |
I can't think of a way to do that within the existing structure. I'll mention that in the new GlowScript (glowscript.org: JavaScript/CoffeeScript plus WebGl, based on the VPython design), events are handled with callbacks. Bruce Sherwood On Mon, May 21, 2012 at 12:30 PM, Sophie <[email protected]> wrote: > Is there any way to do event-driven programming, with callbacks for mouse or keyboard events? I would rather not use the polling style shown in example on the web site. > > e.g. > > onKey('a', processKeyA) > > onMouseDown(processMouseDown) > > onMouseDownOn(myCube, processMouseDownOnObject) > > Thanks! ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/