If I use a line like 'someBoxSizer.Add(input, 0)' when someBoxSizer is valid but input doesn't exist, it crashes Python, rather than raising any kind of exception as I would have expected. I don't know where in the chain this is occuring, so I thought I'd post here as I doubt this would be desirable! Maybe others can reproduce this behaviour.
Using Python 2.3.2 and wxPython 2.4.2.4 on Win98SE.
···
--
Ben Sizer (appropriate name, given the topic...)
If I use a line like 'someBoxSizer.Add(input, 0)' when someBoxSizer is valid but input doesn't exist, it crashes Python, rather than raising any kind of exception as I would have expected. I don't know where in the chain this is occuring, so I thought I'd post here as I doubt this would be desirable! Maybe others can reproduce this behaviour.
What exactly is item?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
If I use a line like 'someBoxSizer.Add(input, 0)' when someBoxSizer is valid but input doesn't exist, it crashes Python, rather than raising any kind of exception as I would have expected. I don't know where in the chain this is occuring, so I thought I'd post here as I doubt this would be desirable! Maybe others can reproduce this behaviour.
What exactly is item?
Sorry, I don't understand the question: which item? The box sizer in
question was created using wxBoxSizer(wxHORIZONTAL).
If I use a line like 'someBoxSizer.Add(input, 0)' when someBoxSizer is valid but input doesn't exist, it crashes Python, rather than raising any kind of exception as I would have expected. I don't know where in the chain this is occuring, so I thought I'd post here as I doubt this would be desirable! Maybe others can reproduce this behaviour.
What exactly is item?
Sorry, I don't understand the question: which item? The box sizer in
question was created using wxBoxSizer(wxHORIZONTAL).
Sorry. I was thinking one thing and typed another. I meant what is the 'input' a reference to?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Sorry. I was thinking one thing and typed another. I meant what is the 'input' a reference to?
Ok... in my original post I had believed input to be a null reference, since I hadn't defined it. (I'd meant to use self.input, but forgot the 'self' - I'm a C++ programmer originally.) So getting a crash rather than a AttributeError or whatever surprised me.
But just now I realised that what is probably happening is that the inbuilt input() function is being passed to the wxBoxSizer.