A pyQt application ported to wxPython, comments and testers needed.

Hi Franz

> I also tried once to port an app (in my case it was pygtk and the
> app was the newsreader "XPN", but I stopped, it was to much work).

In fact, it is not a port. The application has been written from
scratch, just mimicking the interface. I was only interested in this.

> I tried it on KDE 3.5:

Well, a little bit different from http://spinecho.ifrance.com/addressbook.png
It should certainly be better on GNOME.

Jean-Michel Fauth, Switzerland

Hi Jean-Michel,

jmf wrote:

Hi Franz

> I also tried once to port an app (in my case it was pygtk and the
> app was the newsreader "XPN", but I stopped, it was to much work).

In fact, it is not a port. The application has been written from
scratch, just mimicking the interface. I was only interested in this.

> I tried it on KDE 3.5:

Well, a little bit different from http://spinecho.ifrance.com/addressbook.png
It should certainly be better on GNOME.

Attached zip with 3 screen shots on Vista, initial display and after changing size - it does not play nicely when resizing.

Werner

addressbook.zip (71.2 KB)

I know that HtmlWindow is not meant to have full browser functionality,
but unfortunately it seems to be the best we have.
wxMozilla appears to be dead (python bindings are generally built (and
sometime shared) by people on an as needed basis, but there doesn’t
seem to be any Windows python support). It would be nice if wxMozilla
were adopted by the wxWidgets project.
I find it hard to believe that displaying HTML in a multi-platform
environment isn’t a high priority for a lot of people.
There is of course ActiveX_IEHtmlWindow, but that is Windows only
AFAIK. Not to mention that trying to work with IE via that horribly
ugly Microsoft API is a major headache.
So if I want to do multi-platform development, I’m have no real
alternatives other than HtmlWindow for displaying HTML.

I have two uses for html display:

One is to show generated content, where html seems preferable to rich
text. HtmlWindow seems okay for this, except that I would like to be
able to display forms (more on this below).

The other need is to have an embedded browser for displaying web
pages. Obviously HtmlWindow will not work for this because it is not
meant to be a full browser. This has me worried because there seems to
be no solution whatsoever that is multi-platform.

HtmlWindow has nice support for embedding wx widgets inside html code
as in:

`

<param name="label" value="It works!">

<param name="id"    value="ID_OK">

`

But there appears to be no support for html form controls such as
buttons and text inputs.

It would be nice if simple forms created in an html editor could be
displayed in an HtmlWindow.

Perhaps one solution would be to make an html preprocessor to convert
proper html form controls into code for embedded wx controls. For
example, the following would be converted into the above code (I’m
ignoring the tag itself):

<button type="button" name="ID_OK">``It works!</button>

Anyway, I’m wondering if it was a mistake to go with wxPython instead
of GTK, given that there doesn’t seem to be any obvious way to display
HTML. I really hope I’m wrong about this because I have already
written a lot of wxPython code. Was it a mistake?

  • Ken

Any chance that wxMozilla will be directly supported by the wxPython distribution?

- Ken Seehart

Hi Ken,

I know that HtmlWindow is not meant to have full browser functionality, but
unfortunately it seems to be the best we have.

wxMozilla appears to be dead (python bindings are generally built (and
sometime shared) by people on an as needed basis, but there doesn't seem to
be any Windows python support). It would be nice if wxMozilla were adopted
by the wxWidgets project.

I think wxMozilla is not fully supported because no one has ever taken
the burden of actually *doing* it, and because there wasn't that much
interest in a full-featured HTML window. It would be nice to have it,
of course, but I believe that those users most often asking for a
wxWidgets/wxPython implementation/support should also be the ones who
actually start implementing it. It's not a criticism, it's just a
fact. If we never start, we never get that implementation.

I find it hard to believe that displaying HTML in a multi-platform
environment isn't a high priority for a lot of people.

I never felt a need to display HTML in my wxPython apps. It would
probably be the less useful addition to wxPython for me, but I can see
your point.

Anyway, I'm wondering if it was a mistake to go with wxPython instead of
GTK, given that there doesn't seem to be any obvious way to display HTML. I
really hope I'm wrong about this because I have already written a lot of
wxPython code. Was it a mistake?

That depends on what your applications are supposed to do: as far as I
am concerned, I see myself switching from wxPython to GTK only when I
will be unanimously declared King of Italy :smiley: :smiley:
(That means never ever, not even in my darkest nightmares).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

···

On 6/5/07, Ken Seehart <ken@seehart.com> wrote:

I'm not Italian, but I'd move there if that happened. All hail King Andrea!! :slight_smile:

···

On 6/5/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:

That depends on what your applications are supposed to do: as far as I
am concerned, I see myself switching from wxPython to GTK only when I
will be unanimously declared King of Italy :smiley: :smiley:

--

# p.d.

I agree we do need a good HTML viewer, wxMozilla would be the best
choice. I did get wxMozilla to compile after writing my own CMAKE
script for it because the makefile was so buggy (even simple batch
file based?) after getting it to compile, it worked for 50%.
Unexpected errors, crashes etc. So I decided to stop using it.

I like HTML window for general viewing, for normal apps I would not
consider using wxMozilla but I am still thinking about writing my own
RSS feed reader, and for that I do need a decent HTML renderer. I
simply *hate* the IE window based Windows only RSS feed readers, most
of the time the javascript screws up something and IE renders it all
wrong. wxMozilla is a lot more consistent in it's rendering.

Anyway, it is often asked on the wx-forum as well it would surely be
nice to have it as component in either wxPython or wxWidgets and as
binding to wxPython.

- Jorgen

···

On 6/5/07, Peter Decker <pydecker@gmail.com> wrote:

On 6/5/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:

> That depends on what your applications are supposed to do: as far as I
> am concerned, I see myself switching from wxPython to GTK only when I
> will be unanimously declared King of Italy :smiley: :smiley:

I'm not Italian, but I'd move there if that happened. All hail King Andrea!! :slight_smile:

--

# p.d.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

I agree that wxMozilla is the biggest black hole in the wxPython
universe. As we can not clone Robin, who has the time or money
(bounties?) to fix it?
Stani

PS. Andrea, I am not an Italian, so I can't vote for you. But if you
consider to be king of the world, I'll vote for you!

···

--

Jorgen Bodde wrote:

I agree we do need a good HTML viewer, wxMozilla would be the best
choice. I did get wxMozilla to compile after writing my own CMAKE
script for it because the makefile was so buggy (even simple batch
file based?) after getting it to compile, it worked for 50%.
Unexpected errors, crashes etc. So I decided to stop using it.

I like HTML window for general viewing, for normal apps I would not
consider using wxMozilla but I am still thinking about writing my own
RSS feed reader, and for that I do need a decent HTML renderer. I
simply *hate* the IE window based Windows only RSS feed readers, most
of the time the javascript screws up something and IE renders it all
wrong. wxMozilla is a lot more consistent in it's rendering.

Anyway, it is often asked on the wx-forum as well it would surely be
nice to have it as component in either wxPython or wxWidgets and as
binding to wxPython.

- Jorgen

On 6/5/07, Peter Decker <pydecker@gmail.com> wrote:

On 6/5/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:

> That depends on what your applications are supposed to do: as far as I
> am concerned, I see myself switching from wxPython to GTK only when I
> will be unanimously declared King of Italy :smiley: :smiley:

I'm not Italian, but I'd move there if that happened. All hail King
Andrea!! :slight_smile:

--

# p.d.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Jorgen Bodde schrieb:

we do need a good HTML viewer

+1 (... that´s my opinion)

regards,
Gerold
:slight_smile:

···

--
________________________________________________________________________
Gerold Penz - bcom - Programmierung
     http://gerold.bcom.at | http://sw3.at
Wissen hat eine wunderbare Eigenschaft:
     Es verdoppelt sich, wenn man es teilt.

Hello,

first a general question: Is there something like an event broadcasting mechanism?

I would like to control a window by posting an event to it but it seems not to catch it if I derive my event class from wxEvent. If I change it to a wxCommandEvent it is caught by the window (it is a panel to be exact).

I think I didn't understand the whole event thing, could anyone please try to clarify it to me in a few words (if this is possible)?

Thanks,
Mike

Okay, so how much of a bounty would be needed?
I might be able to get some money into it. We have a tight
budget. It would be easier if I were matching funds. Anyone?

Unfortunately I can’t get enough to purchase cloning technology to get
another Robin.

  • Ken Seehart

Stani’s Python Editor wrote:

···

http://pythonide.stani.bepydecker@gmail.comandrea.gavana@gmail.comwxPython-users-unsubscribe@lists.wxwidgets.orgwxPython-users-help@lists.wxwidgets.orgwxPython-users-unsubscribe@lists.wxwidgets.orgwxPython-users-help@lists.wxwidgets.orgwxPython-users-unsubscribe@lists.wxwidgets.orgwxPython-users-help@lists.wxwidgets.org

I know that HtmlWindow is not meant to have full browser functionality, but
unfortunately it seems to be the best we have.

wxMozilla appears to be dead (python bindings are generally built (and
sometime shared) by people on an as needed basis, but there doesn't seem to
be any Windows python support). It would be nice if wxMozilla were adopted
by the wxWidgets project.

I find it hard to believe that displaying HTML in a multi-platform
environment isn't a high priority for a lot of people.

You'd be surprised - "rich text" is whats most often needed, not a
full browser environment.

There is of course ActiveX_IEHtmlWindow, but that is Windows only AFAIK.
Not to mention that trying to work with IE via that horribly ugly Microsoft
API is a major headache.

So if I want to do multi-platform development, I'm have no real
alternatives other than HtmlWindow for displaying HTML.

I have two uses for html display:

One is to show generated content, where html seems preferable to rich text.
HtmlWindow seems okay for this, except that I would like to be able to
display forms (more on this below).

The other need is to have an embedded browser for displaying web pages.
Obviously HtmlWindow will not work for this because it is not meant to be a
full browser. This has me worried because there seems to be no solution
whatsoever that is multi-platform.

A full browser is a lot more work than you're crediting. There are
only 4 mature browser engines in existence today, and they all took
tens of thousands of man-hours of work, and they're (all) still highly
imperfect and inconsistent. None of them are especially easy to embed
in a foreign library - IE is easiest because of it's ActiveX support.
Mozilla is a huge beast and hard to embed. Opera isn't available for
embedding at all. KHTML/WebKit is the most likely option, and there is
a wxWebKit project, but it's still a lot of work and it's certainly
non-trivial to implement. wxWebKit, from what I hear, is the current
best option for cross-platform embedded browsing, but I don't believe
there are Python bindings.

HtmlWindow has nice support for embedding wx widgets inside html code as
in:

<wxp module="wx" class="Button" >
     <param name="label" value="It works!">
     <param name="id" value="ID_OK">
</wxp>

But there appears to be no support for html form controls such as buttons
and text inputs.

It shouldn't be *that* difficult to implement HTML forms directly in
wxHTML. Get crackin' :wink:

It would be nice if simple forms created in an html editor could be
displayed in an HtmlWindow.

Perhaps one solution would be to make an html preprocessor to convert
proper html form controls into code for embedded wx controls. For example,
the following would be converted into the above code (I'm ignoring the
<form> tag itself):

<button type="button" name="ID_OK">It works!</button>

The button tag, on the other hand, would be hard. You'd need a nested
wxHTML window inside a custom "button-like" panel. Probably still
possible.

Anyway, I'm wondering if it was a mistake to go with wxPython instead of
GTK, given that there doesn't seem to be any obvious way to display HTML. I
really hope I'm wrong about this because I have already written a lot of
wxPython code. Was it a mistake?

Wow, you don't sound like someone making loaded petulant statements at
all! I don't know your needs or requirements, and so I can't tell you
if you made a mistake or not. If you think that GTK has a fully
featured embeddable browser suitable for viewing arbitrary web pages,
though, you're quite mistaken.

···

On 6/5/07, Ken Seehart <ken@seehart.com> wrote:

You can post your bounty here and than invite other companies or people
to contribute:
http://www.wxwidgets.org/wiki/index.php/WxWidgets_Bounties

But as others have reported, it is a huge amount of work. For example
there is a bounty for a rich text edit ctrl for wxPython of $900. I
suppose a wxMozilla or wxWebKit ctrl will be much more. (I wonder if
even it would not be too much work for a Google Summer of Code project.)

If you don't update your bounty within 6 months it will expire.

Stani

Ken Seehart wrote:

···

Okay, so how much of a bounty would be needed?

I /might /be able to get some money into it. We have a tight budget.
It would be easier if I were matching funds. Anyone?

Unfortunately I can't get enough to purchase cloning technology to get
another Robin.

- Ken Seehart

Stani's Python Editor wrote:

I agree that wxMozilla is the biggest black hole in the wxPython
universe. As we can not clone Robin, who has the time or money
(bounties?) to fix it?
Stani

PS. Andrea, I am not an Italian, so I can't vote for you. But if you
consider to be king of the world, I'll vote for you!
--
http://pythonide.stani.be

Jorgen Bodde wrote:

I agree we do need a good HTML viewer, wxMozilla would be the best
choice. I did get wxMozilla to compile after writing my own CMAKE
script for it because the makefile was so buggy (even simple batch
file based?) after getting it to compile, it worked for 50%.
Unexpected errors, crashes etc. So I decided to stop using it.

I like HTML window for general viewing, for normal apps I would not
consider using wxMozilla but I am still thinking about writing my own
RSS feed reader, and for that I do need a decent HTML renderer. I
simply *hate* the IE window based Windows only RSS feed readers, most
of the time the javascript screws up something and IE renders it all
wrong. wxMozilla is a lot more consistent in it's rendering.

Anyway, it is often asked on the wx-forum as well it would surely be
nice to have it as component in either wxPython or wxWidgets and as
binding to wxPython.

- Jorgen

On 6/5/07, Peter Decker <pydecker@gmail.com> wrote:
   

On 6/5/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:

That depends on what your applications are supposed to do: as far as I
am concerned, I see myself switching from wxPython to GTK only when I
will be unanimously declared King of Italy :smiley: :smiley:
        

I'm not Italian, but I'd move there if that happened. All hail King
Andrea!! :slight_smile:

--

# p.d.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi Stani and all,

You can post your bounty here and than invite other companies or people
to contribute:
http://www.wxwidgets.org/wiki/index.php/WxWidgets_Bounties

But as others have reported, it is a huge amount of work. For example
there is a bounty for a rich text edit ctrl for wxPython of $900. I
suppose a wxMozilla or wxWebKit ctrl will be much more. (I wonder if
even it would not be too much work for a Google Summer of Code project.)

To end all this speculation about why wxMozilla seems to be dead and how much a bounty it would take to get it fixed, the wxMozilla project "died" because the Mozilla developers were not interested in fixing problems with their embedding implementation, creating and sticking with a "stable" embedding API (I heard "hopefully next release" for 3 years), or supporting Mac embedding at all. Questions to the embedding mailing list were frequently met with silence. Worse, I was even told at one point that wx is seen as a competitor to XUL, so they didn't show great interest in helping the wxMozilla port. :-/ The final conclusion I came to after all this is that wxMozilla is simply not a sustainable project.

wxWebKit is proceeding along and hopefully will have some alpha Python bindings by the end of the month. I've actually been spending this last week fixing some issues that kept me from building wxWebKit against wxPython (the wxpresets needed wxPython-specific coding on Windows, and on Mac there are some Universal Binary issues which I'm close to resolving). A bounty certainly wouldn't hurt to help me move things along, particularly if there are certain things that one would like to see implemented before others, of course. :slight_smile: I'm trying to have some Windows and Mac downloadable binaries by the end of the week so that people can play with it and start giving reports.

BTW, as someone who has built 2 of the 3 native browser wrappers (wxMozilla and wxWebKitCtrl, Mac-specific) and also works on wxPython/wxWidgets, I can tell you there's a strong demand for a cross-platform browser wrapper. I think it's probably (outside of possibly a native tree/list control hybrid) the control I see asked for the most. It is just that there is no quick and easy solution, especially when the requirement is that it be full-featured, standards compliant, and work cross-platform (and for me, add to that support HTML editing). I also know Qt is definitely in the exact same boat we are in terms of cross-platform browser rendering, because Qt developers are hanging out over on WebKit, same as me, trying to finish up their Qt port of it. :wink:

As for Gtk, I suppose it might be possible but I haven't heard of anyone using GtkMozEmbed outside of Linux, and Gtk itself does not work so well on Windows, and hardly at all on Mac. So I doubt much time and effort has been put into ensuring that GtkMozEmbed is cross-platform.

Regards,

Kevin

···

On Jun 5, 2007, at 6:31 AM, Stani's Python Editor wrote:

If you don't update your bounty within 6 months it will expire.

Stani

Ken Seehart wrote:

Okay, so how much of a bounty would be needed?

I /might /be able to get some money into it. We have a tight budget.
It would be easier if I were matching funds. Anyone?

Unfortunately I can't get enough to purchase cloning technology to get
another Robin.

- Ken Seehart

Stani's Python Editor wrote:

I agree that wxMozilla is the biggest black hole in the wxPython
universe. As we can not clone Robin, who has the time or money
(bounties?) to fix it?
Stani

PS. Andrea, I am not an Italian, so I can't vote for you. But if you
consider to be king of the world, I'll vote for you!
--
http://pythonide.stani.be

Jorgen Bodde wrote:

I agree we do need a good HTML viewer, wxMozilla would be the best
choice. I did get wxMozilla to compile after writing my own CMAKE
script for it because the makefile was so buggy (even simple batch
file based?) after getting it to compile, it worked for 50%.
Unexpected errors, crashes etc. So I decided to stop using it.

I like HTML window for general viewing, for normal apps I would not
consider using wxMozilla but I am still thinking about writing my own
RSS feed reader, and for that I do need a decent HTML renderer. I
simply *hate* the IE window based Windows only RSS feed readers, most
of the time the javascript screws up something and IE renders it all
wrong. wxMozilla is a lot more consistent in it's rendering.

Anyway, it is often asked on the wx-forum as well it would surely be
nice to have it as component in either wxPython or wxWidgets and as
binding to wxPython.

- Jorgen

On 6/5/07, Peter Decker <pydecker@gmail.com> wrote:

On 6/5/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:

That depends on what your applications are supposed to do: as far as I
am concerned, I see myself switching from wxPython to GTK only when I
will be unanimously declared King of Italy :smiley: :smiley:

I'm not Italian, but I'd move there if that happened. All hail King
Andrea!! :slight_smile:

--

# p.d.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi Mike,

Check out http://wiki.wxpython.org/PubSub . The publish/subscribe functionality therein allows you to create almost any kind of messaging hookup you might need for your wxPython program. The process is easy and requires less work than making custom wxEvents and wxCommandEvents. Messages propagate in any direction rather than strictly upward. Receiving is by message “topic” rather than by position in the window hierarchy, so you can create just about any effect you want.

Be careful not to leave any methods subscribed after their object instances are destroyed, to avoid the frumious PyDeadObjectError.

···

On 6/5/07, Michael Perkonigg michael.perkonigg@liland.at wrote:

Hello,

first a general question: Is there something like an event broadcasting
mechanism?

I would like to control a window by posting an event to it but it seems
not to catch it if I derive my event class from wxEvent. If I change it

to a wxCommandEvent it is caught by the window (it is a panel to be exact).

I think I didn’t understand the whole event thing, could anyone please
try to clarify it to me in a few words (if this is possible)?

Thanks,
Mike

I might conclude I'll be there for the next world emperor elections :smiley: :smiley:
Muahahahahahaha. Just kidding :smiley:

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

···

On 6/5/07, Peter Decker wrote:

I'm not Italian, but I'd move there if that happened. All hail King Andrea!! :slight_smile:

On 6/5/07, Stani's Python Editor wrote:

PS. Andrea, I am not an Italian, so I can't vote for you. But if you
consider to be king of the world, I'll vote for you!

Chris Mellon wrote:

A full browser is a lot more work than you're crediting. There are
only 4 mature browser engines in existence today, and they all took
tens of thousands of man-hours of work, and they're (all) still highly
imperfect and inconsistent. None of them are especially easy to embed
in a foreign library - IE is easiest because of it's ActiveX support.
Mozilla is a huge beast and hard to embed. Opera isn't available for
embedding at all. KHTML/WebKit is the most likely option, and there is
a wxWebKit project, but it's still a lot of work and it's certainly
non-trivial to implement. wxWebKit, from what I hear, is the current
best option for cross-platform embedded browsing, but I don't believe
there are Python bindings.

wxWebKit is being worked on by Kevin Olivier and I am helping out as I have time for it. You're right though that it is really the only contender because its code is organized much better for being used in non standard environments and on various platforms. The platform specific parts are compartmentalized from the rest and most major functional groups are also separated. This means it is much easier to replace sections of the functionality with new platforms or environment specific code. It's still a lot of work though, and the WebKit code rivals the wx code in size (meaning that there is lots of it) so there is a lot to learn.

HtmlWindow has nice support for embedding wx widgets inside html code as
in:

<wxp module="wx" class="Button" >
     <param name="label" value="It works!">
     <param name="id" value="ID_OK">
</wxp>

But there appears to be no support for html form controls such as buttons
and text inputs.

It shouldn't be *that* difficult to implement HTML forms directly in
wxHTML. Get crackin' :wink:

It would just take somebody implementing tag handlers for the form and form control tags. The <wxp> tag was really only meant as a way to embed non-standard things, or complex widgets like panels already populated with widgets, etc. as I thought that wxHtmlWindow would eventually be able to handle <form> and friends too. But just because nobody has implemented C++ handlers for the form tags yet doesn't mean it can't be done. Take a look at the implementation of the <wxp> handler for an example.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Ken Seehart wrote:

Any chance that wxMozilla will be directly supported by the wxPython distribution?

No. Kevin's email details why.

A wx WebKit with support for all platforms is much more likely to happen, and is being actively worked on. In a custom WebKit we can use our own drawing APIs to draw on our own Windows instead of trying to find a way to blend the two conflicting toolkits.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Michael Perkonigg wrote:

Hello,

first a general question: Is there something like an event broadcasting mechanism?

I would like to control a window by posting an event to it but it seems not to catch it if I derive my event class from wxEvent. If I change it to a wxCommandEvent it is caught by the window (it is a panel to be exact).

As Eric mentioned using PuSub might be a better choice for you depending on your needs, but just to not leave any dangling questions here I'll try to address your problem. Since you don't show any code I'll just have to guess, but are you sending the event to the panel where you are trying to catch it or are you sending it to a child or the panel? If the latter then yes you'll need to use command events as they are the only ones that travel up the containment hierarchy by default. If the former then please send a small runnable same the shows the problem as it is probably a bug.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

In the interests of science, I whipped up a very quick & dirty form
implementation. Only text, password, and submit buttons are supported,
and there's a fair amount of hackishness in the code. See attached.

htmlt.html (331 Bytes)

forms.py (4.97 KB)

···

On 6/5/07, Robin Dunn <robin@alldunn.com> wrote:

Chris Mellon wrote:

> A full browser is a lot more work than you're crediting. There are
> only 4 mature browser engines in existence today, and they all took
> tens of thousands of man-hours of work, and they're (all) still highly
> imperfect and inconsistent. None of them are especially easy to embed
> in a foreign library - IE is easiest because of it's ActiveX support.
> Mozilla is a huge beast and hard to embed. Opera isn't available for
> embedding at all. KHTML/WebKit is the most likely option, and there is
> a wxWebKit project, but it's still a lot of work and it's certainly
> non-trivial to implement. wxWebKit, from what I hear, is the current
> best option for cross-platform embedded browsing, but I don't believe
> there are Python bindings.

wxWebKit is being worked on by Kevin Olivier and I am helping out as I
have time for it. You're right though that it is really the only
contender because its code is organized much better for being used in
non standard environments and on various platforms. The platform
specific parts are compartmentalized from the rest and most major
functional groups are also separated. This means it is much easier to
replace sections of the functionality with new platforms or environment
specific code. It's still a lot of work though, and the WebKit code
rivals the wx code in size (meaning that there is lots of it) so there
is a lot to learn.

>
>> HtmlWindow has nice support for embedding wx widgets inside html code as
>> in:
>>
>> <wxp module="wx" class="Button" >
>> <param name="label" value="It works!">
>> <param name="id" value="ID_OK">
>> </wxp>
>>
>> But there appears to be no support for html form controls such as
>> buttons
>> and text inputs.
>>
>
> It shouldn't be *that* difficult to implement HTML forms directly in
> wxHTML. Get crackin' :wink:

It would just take somebody implementing tag handlers for the form and
form control tags. The <wxp> tag was really only meant as a way to
embed non-standard things, or complex widgets like panels already
populated with widgets, etc. as I thought that wxHtmlWindow would
eventually be able to handle <form> and friends too. But just because
nobody has implemented C++ handlers for the form tags yet doesn't mean
it can't be done. Take a look at the implementation of the <wxp>
handler for an example.