LotusScript On Mac OSX - Reading/Writing From/To File System

Hello Everyone,

I’ve got a database which is to be made available to Macintosh Notes clients.

The application contains a script that uses the OpenFileDialog method of the NotesUIWorkspace class. The initialDirectory$ parameter of that method is populated with the contents of a field stored in a user specific Profile document.

I had hoped that by simply specifying a Macintosh-style diectory path

(e.g. “macintosh hd:folder1:folder2:”)

in the profile document that the application would work fine but it does not.

Although the script does not generate an error the Open File dialog box does not open in the initial directory. Instead, it opens in the root directory.

The only thing I can think of to explain why the dialog box does not open in the initial directory specified is that the value in the profile document is stored in lower case and that the Mac may not like this.

Also, there is another script in the database that writes out (exports) to the file system (again using a path retrieved from the profile document) but this does generate an error on the Mac. I can’t be sure where the error occurs since there is no LotusScript Debugger in the Mac client but my guess is that the problem is (again) the way I am specifying the directory path.

I’m hopeful that if I can get the OpenFileDialog method to work properly I’ll be able to similarly eliminate the export error.

I have next to no previous experience of Macs so I’m kind of out of my depth with this. Can anyone help me to shed light on this or give me a steer towards a solution?

Regards

Ian

Subject: LotusScript On Mac OSX - Reading/Writing From/To File System

The Mac file system, being UNIX based, is case sensitive. So make sure your path matches exactly.

Cheers,

  • Mike

Subject: RE: LotusScript On Mac OSX - Reading/Writing From/To File System

Hi Mike,

Many thanks for your response.

I was reluctant to touch the code out of guesswork or a hunch even if - hopefully - it’s just a couple of input translations that now need changed.

By the way, from what I’ve seen so far, Notes on a Mac is pretty good. I hope IBM keeps supporting it.

best regards

Ian

Subject: RE: LotusScript On Mac OSX - Reading/Writing From/To File System

I know it’s probably been a while since you worked on this project, but… were you able to get the dialog box method working on a mac? I have the following code snippet as part of a hotspot button to attach files in the client. My code is always resulting to filename = “”. The dialog box never opens on the two Macs I have tested it on. I have checked the case of the volume (and made sure they were set the same on both workstations. The pc version of this code works correctly. Any ideas on why the dialog box isn’t opening would be greatly appreciated as my exposure to macs has been limited to checking my hotmail account and surfing the web. Thanks

Joel M. Phelan

filenames = ws.OpenFileDialog(False, “Attach PDF Files…”, “.pdf", “WongS:”, ".pdf”)

’ filenames = ws.OpenFileDialog(False, title, filters, initdir, initfile)

If filenames = "" Then

	Exit Sub

End If



Call body.EmbedObject(EMBED_ATTACHMENT, "", filenames(0), filenames(0))

The ebedObject method, of course, fails because I have no filename returned. I use the first value in the array because I am only allowing one filename to be selected.

Subject: RE: LotusScript On Mac OSX - Reading/Writing From/To File System

The Mac clients are running 5.x which may have something to do with the issue. I am going to attempt to find a client using a Mac with 6.x on it and see what the result is.