Paul,
Thank you...and Ed, of course, very much for all your help recently.
Just one more item...for now anyway...If I use the code below (note the
added regid to the object and initialize to an integer), then the backspace
works but the left and right arrow do not. Is this the way it is supposed
to work?
Thanks.
##- save and run this from the command line
import dabo
dabo.ui.loadUI("wx")
from dabo.ui import dKeys as dKeys
class Tb(dabo.ui.dTextBox):
def initEvents(self):
self.bindEvent(dabo.dEvents.KeyChar, self._lookup)
def _lookup(self,evt):
keyChar = evt.keyChar
if evt.keyCode in (dKeys.key_F7, dKeys.key_F4,
dKeys.key_Return):
print "varietylookup"
thestr = self.Form.varietylookup(keyChar)
print "thestr", thestr
return
if (keyChar in """,./<>?;':"[]\\{}|[EMAIL
PROTECTED]&*()-_=+"""):
evt.stop()
a = dabo.dApp()
a.setup()
a.MainForm.addObject(Tb,RegID='mytest')
a.Mainform.mytest.value=0
a.start()
When I do that, I find a TypeError exception happening in the (keyChar
in """...) test. Basically, keyChar is None so the string lookup fails.
I don't know why keyChar is None (submit a ticket please), but you can
work around by adding the test:
if keyChar is None:
return
--
pkm ~ http://paulmcnett.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.0.0/754 - Release Date: 09-Apr-2007
10:59 PM
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.0.0/754 - Release Date: 09-Apr-2007
10:59 PM
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/!&[EMAIL PROTECTED]