wx.Notebook Events:One appears to work for me and one doesn't

My app currently has two tabs on the Notebook. Some of the data on the second tab relies on data from the first page. So I captured EVT_NOTEBOOK_PAGE_CHANGING to update the data on the second tab when that tab got clicked.

It worked great the first time I changed data on the first tab and then changed to the second tab. Everything was exactly as it should have been. Changing back to the first tab updating the data and then changing back to the second tab caused a bus error. I tried event.Skip(True) and event.Skip(False) in the event handler, but nothing I tried prevented the bus error.

I decided to try the other event EVT_NOTEBOOK_PAGE_CHANGED, and without touching my code other than changing the event name, everything worked as expected. I’m puzzled by this, and while it’s not holding up my project, I’d love to know if anyone has seen something similar or could give me some pointers on what I might have been doing wrong with the first event.

As an aside, I’ve been using GMail’s rich text, I kind of like being able to make the code fixed with and the body text proportional, but there are too many years of ingrained training that make me cringe at sending rich text emails. As readers on this list do you prefer plain text or do you prefer the rich text? Or do you care?

···


Stand Fast,
tjg. [Timothy Grant]

My app currently has two tabs on the Notebook. Some of the data on the
second tab relies on data from the first page. So I captured
EVT_NOTEBOOK_PAGE_CHANGING to update the data on the second tab when that
tab got clicked.

Tim,

   Is each page a separate module? If so, use a distinct module to transfer
data among the others.

As readers on this list do you prefer plain text or do you prefer the rich
text? Or do you care?

   I use pine and dispise html or other eye-candy-enabled text. Yes I care.
Perhaps when books, magazines, and newspapers print text in different
typefaces and colors (and include smileys and other pictures embedded in the
lines) I might accept other formats. Until then, I want to see plain text
for the expression of thoughts in words.

Rich

···

On Fri, 1 Aug 2008, Timothy Grant wrote:

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Timothy Grant wrote:

My app currently has two tabs on the Notebook. Some of the data on the second tab relies on data from the first page. So I captured EVT_NOTEBOOK_PAGE_CHANGING to update the data on the second tab when that tab got clicked.

It worked great the first time I changed data on the first tab and then changed to the second tab. Everything was exactly as it should have been. Changing back to the first tab updating the data and then changing back to the second tab caused a bus error. I tried event.Skip(True) and event.Skip(False) in the event handler, but nothing I tried prevented the bus error.

I decided to try the other event EVT_NOTEBOOK_PAGE_CHANGED, and without touching my code other than changing the event name, everything worked as expected. I'm puzzled by this, and while it's not holding up my project, I'd love to know if anyone has seen something similar or could give me some pointers on what I might have been doing wrong with the first event.

Did you try narrowing down what it was within the event handler that was crashing? Did it still crash if you only caught the event and didn't do anything else like fetching values or updating widgets?

As an aside, I've been using GMail's rich text, I kind of like being able to make the code fixed with and the body text proportional, but there are too many years of ingrained training that make me cringe at sending rich text emails. As readers on this list do you prefer plain text or do you prefer the rich text? Or do you care?

I tend to prefer plain text in most cases. My biggest gripe with messages from gmail however is that they assume that any series of four dot separated numbers (like a wxPython version number) is an IP address and they turn it into a URL link.

···

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

Timothy Grant wrote:

My app currently has two tabs on the Notebook. Some of the data on the second tab relies on data from the first page. So I captured EVT_NOTEBOOK_PAGE_CHANGING to update the data on the second tab when that tab got clicked.

It worked great the first time I changed data on the first tab and then changed to the second tab. Everything was exactly as it should have been. Changing back to the first tab updating the data and then changing back to the second tab caused a bus error. I tried event.Skip(True) and event.Skip(False) in the event handler, but nothing I tried prevented the bus error.

I decided to try the other event EVT_NOTEBOOK_PAGE_CHANGED, and without touching my code other than changing the event name, everything worked as expected. I'm puzzled by this, and while it's not holding up my project, I'd love to know if anyone has seen something similar or could give me some pointers on what I might have been doing wrong with the first event.

Did you try narrowing down what it was within the event handler that was crashing? Did it still crash if you only caught the event and didn't do anything else like fetching values or updating widgets?

I have a print statement as the last line in the event handler, and it
always executes before the seg fault. That's when I gave up trying to
track it down.

As an aside, I've been using GMail's rich text, I kind of like being able to make the code fixed with and the body text proportional, but there are too many years of ingrained training that make me cringe at sending rich text emails. As readers on this list do you prefer plain text or do you prefer the rich text? Or do you care?

I tend to prefer plain text in most cases. My biggest gripe with messages from gmail however is that they assume that any series of four dot separated numbers (like a wxPython version number) is an IP address and they turn it into a URL link.

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

Plain text it will be then.

Does anyone know how to make GMail default to plain text? I can't seem
to find that option.

···

On Fri, Aug 1, 2008 at 12:24 PM, Robin Dunn <robin@alldunn.com> wrote:

--
Stand Fast,
tjg. [Timothy Grant]

My app currently has two tabs on the Notebook. Some of the data on the
second tab relies on data from the first page. So I captured
EVT_NOTEBOOK_PAGE_CHANGING to update the data on the second tab when that
tab got clicked.

Tim,

Is each page a separate module? If so, use a distinct module to transfer
data among the others.

They're in the same module, so no intermediary required. My event
handler calls the methods on the Panel in the other tab.

···

On Fri, Aug 1, 2008 at 11:36 AM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Fri, 1 Aug 2008, Timothy Grant wrote:

As readers on this list do you prefer plain text or do you prefer the rich
text? Or do you care?

I use pine and dispise html or other eye-candy-enabled text. Yes I care.
Perhaps when books, magazines, and newspapers print text in different
typefaces and colors (and include smileys and other pictures embedded in the
lines) I might accept other formats. Until then, I want to see plain text
for the expression of thoughts in words.

Rich

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

--
Stand Fast,
tjg. [Timothy Grant]