User Interface Competencies

Posted on
Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone

Questions derived from the 737 – IBM Lotus Notes Domino 7 Using LotusScript in IBM Lotus Domino 7 Applications Self Test Software Practice Test.

 

Objective: User Interface Competencies
SubObjective: Accessing documents using UIDocument

 

Item Number: 737.4.2.3
Single Answer, Multiple Choice

 

Which of the following code samples will access the current document and place the cursor in a field named “SalesAgent?”

 

A. Dim uiw As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = uiw.CurrentDocument
Call uidoc.GoToField(“SalesAgent”)

 

B. Dim uiw As New NotesUIDatabase
Dim uidoc As New NotesUIDocument
Set uidoc = uiw.CurrentDocument
Call uidoc.GoToField(“SalesAgent”)

 

C. Dim uiw As New NotesUIWorkspace
Dim uidoc As New NotesUIDocument
Set uidoc = uiw.CurrentDocument
Call uidoc.GoToField(“SalesAgent”)

 

D. Dim uiw As New NotesUIWorkspace
Dim v As NotesUIView
Dim uidoc As NotesUIDocument
Set uidoc = uiw.CurrentDocument
Call uidoc.GoToField(“SalesAgent”)

 

Answer:
A. Dim uiw As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = uiw.CurrentDocument
Call uidoc.GoToField(“SalesAgent”)

 

Tutorial:
The current document is accessed through the NotesUIWorkspace. “Current document” refers to the document that is being displayed in the Notes client when the script is executed. The NotesUIDocument class is used to represent the current document.

 

To access the current document you must follow the user interface class hierarchy. In the hierarchy you would begin with the NotesUIWorkspace. Next, you access the current UI document. Once the document has been accessed, you can access the desired field. The code would be as follows:

 

Dim uiw As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = uiw.CurrentDocument
Call uidoc.GoToField(“SalesAgent”)

 

The first line of code above accesses the NotesUIWorkspace. The second line of code accesses the current document using the NotesUIDocument class. CurrentDocument is a method of the NotesUIWorkspace. It is used to access the document currently open in the Notes client.

 

The “Set” keyword is used to instantiate the current document.

 

Reference:
1. Domino Designer 7 Help – search on: CurrentDocument property

 

2. Domino Designer 7 Help – search on: NotesUIDocument class

 

3. Programming Guide Volume 2 – LotusScript/COM/OLE Classes – Chapters 1 and 2 http://doc.notes.net/uafiles.nsf/docs/DESIGNER70/$File/prog2.pdf

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment: