- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-25-2010 02:38 PM
We have a scenario where a menu contribution we're making to iTest may receive some Tcl data (specifically Tcl commands loaded from a text file). We'd like to be able to process that by calling directly to the iTest built-in Tcl interpreter.
If it were a tool plugin, or an execution monitor, or any of those kind of plugin additions it'd be straight-forward, but this is from a plugin that's simply a menu contribution and separate code.
Any thoughts on whether this is achievable? We have other options, this just struck me as one of the nicer potential choices... so before I spend any time digging further I figured I'd check at a high level if it was feasible.
Thanks,
-Bill
Solved! Go to Solution.
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-25-2010 10:44 PM
It should be. TclInterpreter service should be accessible through some open platform apis. Let me dig through and find out.
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-25-2010 11:01 PM
This is not part of SDK - but you can do following:
if you add a dependency to this plugin:
com.fnfr.svt.fftcl
You can call:
public ITestTclInterpreter createInterpHandle() throws InterpCreationException;
ITestTclInterpreter will allow you to evaluate tcl statements. It will the tcl shell which is set in iTest preferences.
Note that this is an internal API and will not work in next release of iTest. It will only work in 3.4. Not only that, it may stop working in a new service pack of 3.4 - but probability of that is really low. We will take a look if we can make ITclInterpreter from the SDK available for purposes other than tools.
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-26-2010 08:28 AM
I think you might have this wrong, Kumar.
I believe you need the com.fnfr.svt.adapter.tcl plugin and then:
ITestTclInterpreter interp = InterpHandler.createInstance().createInterpHandle(
Right?
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-26-2010 09:44 AM
Hi Bill,
There is a better way to get a tcl interpreter. If you include the package:
com.fnfr.itest.platform.tcl
You will then have access to its activator:
ActivatorTclService
If you call:
ActivatorTclService().getDefault().getTclServiceMa
You will get an ITclServiceManager. It has methods that let you create a tcl interpreter.
Wei will be able to answer further questions about this.
One caveat, this is not in the officially supported SDK, so it may change from release to release (But given it is in the platform, it is less likely to change than the options above.) We will look to add a supported API for services like this.
-a
Does this post answer your question? Click the "Accept as solution" button.
Was this post helpful? Click the yellow "Kudos!" button.
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-26-2010 09:57 AM
If you just want to get the iTest built-in tclinterpreter:
ActivatorTclService().getDefault().getTclServiceMa
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-26-2010 05:42 PM
Doh. A future version will have this platform support. I'd recommend using Kumar's mechanism for now and then updating as needed.
Does this post answer your question? Click the "Accept as solution" button.
Was this post helpful? Click the yellow "Kudos!" button.
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-31-2010 03:04 PM
Heh, heh, looking too far into the future, are we Adam?
I'll go with the present-tense, looks like ti should work dandy. Thanks guys!
Re: Way to call built-in Tcl interp, but not from a "tool"?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-28-2010 11:28 PM
That 'future' version is in beta now ![]()
Does this post answer your question? Click the "Accept as solution" button.
Was this post helpful? Click the yellow "Kudos!" button.
