The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Returning of event WithEvents
Posted: 15 Aug 08 5:01 AM
|
Hi ... Prompt please...!
There is an announcement of event in VB6: Public WithEvents gobjTAPIWithEvents2 As TAPI
As it to write in Architector? |
|
|
|
Re: Returning of event WithEvents
Posted: 15 Aug 08 2:04 PM
|
There is no concept of WithEvents in VBScript (which is what you're using in SLX Architect).
In VBScript you can wire event handlers using the GetRef function. It will return a function pointer. However, it won't work correctly with everything and I don't know if it will work with the TAPI events (probably won't).
You use it something like this:
Dim obj Sub Main Set obj = CreateObject("Something.SomeClass") obj.OnSomeEvent = GetRef("SomeEventHandler") obj.StartSomeProcess End Sub
Sub SomeEventHandler() ' do something End Sub
That's basically the idea. You'll likely find some references on GetRef (maybe even using TAPI?) with a google search.
Good luck. -Ryan |
|
|
|
Re: Returning of event WithEvents
Posted: 15 Aug 08 2:20 PM
|
As an alternative, what I would do is create this as a .NET Extension (or even as an external COM) that wrapped everything you needed. Let it worry about handling the events. Then just invoke that extension from the SLX script. |
|
|
| |
|
Re: Returning of event WithEvents
Posted: 28 Aug 08 2:12 AM
|
Thanks Ryan! Prompt still please...! How COM - object to place on the panel of tools in SalesLogix? And how to create essence (the same button) as on the panel of tools? |
|
|
|
Re: Returning of event WithEvents
Posted: 28 Aug 08 2:24 AM
|
If what you're building is an ActiveX control, then it can be added to the toolbox by right-clicking and selecting add.
If it is a COM component that you want to use from script, then you'll just make sure it is installed and registered, and then use CreateObject in the script to instanciate it. |
|
|
|
Re: Returning of event WithEvents
Posted: 28 Aug 08 2:43 AM
|
Thanks Ryan! And prompt still please... What Family-property and Name-property has the panel of tools in Architector? |
|
|
|
Re: Returning of event WithEvents
Posted: 28 Aug 08 2:45 AM
|
Originally posted by n0013
What Family-property and Name-property has the panel of tools in Architector? |
|
I'm not sure what you're asking. Can you explain more? |
|
|
|
Re: Returning of event WithEvents
Posted: 28 Aug 08 2:52 AM
|
Look! There is form Account (Plugin) At it in Arhitect through Meneger Plugins it is possible to look Family, Name, Company, Version, Auhtor. How in Arhitect to open the panel of tools that this panel to program? |
|
|
|
Re: Returning of event WithEvents
Posted: 28 Aug 08 2:57 AM
|
Sorry, I am still not following. From the thread I assume you are wanting to use a custom COM component in SLX. Right?
Is this a control, or just a COM component (example, add to a form, or use in a script)?
Can you explain in more detail? |
|
|
| |
| |
|