I am experimenting with the ShortcutEditor - another one of Andrea's nice widgets!
How are people persisting the short cut data between sessions? Is there some magic function available for this? Or do I need to setup e.g. a config file where I store it and then load it on startup and save it if user uses the SCE.
Btw, the SCE doesn't like combined key codes (i.e. throws an exception), e.g. "wx.ACCEL_SHIFT|wx.ACCEL_ALT", I looked at the code but I don't know how to handle all the possible different combinations nicely.
Andrea, I also noticed in the Phoenix documentation two things:
Control Appearance is overlapping Known Superclasses on e.g. this page:
I am experimenting with the ShortcutEditor - another one of Andrea’s nice widgets!
How are people persisting the short cut data between sessions? Is there some magic function available for this? Or do I need to setup e.g. a config file where I store it and then load it on startup and save it if user uses the SCE.
There is currently no support for this, but I agree that it should be added (maybe with the manager returning the accelerator tuples and the menus accelerator tuples, plus the integration with wx.lib.agw.persist). I’ll take a look at it in the next few days.
Btw, the SCE doesn’t like combined key codes (i.e. throws an exception), e.g. “wx.ACCEL_SHIFT|wx.ACCEL_ALT”, I looked at the code but I don’t know how to handle all the possible different combinations nicely.
Uhm, are you sure about this? I just run the demo and there are a few menus with “Ctrl+Shift” accelerators (see attached image). Maybe I am missing something…
Andrea, I also noticed in the Phoenix documentation two things:
Control Appearance is overlapping Known Superclasses on e.g. this page:
I know, the problem is that I only have a screenshot for Windows and the floatleft CSS attribute does not play very nicely with that… I’ll have to find a solution in the docs generator.
The signature is wrong here - “cmd” should be “cmdID” - created a ticket 15134 as I believe this comes from wxWidgets doc.
I am experimenting with the ShortcutEditor - another one of Andrea's nice
widgets!
How are people persisting the short cut data between sessions? Is there
some magic function available for this? Or do I need to setup e.g. a
config file where I store it and then load it on startup and save it if
user uses the SCE.
There is currently no support for this, but I agree that it should be
added (maybe with the manager returning the accelerator tuples and the
menus accelerator tuples, plus the integration with wx.lib.agw.persist).
I'll take a look at it in the next few days.
Btw, the SCE doesn't like combined key codes (i.e. throws an exception),
e.g. "wx.ACCEL_SHIFT|wx.ACCEL_ALT", I looked at the code but I don't know
how to handle all the possible different combinations nicely.
Uhm, are you sure about this? I just run the demo and there are a few
menus with "Ctrl+Shift" accelerators (see attached image). Maybe I am
missing something...
That would be great - will be happy to help in the testing
Yeap, I am sure, but should have given more detail.
Attached is my testing code for it, based on Mike’s blog post with a
few additions. The problem is with entries in the accelerator
table, didn’t try with menus.
The exception I get is:
KeyError: 5
File “h:\devProjectsT\aaTests\aaMisc\shortcuttesting.py”, line 108,
in
app.MainLoop()
File “c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx_core.py”, line
8660, in MainLoop
wx.PyApp.MainLoop(self)
File “c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx_core.py”, line
7952, in MainLoop
return core.PyApp_MainLoop(*args, **kwargs)
File “h:\devProjectsT\aaTests\aaMisc\shortcuttesting.py”, line 73,
in onSCE
dlg.FromAcceleratorTable(self.accel_tbl)
File
“c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\shortcuteditor.py”,
line 2424, in FromAcceleratorTable
modifier = ACCELERATORS[modifier]
Werner
I am experimenting with the ShortcutEditor - another one
of Andrea’s nice widgets!
How are people persisting the short cut data between
sessions? Is there some magic function available for
this? Or do I need to setup e.g. a config file where I
store it and then load it on startup and save it if user
uses the SCE.
There is currently no support for this, but I
agree that it should be added (maybe with the manager
returning the accelerator tuples and the menus accelerator
tuples, plus the integration with wx.lib.agw.persist).
I’ll take a look at it in the next few days.
Btw, the SCE doesn't like combined key codes (i.e. throws
an exception), e.g. “wx.ACCEL_SHIFT|wx.ACCEL_ALT”, I
looked at the code but I don’t know how to handle all the
possible different combinations nicely.
Uhm, are you sure about this? I just run the
demo and there are a few menus with “Ctrl+Shift”
accelerators (see attached image). Maybe I am missing
something…
Don’t want to push, just curious, did you manage to have a look at
this?
Werner
P.S.
What do you think about the persist and supertooltip patch - are
they o.k./acceptable?
···
Hi Andrea,
On 03/04/2013 14:49, Andrea Gavana wrote:
Hi Werner,
On 3 April 2013 13:56, Werner wrote:
Hi,
I am experimenting with the ShortcutEditor - another one
of Andrea’s nice widgets!
How are people persisting the short cut data between
sessions? Is there some magic function available for
this? Or do I need to setup e.g. a config file where I
store it and then load it on startup and save it if user
uses the SCE.
There is currently no support for this, but I
agree that it should be added (maybe with the manager
returning the accelerator tuples and the menus accelerator
tuples, plus the integration with wx.lib.agw.persist).
I’ll take a look at it in the next few days.
Don't want to push, just curious, did you manage to have a look at
this?
Werner
P.S.
What do you think about the persist and supertooltip patch - are
they o.k./acceptable?
I am sorry for being late, it’s a bit of a complicated period for me. I hope to be back full speed soon enough, and I had indeed looked at your patches on STT and the persist library and they look OK to me. I’ll try and apply them as soon as I get home.
I am experimenting with the ShortcutEditor - another one
of Andrea’s nice widgets!
How are people persisting the short cut data between
sessions? Is there some magic function available for
this? Or do I need to setup e.g. a config file where I
store it and then load it on startup and save it if user
uses the SCE.
There is currently no support for this, but I
agree that it should be added (maybe with the manager
returning the accelerator tuples and the menus accelerator
tuples, plus the integration with wx.lib.agw.persist).
I’ll take a look at it in the next few days.