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 |