I'm looking for the cause, and I found this. I tried to find a workaround and I think that can be solved this way:Phred wrote:The program seems to work well, potentially very well - but I've noticed that the 'start time' control doesn't like setting a start time of 10.. o'clock. Keyboard arrows and mouse clicking roll over 10, then jam if you try to come down from 11.![]()
1) Define a new class:
Code: Select all
class FixedTimeCtrl(wx.lib.masked.TimeCtrl):
'''Workaround of wx.lib.masked.TimeCtrl bug.
See http://trac.wxwidgets.org/ticket/11171'''
def _TimeCtrl__IncrementValue(self, key, pos):
text = self.GetValue()
field = self._FindField(pos)
start, end = field._extent
slice = text[start:end]
if slice == 'A':
newslice = 'P'
elif slice == 'P':
newslice = 'A'
else:
top = 24 if field._index == 0 else 60
increment = 1 if key == wx.WXK_UP else -1
newslice = "%02d" % ((int(slice) + increment) % top)
newvalue = text[:start] + newslice + text[end:]
try:
self._SetValue(newvalue)
except ValueError: # must not be in bounds:
if not wx.Validator_IsSilent():
wx.Bell()
I am looking for where (inside EG) is used the wx.lib.masked.TimeCtrl class.
In addition to Radio?Sure! plugin they are still following plugins:
MediaMonkey, SchedulGhost and Timer. I of course take care to fix of plugins, which I am the author.
For the next EventGhost versions (I believe they will), I have prepared two new classes: eg.TimeCtrl and eg.TimeCtrl_Duration.
The second is like eg.TimeCtrl, but also ignores the keys "C", "c" and "!" (set the time on the "Now").
Pako