Discussion:
[BitPim-devel] Even newer wxPython version
Roger Binns
2005-03-04 16:56:46 UTC
Permalink
Robin fixed the bug that crashed us. I've done a quick
test of the new version on Windows and it all seems
to work well.

http://starship.python.net/crew/robind/wxPython/daily/20050303/

Roger
Adit Panchal
2005-03-05 06:16:04 UTC
Permalink
Works great for me.

I also noticed two things on the Mac, wx.Bitmap was switched to use
Quartz. This gives a lot better quality on the bitmaps. Also the
toolbars look more native. This means that the workaround for the
resizing of toolbar images for the Mac can be taken out once the new
version of wxPython is being used for the builds. Patch is attached.

Additionally, I found out that in the phonebook entry editor, by
default, nothing is selected when you add a new contact. If you press
any of the toolbars (with the exception of add) you get an exception of
an IndexError. I put try and except blocks for these and it takes care
of the problem.

The best news is that the calendar entry editor finally works for me on
the Mac. It always brought up an exception when adding a new event. Now
it works very well.

Thanks,

Adit
Roger Binns
2005-03-07 08:42:15 UTC
Permalink
Post by Adit Panchal
I also noticed two things on the Mac, wx.Bitmap was switched to use
Quartz.
I wonder if the wxBitmap to wxImage conversions are faster as well.
They were *really* slow before.
Post by Adit Panchal
This means that the workaround for the
resizing of toolbar images for the Mac can be taken out once the new
version of wxPython is being used for the builds. Patch is attached.
Ok. That will be applied when we actually move to that version of
wxPython which should be shortly after our next build.

You may also want to have a look at all the other places in the
code that work around various Mac issues. Hopefully many of them
can be removed.
Post by Adit Panchal
Additionally, I found out that in the phonebook entry editor, by
default, nothing is selected when you add a new contact. If you press
any of the toolbars (with the exception of add) you get an exception of
an IndexError. I put try and except blocks for these and it takes care
of the problem.
I'll take a closer look at this. try/except is just sweeping the issue
under the carpet.

Roger
Adit Panchal
2005-03-08 07:23:46 UTC
Permalink
I think I found where the problem is for the IndexError. If there is no
widget selected, I just had the function return 0.

While checking this out, I found out that one of the issues stems from
the fact that there are no default widgets selected when you move from
tab to tab. This is because the choice boxes are the first widgets
created in the sizers. I switched the order around, placing the choice
boxes at the end, and when moving between tabs, it automatically gives
a focus box around the first text/"editable" box of the sizer. I
believe this is the same problem you were encountering on Linux in the
SetFocusOnValue function.

I tested all combinations with and without entries and I believe I have
sorted out the errors. The diff is attached.

Adit
Adit Panchal
2005-03-08 07:32:18 UTC
Permalink
I forgot to mention that the non-selected text boxes only occurred on
the Mac. In Windows, this wasn't an issue. In this regard, I believe
the Mac and Linux builds are working (or not working, rather) the same.
I was originally going to write an OnNotebookPageChanged method, but I
realized that if it worked in Windows, it was an OS-specific issue, and
it wasn't necessary.

Adit
Post by Adit Panchal
I think I found where the problem is for the IndexError. If there is
no widget selected, I just had the function return 0.
While checking this out, I found out that one of the issues stems from
the fact that there are no default widgets selected when you move from
tab to tab. This is because the choice boxes are the first widgets
created in the sizers. I switched the order around, placing the choice
boxes at the end, and when moving between tabs, it automatically gives
a focus box around the first text/"editable" box of the sizer. I
believe this is the same problem you were encountering on Linux in the
SetFocusOnValue function.
Adit Panchal
2005-03-10 17:13:26 UTC
Permalink
My final diff is attached to fix this problem. Now, whenever you select
a tab, the first editable box gets focus. Before, this did not occur
and pressing up, down, or delete would cause a crash. I fixed this be
re-ordering the widgets. Also, when there is no data for a tab, if you
press up, down, or delete it will complain. I returned 0 so that the
function checking for the existence of widgets won't get screwed up.

Additionally, I fixed a capitalization error of the dialog title.

Thanks,

Adit
Roger Binns
2005-03-11 08:09:49 UTC
Permalink
I fixed this be re-ordering the widgets.
I really don't like that. I just converted the method that set
focus to be done in a call after and it worked fine on Windows,
Linux and Mac. (It didn't use to work in the past).
Also, when there is no data for a tab, if you
press up, down, or delete it will complain. I returned 0 so that the
function checking for the existence of widgets won't get screwed up.
That actually breaks Add. I made all the callers pay attention
to the IndexError, typically by doing wx.Bell(), so the user knows
we saw the press and didn't like it. It could do with something
a little friendlier, such as a tooltip coming out of the button
explaining that a field needs to have focus.

Roger

Loading...