Thanks for all that info. I'm going to shelve this approach for the moment
given that it's pretty involved and also that it doesn't address some other
of the issues we're having with help events. In particular, help events
don't get sent to disabled items (eg disabled buttons) and a few other
controls don't seem to get help events either. Also, equipping wizards with
help (such that you can click on the "background" and get help, or get help
on the forward, backward buttons) is non-trivial.
In the face of these issues, we've just done an end run around the help
provider system and install help event handlers *everywhere*, which seems to
be working much better. We're also special casing wizards since the buttons
on a wizard don't get created until the wizard is run.
There's also a funky issue on Windows where a help button on the title bar
(using wxFRAME_EX_CONTEXTHELP (?)) doesn't always generate a help event. I
haven't got code to hand to demonstrate this issue - but it seems like it's
a windows issue and there's not much wxWindows can do about it.
Thanks again Robin,
S.
ยทยทยท
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Tuesday, May 13, 2003 7:07 PM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Making wxSimpleHelpProvider more usefulSean Slattery wrote:
>> Since it is not a wxObject then you don't need the dynamic class
>> stuff, it is for the wxRTTI. wxPython only needs the wxRTTI in
>> order to create instances of the right type for function return
>> values, so it won't hurt anything in this case.
>
>
> Are you sure? Thing is, I now have ShowHelp overridden, so
that if I
> subclass wxSimpleHelpProvider in Python, and call ShowHelp on the
> same object, I get the subclass definition of ShowHelp, BUT when I
> pass it to wxHelpProvider_Set and then fetch it back with
> wxHelpProvider_Get, the overload is gone.You're right. I forgot about the _Get. It's still possible,
just more
work. For an example take a look at the cell renderer and
some of the
other classes in grid.i. We can still get OOR to work with
it but we'll
have to change the C++ class to derive from
wxClientDataContainer so we
can store a reference to the Python object within it. Unfortunately
that means that the change can't be done until 2.5 since
there can be no
binary incompatible changes to the core library in 2.4.The plumbing for the overload can still be done without
wxClientDataContainer, so any calls to ShowHelp (whether from C++ or
from Python) will be redirected to the Python ShowHelp, you
just won't
get the original python instance back from the wxHelpProvider_Get
function. Instead you'll get a new Python wxHelpProvider
wrapper object
wrapped around the same (original) C++ instance of wxPyHelpProvider.--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org