: 4582 | 108638 | 12353

circular use of script libs 
New idea submissions, commenting and voting are no longer available on this site. Logins have also been disabled.
Use this IdeaSpace to post ideas about Domino Designer.

: 25
: 27
: 2
: Domino Designer
: oop, script_library
: Jan Schulz4398 23 Mar 2008
:
: / Email
Why does code like this (Visitor Pattern):
 
class User
    sub invite(b as Visitor)
          b.visitUser(me)
    end sub
    sub doSomething()
    end sub
end class
 
class Visitor
    sub visitUser(a as User)
       a.doSomething()
    end sub
end class
 
work in one class lib, but not when seperated into two libs ("Illegal Circular use")?
 
This makes some OOP concepts (in this case Visitors, which call the User back) impossible when seperating code into different libs or you get huge script libs (ls.doc only work with so long libs and it also means you touch all code when you just want to change one bit).
 
Please make this error go away!



1) Bill McNaughton40 (24 Mar 2008)
Agree, problem's been there since R5 and does impose unnecessary constraints when trying to build modular script library designs.
2) Rob Goudvis6585 (25 Mar 2008)
Yes, please: can't wait until this implementation!
3) Willy L53 (08 Sep 2008)
First, your code doesn't compile. It has two errors.

Second, you can use two libraries just fine.

UserLib
Class User
Sub invite(b As Variant)
b.visitUser Me
End Sub
Sub doSomething()
End Sub
End Class


VisitorLib
Class Visitor
Sub visitUser(a As Variant)
Call a.doSomething()
End Sub
End Class


Agent Visitor Test
Options
Use "UserLib"
Use "VistorLib"

Sub Initialize
Dim User As New User
Dim Visitor As New Visitor

Call Visitor.VisitUser( User )
End sub
4) Jan Schulz4398 (18 Nov 2008)
@3: this is using variants, so is not compile save :-(










:
:




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 >>


0
Use more customization features in ND9 NotesMail
13
Two-week Calendar view
3
@Formula library
25
Drafts - unsent count?
2
New Hide-When property
3
Activity Logging for Quickr
5
"follow-up complete" flag
15
Remake Resource Reservation template using XPage
6
Boolean operators on LDAP group based access control
17
Store IP Address / remote host data in Password Lockout documents
18
Checking Out-Of-Office status of others
7
DocumentCollection.search(@formula)
23
Tool to show unreferenced design elements for easy cleaup
5
Bring sametime audio and video into the web browser using WebRTC
17
"Window Title" for views
17
QuickR application/widgets for Android/iPhone
21
Create Computed Text with the same text style as the current paragraph
9
@Function and LotusScript to "View..Customize This View" dialog
8
Extend the 'User detail' info of a database
17
Print of calendar in color
6
Shared Actions belong under Shared Elements
20
Facelift all web enabled templates with xPages
3
Please extend WebDAV to include calDAV & cardDAV support for contacts/calendar syncing
2
Skin-ing Notes Design elemens
14
Add some views into the "Views" section of the Notes 8.5 mailbox






IdeaJam developed by

Elguji Software Logo