|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV SYS-CON.TV WEBCASTS |
POWERBUILDER LINKS YOU MUST CLICK ON Cover Story PowerBuilder Feature Story: "Context-Sensitive Help"
As I started a new PocketBuilder application, I wanted to encompass some of the "context sensitive" help features
By: Chris Pollach
Jan. 18, 2006 07:15 PM
The latest version of the STD FCs for PocketBuilder 2.0.3 includes the retrofit described above. Also, the sample Order Entry application for version 2.0.3 of PocketBuilder now includes the demonstration of the use of the MicroHelp feature (see Figure 12). The FCs and sample application have been uploaded to Sybase's CodeXchange Web site. In the sample Order Entry application, the Controller dialog allows the user to access functionality from the command buttons within a DataWindow. The DataWindow command buttons have context-sensitive help attached to their "tag" property. To display this information at runtime, code was placed on the "ButtonClicking" event of the DataWindow control. What is nice about this event is that a pointer to the current control object is passed to the PowerScript code (named DWO), which allows the developer to introspect the subordinate object's properties. Adding the inclusional polymorphic function, the context information can be easily displayed with a simple statement such as: THIS.of_set_statusBar (DWO.Tag).
Bubble Help (PowerTipText) The ancestor code of the "of_set_nb_message" method instantiates a user object class of type "ns_notification_bubble_master" that allows communication to the Pocket PC operating system for the use of this feature. One of the problems I had encountered in the past using this feature was when the issuing window did not close the notification bubble. This left the notification bubble in "limbo" and the user was not able to remove the notification until the application fully closed. To get around this problem, the STD FCs were enhanced to always add an OK command button to the notification bubble. By doing so, I found that the user could also reactivate the notification bubble at any time and respond to the "OK." If the window instance that originally opened the notification bubble was closed, the Pocket PC operating would clean up the notification bubble. This was a great discovery. By adding a command button feature though, the notification bubble is also able to communicate to its issuing window class (see Figure 13). To accomplish this, the notification bubble sends a "pbm_command" message to the instantiating window class. The STD FCs were extended at the base Window class with an "oe_command" user event to allow the capture of the communicae from the notification bubble to the issuing window instance. This allowed a full communication circle from the Window instance to the notification bubble instance and back again. If we now couple the automatic population of the Tag property from the comment text in the ASA database with the STD FCs' easy use of the notification bubble feature, the context sensitive help was an easy reach. The only question was how to initiate the help request, as the Pocket PC does not support any function keys or the use of the context-help question mark on response dialogs. To help with the context-help initiation, the STD FCs were extended at the base PopUp menu class level to include a "Help" menu item. This can be easily activated by the Pocket PC stylus with a "Tap and hold" action. The popup menu understands the control that instantiated it and the help menu redirects a "oe_help" user event back to the control. The GUI control in turn can extract the control's tag properties (or the DataWindow object's current column's tag) and redirect a notification bubble request to the parent window. Ancestor code in the base window class takes care of the notification bubble instantiation and HTML message text wrapping. In the STD FCs, the only action required by the Pocket PC developer to allow this behavior is to set the "ib_help_required" property of any control to TRUE. This makes the help menu item appear on the pop-up and the notification bubble context help feature enabled at runtime. The developer can set this property in the Window painter or at runtime under script control.
YOUR FEEDBACK
PBDJ LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING POWERBUILDER / SYBASE NEWS
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||