|
|
|
|
|
|
|
|
|
|
|
|
|
|
R5: FileOpenDialog and Prompt methods (continued)
Using Prompt with a list of values
The next example allows the user to select from a list of values. Figure C shows that dialog in action.
FIGURE C
 
Choose your favorite player in this nice list dialog. Roll over picture for a larger image.
In this example, we again declare the variables to be used. Next, we initialize the array of selection values. Using the Prompt method, we prompt the user for the selection. Finally, a non-empty value (e.g., returnValue <> "") signals a selection was made. Let's look at that in one chunk:
Dim uiwork As New NotesUIWorkspace
Dim returnValue As String, possibleValues(5) As String
possibleValues(0) = "Julius Erving"
possibleValues(1) = "Moses Malone"
possibleValues(2) = "Charles Barkley"
possibleValues(3) = "Wilt Chamberlain"
possibleValues(4) = "Maurice Cheeks"
possibleValues(5) = "Bobby Jones"
returnValue = uiwork.Prompt(PROMPT_OKCANCELLIST,"Survey",Who was the greatest Philadelphia 76er of all time?","",possibleValues)
If (returnValue <> "") Then
Print "Your favorite player is " & returnValue
Else
Print "Sorry, but no selection was made."
End If
|
Conclusion The addition of the Prompt and FileOpenDialog methods provide functionality that has been on the wish list of many developers for some time. This functionality previously required complicated workarounds with the Windows API, which is a bit too much work for something that is standard in other development environments. We're really glad to see it finally arriving in R5.
Dan Velasco is a Senior Technical Editor for WebSpherePower Magazine and DominoPower Magazine. He's a Sun Certified Java Programmer, Sun Certified Web Component Developer and an IBM Certified Solution Developer for WebSphere Studio V5.0. He's also a Principal CLP Application Developer (R4, R5 and ND6) as well as a CLP System Administrator (R4 and R5). You can reach him via email at dvelasco@webspherepower.com or on the Web at http://DanVelasco.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- Advertisement --
Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.
Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).
Tap here to get started! |
|
|
|
|
|
|
|
|
|
|