Search DominoPower's 11,323 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
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
Recommended Maintenance - Lotus Notes Traveler
Here are the slides and other materials from our Lotusphere session
Microsoft OCS awareness in Lotus Connections and Websphere Portal?
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by December 31 to save $350.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login