List of Order that Methods run

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

List of Order that Methods run

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:00 pm

by Michael Hill >> Tue, 6 Mar 2001 22:56:35 GMT

Morning All,

Is there a way to get a listing of the order in which methods are running?

Cheers

Michael

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: List of Order that Methods run

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:00 pm

by Richard Mitchell >> Wed, 7 Mar 2001 0:38:11 GMT

The Jade User Interrupt button on your task bar provides a Trace Methods of Application option. Whne you set this, a trace is output to the interpreter output window.

Cheers

Richard

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: List of Order that Methods run

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:00 pm

by John Porter >> Thu, 8 Mar 2001 6:53:19 GMT
The Jade User Interrupt button on your task bar provides a Trace Methods of Application option. Whne you set this, a trace is output to the interpreter output window.

Just ensure you're not going to do a tight loop a million times. All methods are displayed, including RootSchema ones like getNextToken. Excessive writes can cripple your machine for a while.

Cheers,
John P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: List of Order that Methods run

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:00 pm

by Paul Mathews >> Thu, 8 Mar 2001 17:00:30 GMT

Similarly at times you want to know where a method has been called
from.

In that case just place previousMethod() below in that method.

The original code came from JadeSupport - Paul Daigneault (thanks Paul !).

Place the previousMethod on the Object Class.

previousMethod();

// Use for debugging, eg previousMethod; to see where a method has
been called from !
// Writes each of the Methods prior to the on you are in !

vars
callStack : ProcessStackArray;
methCallDesc : MethodCallDesc;begin


create callStack;

// get the stack for the current process

process.currentStack(callStack);

// cut back the stack to the current method

callStack.removeAt(1); // remove currentStack
callStack.removeAt(1); // remove self

foreach methCallDesc in callStack do
write methCallDesc.display();
endforeach;

epilog

// the currentStack method creates transient
// MethodCallDesc objects, so they must be deleted before
// finishing

callStack.purge;
delete callStack;
end;

Paul Mathews
pem@cmsystemsgroup.com.au
Phone: [612] (99717384) Fax[612] (99711679)
(Dee Why,Sydney,Australia)


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests

cron