Target Designer Scripting Questions

  • Thread starter Thread starter Markus Pietrek
  • Start date Start date
M

Markus Pietrek

Hi folks,

playing with the scripting possibilities on the components a few questions
came up where I couldn't find any references. Maybe someone can help?

1) I often see oPL.TraceEnter and oPL.TraceLeave.
Presumably they are for debugging. Where can I see the tracelog?
2) Is it possible to output text to the message windows? If even colored
than I'm in heaven.
This is for a small development component that should print me any
disabled components, registry
entries or RunOnce after build
3) Can I retrieve the .SDL revision within scripts? I'd like to place an
icon on the desktop that will give
me the build date&time and the revision.

Thanks in advance,
Markus
 
Markus,

It is hard to answer your questions precisely simply because there is no publicly available documentation for CMI interfaces and
internals of TD.

Anyway, I'll give it my best guess.

1) Trace methods are just wrappers that map to WriteMsg method of CMI API. That methods is supposed to fire an event
(CMI.OnWriteMsg) and pass the message info in there. A CMI client application (could be anything from your own component script, or
TD, to CMI Explorer, or etc.) would catch the event and process the message and log it to whatever log UI it supports (could be GUI
debug output window, could be a console window, a log file, or etc.)
There is also a way to log the messages to a file that is supported by the CMI internally (without a need for client app).

2) See the event info mentioned above. How you implement the log window and how you parse and colorize the messages is up to you (up
to your own client app implementation).

3) Please take a look at CompChainRevs collection of IInstance interface. It gives you the revisions of the components on which the
Instance is based on.
 
Back
Top