Hi guys,
is there any way to create custom events in LotusScript?
I’d like to create a class that raises some events that can be caught by an On Event statement.
Any ideas will be appreciated.
Thanks in advance.
Ricardo Lucio
Hi guys,
is there any way to create custom events in LotusScript?
I’d like to create a class that raises some events that can be caught by an On Event statement.
Any ideas will be appreciated.
Thanks in advance.
Ricardo Lucio
Subject: Unfortunately you cannot raise custom events…
…and only events from the built-in product classes (and maybe external LSX’es) can be handled via on Event handlers.
Thomas - IBM
Subject: You definitely can with an LSX
As you suggest, this is possible with an LSX. I use them all the time in our Midas Rich Text LSX.
Subject: RE: You definitely can with an LSX
What is LSX and can you give an example?
Subject: RE: You definitely can with an LSX
An LSX is a Lotus Software eXtension (it used to stand for LotusScript eXtension, but then they added support for Java). All Notes LotusScript and Java classes are implemented as LSX’s, but there is also an LSX Toolkit that allows you to build your own. We make the Midas Rich Text LSX, which adds rich text manipulation and HTML generation classes to LotusScript, for example, but there are LSX’s built into a number of products, either as a specific API or to implement proprietary logic. Search on LDD (I don’t have an exact link) for the LSX Toolkit for more information.
Subject: RE: You definitely can with an LSX
What i need to do spacifically is listen for an event from a tapi object i created through OLE. I know about withevents but can not figure out how to use it in notes to listen for the event, i am guessing LSX would not help me with this?
Subject: Write a wrapper object
Instead of using Lotusscript to instantiate a TAPI object, create a simple VB activeX DLL which instantiates that TAPI object instead and handles all the events properly (and maybe expose them indirectly as properties, which you can easily query from Lotusscript). So, you’d instantiate your own COM object via Lotusscript as a surrogate. Much easier than diving into LSX development (and since you’re doing TAPI, you seem to only care about W32 either, so portability is not an issue)
Thomas - IBM
Subject: *I agree completely.