Search DominoPower's 11,422 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.
PROGRAMMING POWER
The new NotesOutline class in Notes 5.0
By Tony Patton

Last month, we discussed the many enhancements to LotusScript that are part of Notes and Domino Release 5.0. One of the items mentioned was the new outline feature and its corresponding NotesOutline class. This month we'll get much more in-depth, and you'll learn how to script with outlines.

Notes Release 5.0 has a distinctive Internet flavor to it. Developing applications for both WebWeb browsers and Notes clients was a nightmare with previous versions of Notes, but Release 5.0 has made the process much simpler by eliminating the need to develop for both. The Notes client now supports all elements supported by a typical Web browser. These elements include frames, HTML, Java applets, and more.

In addition, the new outline feature in Notes 5.0 adds the ability to assemble a site map. The site map gives you an overview of what is in an application -- and that application can include more than one database. The outline can also include links to Domino databases, views, documents, and Web sitesWeb sites (i.e., URLs). The Notes Release 5.0 development environment makes it easy to create and set up an outline, as shown in Figure A, and the NotesOutline and NotesOutlineEntry LotusScript classes are provided to work with an outline in script.

FIGURE A


You can easily create a Notes outline. Roll over picture for a larger image.

Note: The first beta copy of Notes 5.0 was used in this article. Future updates to the 5.0 code may change aspects of the NotesOutline and NotesOutlineEntry classes.

A simple scripting example
Let's take a look at a short routine that makes use of the new outline features.

Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim outline As New NotesOutline(db)
Dim entry As NotesOutlineEntry
Set entry = outline.GetFirst
While Not (entry Is Nothing)
Print entry.TitleText
Set entry = outline.GetNext(entry)
Wend
End Sub

Here's an explanation of what that all means:

  • First, we declare a new NotesOutline object. The parameter is the name of the database for the outline.
  • Next, declare a new NotesOutlineEntry object. This will be used to access individual elements in the outline.
  • The GetFirst method of the NotesOutline class is used to get a handle on the first element in the outline.
  • A while loop is used to scroll through all elements in an outline.
  • The TitleText property of the NotesEntry class returns the title text assigned to an entry.
  • The GetNext method is used to retrieve the next element from the outline, the current entry is passed as a reference point.


1  ·  2  ·  Next »
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
New Notes/Domino Technotes published about Chile's extended daylight saving time
SnnT: How to prevent Google from listing your Sametime Server
How to send someone an email that shows your calendar availability
"The collection has become invalid"
More XPages onclick event weirdness...
Domino 8.5.1 Fix Pack 1 Interim Fix 1 (8.5.1 FP1 IF1) - DAOS Fixes
Domino Designer 8.5 Tip: Where Working Sets Are Stored
>> 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