Forum

Free Download More Info
Welcome to the Personal Stock Streamer Developers Forum. Anyone can read messages, but you must be a registered user in order to post. (Sorry, we did this in order to prevent forum spam.)

Everyone who is registered for the Developers Forum on this site should now also have permission to log in and post to the Support Forum.  This was done by hand, so we may have missed a couple of people.  Please let us know if you do not have access to both forums.
Subscribe to RSS Feed
PSS Developers Forum -> How to debug the VBscript for PSS/PSM
Not logged in.
2009-07-18 19:25:48
1 of 7
#1361
Hi, I just started playing with PSM extension in vbscript. At least there are examples to look at and some object documentation. However even in the examples there are references to methods not described in the document. Is there a work-in-progress description of classes/methods available from the script? One of them is DebugTrace.
0
I tried to use applictiaon.DebugTrace to get some debugging info but could not see even simple messages anywhere. Where do they go? MsgBox works, but it is hardly a good way for debugging.

BTW, i have no windows programming experience and do not know all the caveats of this OS. So, please be patient with a linux person.
I also read somewhere that the extensions could be written in perl or phyton. Was I right? I cannot find this reference any longer and there are no examples anyway. Are there?

Thanks
Posted by: serbogus
2009-07-20 11:16:55
2 of 7
#1362
in reply to #1361
DebugTrace sends the output through the standard Windows debug trace system, so you can download a program such as DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) to collect and view the trace information.

Yes, extensions can be written in Perl or Python, but you have to install the versions from ActiveState (http://www.activestate.com) which are compatible with the Microsoft script engine. Unfortunately not being a Perl or Python programmer myself, I don't have any examples.
Posted by: Anatoly
2009-07-22 06:53:31
3 of 7
#1363
in reply to #1362
Thank you for the info. The debug output catcher works much better than dumping strings into a file or a message box. I also thing that I will stay with vbscript.

There is another question. I had not been able to find a way to debug event manager from an external application. Data could be loaded and manipulated easily, but it looks like the event manager does not install events in the running psm. I had to 'run script' to debug it. Unfortunately even the latter can be done only ones per session and psn had to shut down before next attempt (otherwise it complains about duplicate names).

So, is there a way to install events in the psm/pss from an outside application? Is there a way to re-run the same script in psm/pss without exiting it?

Thanks
Posted by: serbogus
2009-07-22 10:10:47
4 of 7
#1364
in reply to #1363
Sorry, there is no way to re-run the same script in PSM/PSS without exiting. It's not the ideal situation, I know.

As far as the external application is concerned, do you get any errors when adding the event handler? Or are you able to add the event handler and just never receive any events?
Posted by: Anatoly
2009-07-22 20:40:34
5 of 7
#1365
in reply to #1364
Actually I just tried to run a script externally from the scite editor. There were no errors in registering the class withing the event manager. But the class was destroyed at the end, calling class_terminate. So, no events had been caught.
Posted by: serbogus
2009-07-22 20:43:50
6 of 7
#1366
in reply to #1364
And just another question. Is there a way to register a class created in one extension so that it could be acquired from another extension so that the latter could call its member functions?

Thanks
Posted by: serbogus
2009-07-22 21:25:37
7 of 7
#1367
in reply to #1366
Well, that's a problem: if the script exits, how can it catch events? You have to have a standalone application or a script with an event loop that does not exit, then it can sit there and catch events. If it exits, there is nothing to catch the events.

Right now there is no way provided for extensions to communicate with one another, only with the main app. However this does not mean you couldn't come up with some way for extensions to communicate outside the app.
Posted by: Anatoly