Ed Leafe wrote:
Log: Added a Refresh event. This is raised when dForm.refresh() is called. All dPemMixin classes will receive it, and fire their refresh() hook method.Added dynamic properties. Every property can be made dynamic by prefixing it with 'Dynamic'. Dynamic props are set to any callable function; when the object receives a Refresh event, the function's return value is used to set the value of the underlying property. Example: given a label and a function 'currTime()' in a form that returns the current time, issuing the following: label.DynamicCaption = label.Form.currTime will result in the label's Caption property being updated every time label.Form.refresh() is called with the value of the current time. Also added two methods to dabo.ui for converting image data back to bitmaps and images. These were necessary because I noticed that when Editor.py was called from locations other than its own directory, the image file for the function button was not found. The solution was to convert the .png file to a data stream using wx.tools.img2py.py, and store that in Editor.py.
This is really cool, I've been mulling over how to do this for a while now. I have two concerns, however:
1) When does wx's Refresh() ever get called? Perhaps I missed it, but I think you removed it.
2) I'm wary of overriding __getattr__ and __setattr__. We tend to get bitten later on when we do this. However, I can't see anything wrong with what you've done, I just wanted to mention it...
-- Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
