Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Source Safe / April 2005

Tip: Looking for answers? Try searching our database.

Automation with JScript: Versions object?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JotKa - 29 Mar 2005 11:33 GMT
Hi all,

I'm trying to program an automation task using JScript. Unfortunately I
haven't found a way to access the versions of an item: the VSSVersions object
seems not to publish any methods or properties.

So: How to access the VSSVersion objects of a VSSItem using JScript?

Thanks for every hint!

JotKa
Joe Masters - 05 Apr 2005 06:08 GMT
I don't know how to do it exactly, but perhaps looking at what VB does will
help. Have a look at the sample application written in VB at:

http://msdn.microsoft.com/ssafe/downloads/samples.asp

See the sample for VB 5.0. It does its best using the automation model to
duplicate the VSS Explorer interface. Usually you can see how things are
done from the code there.

If you need the VSS Automation documentation, you can find it here:

http://msdn.microsoft.com/ssafe/technical/articles.asp

Joe

> Hi all,
>
[quoted text clipped - 8 lines]
>
> JotKa
JotKa - 12 Apr 2005 08:39 GMT
Thank you for mentioning the 'articles.asp' page; I haven't known it yet.

Unfortunately I couldn't find anything helping further. The VB sample code
uses the "For Each" construct to scan the Versions collection. As far as I
know there is no similar possibility in JScript.

The reason why I wanted to use JScript was that JScript provides much more
(and better) array handling functionality.

Meanwhile I realised the program ... in VBScript. The result is not as good
as it would have been with JScript - I did not bother, e.g., with sorting the
result. But at least it works.

As already with earlier requests in this newsgroup it becomes obvious that
Microsoft did not really think about the necessities of a complete VSS
automation interface. Significant parts are either left out, or only
available to specific programming languages (as in this case) :-(

Anyway: cordial thanks for your help!

Jotka

> "Joe Masters" wrote:
>
[quoted text clipped - 12 lines]
>
> Joe
Steve Appling - 12 Apr 2005 12:57 GMT
Jotka, If you are still interested, you might look at the implementation at
http://www.appling.org/ss2xml/.

It is a JavaScript based set of tools to export SourceSafe data to XML and
search it.  Download the source and look at the file ss2xml.js for examples.
You need to use the JavaScript Enumerator object to iterate over the
Versions collection.

> Thank you for mentioning the 'articles.asp' page; I haven't known it yet.
>
[quoted text clipped - 37 lines]
>>
>> Joe
JotKa - 12 Apr 2005 16:50 GMT
Steve

Many thanks for the Enumerator object hint! That was what I haven't known.
(I am pretty familiar with JavaScript, but use JScript and its extensions
only rarely.)

Your tool obviously solves the same problem that we have had: searching
SourceSafe comments for certain expressions. My current VBScript
implementation is designed for the same purpose, but is more specialized (no
intermediate XML) and thus cannot be used in the same generic way.

Many thanks again

JotKa

> Jotka, If you are still interested, you might look at the implementation at
> http://www.appling.org/ss2xml/.
[quoted text clipped - 45 lines]
> >>
> >> Joe

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.