Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


« Previous  ·  1  ·  2  ·  3
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- 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!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login