18.01.2013 Views

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Contents<br />

Edition Notice ............. ..... ii<br />

Abstract ................. ..... iii<br />

Preface .................. ..... ix<br />

1 <strong>LotusScript</strong> and <strong>Visual</strong><br />

<strong>Basic</strong>: A Comparison ....... ..... 1<br />

History ........................ ....... 1<br />

<strong>LotusScript</strong> ................... ....... 2<br />

<strong>Visual</strong> <strong>Basic</strong> .................. ....... 2<br />

Programming Model Differences .... ....... 2<br />

Language Syntax Comparison ...... ....... 4<br />

Other References .............. ....... 4<br />

Data Types ................... ....... 5<br />

Operators .................... ....... 8<br />

Commands ..................... ....... 8<br />

File I/O ...................... ....... 9<br />

Other Recent Language Additions . ...... 10<br />

Error Handling ................ ...... 10<br />

On...GoSub ................... ...... 11<br />

Conditional Compilation ........ ...... 12<br />

MessageBox .................. ...... 13<br />

Constants .................... ...... 13<br />

Errors, Error Constants .......... ...... 13<br />

Extending the Code ............... ......<br />

Application Programming Interface<br />

15<br />

Calls ...................... ......<br />

Other Interesting <strong>LotusScript</strong><br />

15<br />

Commands ................ ...... 18<br />

Other Interesting <strong>Visual</strong> <strong>Basic</strong><br />

Commands ................ ...... 19<br />

Object-Oriented Programming (OOP) ...... 19<br />

<strong>Visual</strong> <strong>Basic</strong> Class Modules ...... ...... 21<br />

<strong>LotusScript</strong> Notes Classes ....... ...... 21<br />

CreateObject, GetObject ......... ...... 26<br />

Mail Enabling ................... ...... 26<br />

Code Sharing Concerns ............ ...... 27<br />

Close but Different ............. ...... 27<br />

Control Arrays ................ ...... 29<br />

<strong>Visual</strong> <strong>Basic</strong> Environment Constants ...... 29<br />

2 The Notes Integrated<br />

Development Environment . . .... 31<br />

Introduction .................... ...... 31<br />

Elements of the Forms Integrated<br />

Development Environment .... ...... 32<br />

Main Design Window .......... ...... 32<br />

Action Pane .................. ...... 33<br />

Design Pane .................. ...... 34<br />

Working with the Script Editor ...... ...... 38<br />

Special Script Editor Features ..... ...... 38<br />

Error Checking ................ ...... 40<br />

Testing the Form ............... ...... 40<br />

Debugging <strong>LotusScript</strong> .......... ...... 40<br />

3 <strong>LotusScript</strong> Notes Classes .... 45<br />

The Database (back_end) Classes .... ...... 47<br />

NotesACL .................... ...... 48<br />

NotesACLEntry ............... ...... 48<br />

NotesAgent ................... ...... 50<br />

NotesDatabase ................ ...... 51<br />

NotesDateRange ............... ...... 55<br />

NotesDateTime ................ ...... 56<br />

NotesDbDirectory ............. ...... 57<br />

NotesDocument ............... ...... 58<br />

NotesDocumentCollection ....... ...... 62<br />

NotesEmbeddedObject .......... ...... 64<br />

NotesForm ................... ...... 65<br />

NotesInternational ............. ...... 66<br />

NotesItem .................... ...... 67<br />

NotesLog .................... ...... 68<br />

NotesName ................... ...... 70<br />

NotesNewsletter ............... ...... 71<br />

NotesRichTextItem ............. ...... 72<br />

NotesSession .................. ...... 73<br />

Contents v

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!