Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Howto use com wrapper in Javascript ?

17 views
Skip to first unread message

MarLam

unread,
Sep 18, 2007, 10:55:03 AM9/18/07
to

Hello all,

I cannot find anything about how to use sdk com wrapper for javascript.

Does someone can help me with this ?

Regards,
MarLam

riaille...@accor-hotels.com

unread,
Sep 18, 2007, 11:21:32 AM9/18/07
to

With SDK 9.3 (ST2006 R2), documentation is better than with old SDKs.
you have some examples in program files/borland/Starteam SDK 9.3/
samples


Tom Margrave

unread,
Sep 19, 2007, 2:20:23 PM9/19/07
to MarLam
MarLam,

StarTeam SDK does not have wrapper api call that I know you can write
java script to work. The Item wrapper is part of the StarTeam
Extension SDK which I do not think you can get to via java script. I
write several applications that use the Item wrapper but they are java
based and I put both SDKs on the class path.

Good Luck.

Tom

MarLam

unread,
Sep 19, 2007, 2:35:00 PM9/19/07
to

Hi Tom,

It is possible to use the com wrapper directly in javascript see my example.
I use the starteam sdk com wrapper to access StarTeam server.
I can logon, list projects, list views, and i try to search some changerequests....

Does anyone can help me for the rest ?


Here is where my javascript.


// Parameters need
var strAddress = "server";
var nPort = 49000;
var strUser = "user"
var strPassword = "password";

// Create a StarTeam Server object.
var StServerFactory = new ActiveXObject("StarTeam.StServerFactory");
var StServer = StServerFactory.Create(strAddress, nPort);

// Establish a connection to the server.
StServer.connect();

// Logon as the given user.
StServer.logOn(strUser, strPassword);
var strMessage = '<span style="font-size:15pt; font-weight:bold;"><font color="blue">' + "Projects at " + strAddress + "<BR/>"+"</font></span>";

// Enumerate projects

for (var StProject = new Enumerator(StServer.Projects); !StProject.atEnd(); StProject.moveNext() )
{
if (StProject.item().Name == "Specific project")
{
alert("Project Name: "+StProject.item().Name);

for (var StView = new Enumerator(StProject.item().Views); !StView.atEnd(); StView.moveNext() )
{

if (StView.item().Name="Specific View")
{
alert(StView.item().Name);
}
}
}
}

Regards,
Marlam

0 new messages