r4 - 18 Jun 2006 - 09:58:49 - ReidEllisYou are here: OSAF >  Projects Web  >  DevelopmentHome > ApplicationProject > GeekTalks > GeekTalk060506

Markup Bar and Multistate Button

  • Host: Reid (remotely)
  • Date: Monday June 5th 2006 @ 2pm
  • Where: Whoville

Would it be possible to use SubEthaEdit to go over the code? It's Mac-only, but its multi-user capabilities are ideal for a code review.

Update: we started by using VNC, but because refreshes were so slow, and since we were just looking at source code, everyone ended up just looking at the code in their own editors (with line numbering turned on!) and we shut down VNC.

Agenda and Notes

The objective of this Geek Talk session is to review the code and architecture of the new markup bar and multistate button. People interested in reusing this code should attend the meeting.

References

* wxPython GenBitmapButton? class documentation
* chandler/util/MultiStateButton.py (rev 10663)
* internal/wx/wxPython/wx/lib/buttons.py

Suggested changes:

Line(s) Changes
move MultiStateButton from util to parcels/osaf/framework/Blocks
talk to RobinDunn about earlier idea of adding it to wxPython itself though
12–17 make "stateName" a global, and "normal", "normalBitmap" etc a global list
103 rename "stateBitmaps" to "stateBitmapInfos" since that's what it is
108–110 use default parameter in arg list of __init__(), e.g. helpString = None
134 remove line - found isn't used any more in the code
147 move BitmapInfo test to be first one, since it's the one we use in Chandler
188 make "statemap" an instance variable rather than calculating it every time
195 is this an unneeded assert?
203–204 ask JohnAnderson what should be called at this point for refresh (or experiment?) also lines 216-218
248 we had much discussion about what file formats and specific filename extensions should be supported; how do we build such a list, etc. In the end it was decided that as long as png, gif and jpg are mentioned, this hard-coded list is fine.
250–255 might want to use try: bitmap=convertToBitmap(img) except: bitmap=img
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.