Very basic COM question for D6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Very basic COM question for D6

Andy Burnett
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 | Threaded
Open this post in threaded view
|

Re: Very basic COM question for D6

Don Rylander-3
Andy,
<[hidden email]> wrote in message
news:[hidden email]...
[..]
> In VB (or similar), I would do something like:
>
> Set s = CreateObject("Lotus.NotesSession")

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

>
> 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 | Threaded
Open this post in threaded view
|

Re: Very basic COM question for D6

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

Thanks very much