Zumasys Homepage
Forum Home Forum Home > AccuTerm > Scripting & Automation
  New Posts New Posts RSS Feed - Using Class Modules in AccuTerm
  FAQ FAQ  Forum Search   Register Register  Login Login

Using Class Modules in AccuTerm

 Post Reply Post Reply
Author
Message
kbdav View Drop Down
Newbie
Newbie


Joined: July 12 2016
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote kbdav Quote  Post ReplyReply Direct Link To This Post Topic: Using Class Modules in AccuTerm
    Posted: April 02 2019 at 6:48pm
I am having some issues implementing a class module withing the 'AccuTerm Macros.atsc' code module.

At the top of the module, I use the following line to reference a class module:

#Uses "PBX_Web.cls"

This should now allow me to use this class module in my project, something like:

Dim PBX As New PBX_Web

and access the class' methods and properties. This works to the extent of when I right click the module tab > Sheet > Open Uses, it brings up the class module I referenced and I can see all the code in the IDE. However, I am immediately greeted with an error:



It appears that I somehow need to set the class' "Caption" property and I spent a few hours on Google trying to figure it out. GetMacroCaption appears to be an event to the IDE itself, and it seems to fire when I try to view the code of the class module.

I have read this topic: http://www.winwrap.com/web2/basic/#!/ref/COM-doc_getmacrocaption_event.htm and it didn't help me. The code in the class itself doesn't seem to be the problem, as I've even tried using the example class in the AccuTerm Language Reference Manual under section 1.3.1.1 (Page 10).

Any ideas how I can implement my class into my project?
Back to Top
kbdav View Drop Down
Newbie
Newbie


Joined: July 12 2016
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote kbdav Quote  Post ReplyReply Direct Link To This Post Posted: April 04 2019 at 6:18pm
Some progress has been made.

It appears that in the script editor, it only expects to have 2 open modules simultaneously. Every time I open AccuTerm, there is the 'viewscript.atsc' script that runs and it also opens the Macro 'AccuTerm Macro Script [AccuTerm Macros.atsc]'. When these two remain open, and I click "Open Uses" and open a third and make it active, the above error occurs.

However, when I close down the 'viewscript.atsc' window (now I only have 1 visible module), then perform the same action of opening uses, the error is non existent.

This now makes some sense on the error itself: Subscript out of range. The range is '2', but I have 3 modules open. Now I am needing to figure out how to overcome this issue. Is it possible to "open uses" when the AccuTerm instance starts thus allowing it to expect all 3 modules?

Side note: When I don't have the class module open ("Open Uses"), it still references the class but I lose IntelliSense and I am unable to modify the class code in the editor; so the code within the class does work.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.