-----Original Message-----
From: Rick King [mailto:rickbking@comcast.net]
Sent: Friday, April 18, 2003 6:45 AM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Casting wxObject?
Does wxPyTypeCast do what you want?
-Rick King
> How do you translate something like this to Python:
>
> m_Cell = (wxHtmlContainerCell*) m_Parser->Parse(newsrc);
>
> ...where Parse() returns a wxObject.
>
> This is from the wxHtmlDCRenderer. I'm trying to do something to get a
> ::SetFonts method in it like wxHtmlWindow::SetFonts.
>
> I figured I'd write it in Python, but some of the functions in
> wxHtmlDCRenderer return wxObject pointers that need to be cast to a
certain
> type, and I don't know how to do that.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
I found the notes about
>wxGetApp().Yield(True) interesting, too.
>
I forgot about that. That calls Yield, but keeps it from being called
recursively, right? I think that either showed up recently in wxPython,
or I just couldn't find it when I was fighting with Yield.
I know. I only found it when I knew the that the global Yield had been
deprecated, so I looked at the wxApp docs.
It's seems unfortunate that the onlyIfNeeded flag doesn't default to True
Does anyone one know why that is? Why would you want a recussive call to
cause an error?
and that this behaviour isn't available in the regular wxYield.
wxApp.Yield() is the "regular" Yield. the old one has been deprecated, I
don't see a need to update deprecated functions, though I am surprised
that wx.Yield isn't just a reference to wxGetApp().Yield()
Perhaps someone can shed some light on this, it seems few of us really
understand the magic of Yield()
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
On Friday 18 April 2003 11:07, Jonas Geiregat wrote:
I don't know what I'm doing wrong here,
I try to add a TreeCtrl and a wxIEHtmlWin in a splitterwindow
it won't work if I replace the TreeCtrl with an other wxIEHtmlWin it works
fine
I made something it should work but when I start it I get a message from
windows that python has encountered problemes ..
Here's the code
<-- code -->
from wxPython.wx import *
f = wxFrame(NULL,-1,"hello",size=(200,300))
s = wxSplitterWindow(f,-1)
s.SplitVertically(wxWindow(s,-1),wxWindow(s,-1))
f.Show(1)
You need to first create an application object and call it's MainLoop method:
from wxPython.wx import *
app = wxPySimpleApp()
f = wxFrame(NULL,-1,"hello",size=(200,300))
s = wxSplitterWindow(f,-1)
s.SplitVertically(wxWindow(s,-1),wxWindow(s,-1), 50)
f.Show(1)
app.MainLoop()
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I went with the idle approach. My app is now behaving in a friendly manner to users. Thanks to all who responded. I found the notes about wxGetApp().Yield(True) interesting, too.
I forgot about that. That calls Yield, but keeps it from being called recursively, right? I think that either showed up recently in wxPython, or I just couldn't find it when I was fighting with Yield. It's seems unfortunate that the onlyIfNeeded flag doesn't default to True and that this behaviour isn't available in the regular wxYield.
Yes, it's fairly new. wxYield is supposed to be deprecated and currently is just a C++ wrapper around wxGetApp.Yield for backwards compatibility.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
You shouldn't need to. That's an oversight on my part, I'll fix it to use the INOUT typemap so you can just pass a regular int and will get the result back as one of the return values.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!