[wxPython] OOR problem

Yo all,

I'm using wxPython 2.3.1 (but 2.3.0 exhibits the same behavior), Python
2.1.1, and Windows 2000.

Unfortunately the new OriginalObjectReturn code returns an instance of
wxStaticTextPtr [which has no SetValue method], rather than one of
wxStaticText, in the code from which the stack trace below is generated...
(I'm [re-] working on some code to pop up dialogs for un-caught exceptions.)

Can someone (Robin I imagine...?) please give me some idea where I'm doing
something stupid?

I get the following stack tracebacks (Only one is included here because the
2 are identical), WHETHER I ENCLOSE THE FindWindowById's in an appropriate
wxPyTypeCast() OR NOT:

(For wizards only) Traceback (most recent call last):
  File "C:\Python21\wxPython\demo\ErrorDialogs.py", line 70, in ?
    app = MyApp(0)
  File "c:\python21\wxPython\wx.py", line 1617, in __init__
    _wxStart(self.OnInit)
  File "C:\Python21\wxPython\demo\ErrorDialogs.py", line 57, in OnInit
    runTest(None,None,None)
  File "C:\Python21\wxPython\demo\ErrorDialogs.py", line 64, in runTest
    frame = MyFrame(pframe)
  File "C:\Python21\wxPython\demo\ErrorDialogs.py", line 19, in __init__
    whendismissed="from wxPython.wx import * ; wxBell()")
  File "c:\python21\wxPython\lib\ErrorDialogs.py", line 258, in __init__
    self.SetProgramName(programname)
  File "c:\python21\wxPython\lib\ErrorDialogs.py", line 340, in
SetProgramName
    c.SetValue(value)
AttributeError: wxStaticTextPtr instance has no attribute 'SetValue'

incidentally (by way of explanation), c is returned by a method as
        return self.FindWindowById(ID_EXCEPTIONNAME)
or
        return wxPyTypeCast( self.FindWindowById(ID_EXCEPTIONNAME),
"wxStaticText" )

My apologies if I'm been something stupid, or haven't given enough
information here...

Thanks,

Chris

···

-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com>
         or <mailto:Chris.Fama@uq.net.au>
Brisbane, Australia
Phone: (0/+61)(7) 3870 5639 {10am-10pm GMT+10 on both these numbers please}
Mobile: (0/+61)(400) 833 700
-------------------------------------------------------------------------
Business page: <http://whollysnakes.com>
Personal page: <http://uq.net.au/~zzcfama>
-------------------------------------------------------------------------

I'm using wxPython 2.3.1 (but 2.3.0 exhibits the same behavior), Python
2.1.1, and Windows 2000.

Unfortunately the new OriginalObjectReturn code returns an instance of
wxStaticTextPtr [which has no SetValue method], rather than one of
wxStaticText, in the code from which the stack trace below is generated...

It has nothing to do with OOR, you're probably looking for SetLabel.
wxStaticText doesn't have SetValue.

···

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

Thank and apologies--I'm a blithering idiot who didn't think to double- and
triple-check the documentation!

Cheerio, Chris

···

-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com>
         or <mailto:Chris.Fama@uq.net.au>
Brisbane, Australia
Phone: (0/+61)(7) 3870 5639 {10am-10pm GMT+10 on both these numbers please}
Mobile: (0/+61)(400) 833 700
-------------------------------------------------------------------------
Business page: <http://whollysnakes.com>
Personal page: <http://uq.net.au/~zzcfama&gt;
-------------------------------------------------------------------------

----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, August 30, 2001 1:57 AM
Subject: Re: [wxPython] OOR problem

>
> I'm using wxPython 2.3.1 (but 2.3.0 exhibits the same behavior), Python
> 2.1.1, and Windows 2000.
>
> Unfortunately the new OriginalObjectReturn code returns an instance of
> wxStaticTextPtr [which has no SetValue method], rather than one of
> wxStaticText, in the code from which the stack trace below is

generated...

It has nothing to do with OOR, you're probably looking for SetLabel.
wxStaticText doesn't have SetValue.

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

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users