Lotus Notes Error 5 Illegal Function Call
function call Domino Designer; Notes; Workstation/Desktop; Application Development; LotusScript Technote (FAQ) Question A LotusScript agent that uses the Dir function results in the following error: "Illegal function call" This occurs in cases where the code uses the Dir function in a subroutine (or function). The error occurs when the function is called again after being called within the subroutine (or function). For example: The application below was designed to cycle through both files and subdirectories. The application calls the subroutine Sub1 when a subdirectory is encountered. Once the subroutine has been exited and the Dir function is called again, the error occurs. Option Public %INCLUDE "lsconst.lss" Sub Initialize filelevel1$ = Dir$("C:\", ATTR_DIRECTORY) While (filelevel1$ <> "") If Instr(1, filelevel1$,".")=0 Then Call sub1(filelevel1$) ' The line below triggers the error "Illegal Function Call" filelevel1$ = Dir$() Wend End Sub Sub sub1(level1 As Variant) If Instr(1, level1,".")=0 Then filelevel2$ = Dir$("C:\"+level1+"\*.*") While (filelevel2$ <> "") ' Perform desired operation on file in sub-directory ' Below accesses next file in sub-directory filelevel2$=Dir() Wend End Sub Answer This is a limitation of the Dir function. This function is not designed to operate in a recursive manner; it does not save a history of the calls made to it. A request to clarify the documentation on this issue has been submitted to Quality Engineering as SPR# CDCO4MNH6H. This issue can be avoided by calling the Dir function within a subroutine which is called recursively. Each time the subroutine is called the returned Dir detail is saved to an array which is retained as the subroutine is called recursively. NOTE: The code examples below are sample scripts, provided to illustrate one way to approach this issue. In order for the examples to perform as intended, they must be laid
Training Support Forums & community Events Rational Tivoli WebSphere Java technology Linux Open source SOA and Web services Web development XML My developerWorks About dW Submit content Feedback developerWorks>Lotus>Forums & community>Notes/Domino 4 and 5 Forum Notes/Domino 4 and 5 Forum RE: Dir$ Illegal Function CallPosted by Gary A Steele on 8.Oct.98 at 05:05 AM using http://www-01.ibm.com/support/docview.wss?uid=swg21088070 a Web browserCategory: Notes Designer -- LotusScriptRelease: Platform: Is the problem that your using a front end ui method "setfieldtext" with a backend object "doc" ? Sub Click(Source As Button) Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim doc As NotesDocument Set uidoc = ws.CurrentDocument Set http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/94e0df89c376336b852566970031f873?OpenDocument doc = uidoc.Document Dim pathname As String pathname$ = "d:\\html\graphics\people\" + uidoc.FieldGetText("badge") + ".jpg" If Dir$(pathname$,0)<>"" Then Call doc.FieldSetText("Photo","") Else Call doc.FieldSetText("Photo","") End If Call doc.Save(True,True) Call uidoc.Save End Sub Return to top Dir$ Illegal Function Call (J L Mawhinney 16.Dec.97) . . RE: Dir$ Illegal Function Call (Cal Harris 16.Dec.97) . . RE: Dir$ Illegal Function Call (Gary A Steele 8.Oct.98) Document options Print this page Search this forum Forum views and search Date (threaded) Date (flat) With excerpt Author Category Platform Release Advanced search RSS feeds All forum posts RSSAll main topics RSSMore Lotus RSS feeds Resources Forum use and etiquette Native Notes Access Web site Feedback Lotus Support Lotus Support Product support pages index Search knowledge base (Technotes) Search support downloads Lotus Support RSS
Technology and Trends Enterprise Architecture and EAI ERP Hardware IT Management and Strategy Java Knowledge Management Linux Networking Oracle PeopleSoft Project and Portfolio Management SAP SCM Security Siebel Storage UNIX Visual http://knowledgemanagement.ittoolbox.com/groups/technical-functional/ibm-lotus-notes-l/illegal-function-call-error-1671974 Basic Web Design and Development Windows < Back CHOOSE A DISCUSSION GROUP Research Directory TOPICS Database Hardware Networking SAP Security Web Design MEMBERS Paul_Pedant DACREE MarkDeVries VoIP_News Inside-ERP MacProTX I_am_the_dragon Inside-CRM maxwellarnold Michael Meyers-Jouan TerryCurran Chris_Day Andrew.S.Baker Ramnath.Awate JoeTorre Locutus Dennis Stevenson Craig Borysowich Richard DukeGanote mircea_luca bracke iudithm Clinton Jones Nikki Klein AbhaiTripathi Iqbalyk bluesguyAZ59 blrvenkat jakarman COMPANIES Sophos EdgeWave Skybot Software Epicor Software ... lotus notes View All Topics View All Members View All Companies Toolbox for IT Topics Knowledge Management Groups Ask a New Question IBM Lotus Notes For discussion on IBM Lotus Notes , please visit the Knowledge Management – General Discussions group. More Knowledge Management Groups Your account is ready. You're now being signed in. Solve problems - It's Free Create your account in seconds E-mail address is taken If lotus notes error this is your account,sign in here Email address Username Between 5 and 30 characters. No spaces please The Profile Name is already in use Password Notify me of new activity in this group: Real Time Daily Never Keep me informed of the latest: White Papers Newsletter Jobs By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy. Illegal Function Call error Ummi asked Oct 26, 2007 | Replies (5) Hi , I want to set a rule in lotus notes forr accessing the mail from our domain account to a gmail account. But when i created the rule i got the error message that "Illegal Function Call" I did the following step Open Lotus notes Point to Tools >> Rules Edit Rule >> Create Condition >> All Documents Specify Actions >> Send Copy to >> Full > My email address When i click ok i got the error message that Illegal Function Call I have checked with other rules , but strange other rules are working well. Only Problem occues when i select the all documents Can you help me to solve this? Regrds AMB Join this g