: 4557 | 108237 | 12276

Add class methods and attributes to LotusScript 
Use this IdeaSpace to post ideas about Domino Designer.

: 22
: 22
: 0
: Domino Designer
: LotusScript, OOP
: Thomas Bahn3669 03 Nov 2007
:
: / Email
In other OO programming languages, there are class methods and attributes. These members are shared by all objects of the class.
 
In Java, these members are flagged by the "static" modifier before the identifier.
 
Class methods can be called on the class itself without the need for an object.
 
They are essential for some class "self-management" capabilities, like counting the instances of a class or having a list of all created objects.
 
Class members are necessary for the common Singleton design pattern and useful for object pools (like database connections).



1) Kenneth Axi1694 (04 Aug 2011)
Hmmm... I don't quite understand this request...

"Method" is called Sub or Function in LS
"Attributes" are called Property in LS

To be able to call a Method/Function without a class/object - place it in the scriptlibrary outside the function and all classes can call it without any object.

Or what am I missing here?
2) Thomas Bahn3669 (05 Aug 2011)
You miss the difference between class and instance members. ;-)

In LotusScript you only have instance members (Sub, Function, Property, Dim), but no class members.

If you want, e.g. count the objects created using a certain class, you need to have a common variable = attribute for all objects, not one for each object.

This could be the code, if LotusScript had class members:

Class Car
Static Dim carsTotal As Integer ' class attribute, static is the modifier used in Java

Public Sub New()
carsTotal = carsTotal + 1
End Sub

Static Function GetCarsTotal As Integer ' class method
GetCarsTotal = carsTotal
End Function
End Class

Class members could be used for central logging of object creation and destruction, object pools, central caching etc.

Have a look at common design patterns, especially Creator/Builder patterns for more use cases of class members.
3) Kenneth Axi1694 (05 Aug 2011)
Ah - now I understand...! Always good to show with example code.
Ok - You got my vote!










:
:

Welcome to IdeaJam™


You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>


6
Enable moving Notes workspace page
24
Getdocumentbykey should work using programmable sorted columns
21
Make task functionality with // TODO comments in Java available for LotusScript etc
10
Desktop Policy Settings Doc needs settings for full text index on local mail replicas
20
Add HTTP2 support to Domino
13
Publish a roadmap!
10
Provide a script to benchmark Notes Traveler servers
2
Client Version data is no longer collected after migrating to SmartCloud
3
Javascript editor that flags common errors between serverside & clientside
2
Need ability to import .ics files when using a browser in SmartCloud Notes
5
Add 'Group by Date' view option to iNotes as it is in Notes client
3
Need to be able to see which users do not have their ID file uploaded to the ID Vault in SmartCloud
2
Allow HideWhen on multiply selected outline entries
-1
make it easier to get from view or form to its related XPage
4
SmartCloud user accounts page: Change Jump to Page to Jump to User
25
Option ExtendedSyntax False (or NotesDocumentExtended False)
6
Better Administration Tools for IBM Connection
11
Add functionality in IdeaJam to Automatically create an SPR for the enhancement request with IBM
2
Extend existing webservices of IdeaJam
11
Give Administrators better control over Deletions
4
All-Day reservation in the ressource database
36
allow lists and arrays as return types from functions
20
Enable 'CAPTCHA' for a web form with the click of a button
6
Weekly/Monthly email of new Ideas and Comments from IdeaJam
25
circular use of script libs






IdeaJam developed by

Elguji Software Logo