Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Very basic COM question for D6
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 24th April 14:03
andy.burnett
External User
 
Posts: 1
Default Very basic COM question for D6



Hi
I have just started learning Smalltalk - and using Dolphin. I am
trying to work out how to integrate it with Lotus Notes via COM.

In VB (or similar), I would do something like:

Set s = CreateObject("Lotus.NotesSession")

What I can't work out is how I instantiate an external object in
Dolphin, and, unfortunately, I don't know enough about it yet to know
quite where to look.

Could someone point me to either a simple example or a method in the
image which shows this being done, and a couple of methods being called
on the object.

As a side note, I found the Excel OLE automation examples in this
forum, and they are great, I just need to sort out direct COM access.

Thanks
AB
  Reply With Quote


 


2 29th April 21:14
don rylander
External User
 
Posts: 1
Default Very basic COM question for D6



Andy,


I'd personally try generating the interfaces for Notes using the Active-X
Component Wizard, since the resulting classes and methods are usually a lot
easier to work with. If you don't want to bother with that (e.g., you're
just doing some workspace-based experimentation), you could use:

s := IDispatch createObject: 'Lotus.NotesSession'.

In that case, s will be an instance of IDispatch. You can interact with any
IDispatch by using #getProperty:, #setProperty:, and #invoke:. (Take a look
at the IDispatch methods in the Accessing and Dispatching categories.) You
can also try just sending it a message that Notes should understand and
IDispatch>>doesNotUnderstand: will often sort things out well enough for
things to work (of course you should never rely on that in an actual
application).

If you've generated the interfaces, you could use something more direct like
(possibly):

s := Lotus_NotesSession new.

The exact class name will depend on what you choose in the wizard, but
that's the general idea. If you have more questions or problems, feel free
to post again.
HTH, Don
  Reply With Quote
3 29th April 21:14
andy.burnett
External User
 
Posts: 1
Default Very basic COM question for D6


Thanks Don, that is great. I have managed to connect to the Notes
classes and I will now start exploring.

Thanks very much
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666