d***@netzero.com
2004-11-02 02:53:39 UTC
While developing BITPIM support for the Samsung SCH-A650/A310, I came across a need to provide/display feedback info to users of various get/send phone data operations. As a result, I added a simple mechanism that allows individual com_* phone classes to record/report text messages to gui, which would then display them in a simple MessageDialog.
To use this feature, in the beginning of get/save routine, call:
reportinit(<operation name>, <result dict>)
where
<operation name>: text name of the current operation, for ex: 'Save Phonebook'. This name is for display purposes only.
<result dict>: the result dict normally being passed from gui to Phone and back.
Subsequently, to add text to be displayed, just call:
report(<text to be displayed>)
After all get/set ops are done, gui would then display all of these texts in a MessageDialog. This mechanism is compatible with existing code since if your routines do nothing, nothing will be displayed afterward (current behavior).
I submitted the code to Stephen and he suggested that I put some info out the list. All comments & suggestions are welcome.
Thanks,
-Joe Pham
________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/ month - visit http://www.netzero.com/surf to sign up today!
To use this feature, in the beginning of get/save routine, call:
reportinit(<operation name>, <result dict>)
where
<operation name>: text name of the current operation, for ex: 'Save Phonebook'. This name is for display purposes only.
<result dict>: the result dict normally being passed from gui to Phone and back.
Subsequently, to add text to be displayed, just call:
report(<text to be displayed>)
After all get/set ops are done, gui would then display all of these texts in a MessageDialog. This mechanism is compatible with existing code since if your routines do nothing, nothing will be displayed afterward (current behavior).
I submitted the code to Stephen and he suggested that I put some info out the list. All comments & suggestions are welcome.
Thanks,
-Joe Pham
________________________________________________________________
Speed up your surfing with NetZero HiSpeed.
Now includes pop-up blocker!
Only $14.95/ month - visit http://www.netzero.com/surf to sign up today!