|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Use an Addin to automatically add date/time stamp to each edited line of VB6 code?date/time stamp in a comment to every line of code edited or added. That is, as soon as a line is added or an existing line edited, a comment is placed at the end of the line like this: x = x + 1 ' Edited 6/Jun/09 16:11 An enhancement could also include the programmer's initials for those organisations having multiple devs working on one project, e.g. x = x + 1 ' Edited 6/Jun/09 16:11 by MM The feature would be optional. The lead programmer could also freeze/finalise a project at any time and remove the datestamps automatically, then switch the feature back on again once development of the next version was started. Any comment(s) already present would be appended with the date/time stamp. Now, could this feature be achieved with a VB Add-in? Has anyone done it yet? MM
Show quote
Hide quote
"MM" <kylix***@yahoo.co.uk> wrote in message Check out MZ-Toolsnews:oi1l25hd8tk81qc6avt03u0vrl6fuul18t@4ax.com... > One feature I would have wanted to see in the classic VB line is a > date/time stamp in a comment to every line of code edited or added. > > That is, as soon as a line is added or an existing line edited, a > comment is placed at the end of the line like this: > > x = x + 1 ' Edited 6/Jun/09 16:11 > > An enhancement could also include the programmer's initials for those > organisations having multiple devs working on one project, e.g. > > x = x + 1 ' Edited 6/Jun/09 16:11 by MM > > The feature would be optional. The lead programmer could also > freeze/finalise a project at any time and remove the datestamps > automatically, then switch the feature back on again once development > of the next version was started. > > Any comment(s) already present would be appended with the date/time > stamp. > > Now, could this feature be achieved with a VB Add-in? > > Has anyone done it yet? > > MM http://www.mztools.com/v3/download.aspx Create a Code Template for comments, end of line comments, etc. You can even assign a hotkey. But - in general I think you will find this to become unwieldy over time. Best to use VSS and tie your changes to specific whole module releases. (Check out keywords in VSS) -ralph On Sat, 6 Jun 2009 11:34:10 -0500, "Ralph" <nt_consultin***@yahoo.com> From the docs:wrote: >Check out MZ-Tools >http://www.mztools.com/v3/download.aspx > >Create a Code Template for comments, end of line comments, etc. >You can even assign a hotkey. "The Code Templates feature allows you to create code snippets that you can insert in your source code." This suggests that the onus is on the programmer to remember to insert the appropriate code template when needed, whereas what I'd be looking for is something that happens entirely automagically. That is, as soon as the cursor moves off a line, if that line is changed or is new, the add-in kicks in and adds the date/time stamp. When the muse has got me and I am typing away furiously, the last thing I would want to remember is to press a particular hotkey. The only keys I do continually press are: Alt+F v. I do that after nearly every edit. MM You really would be better off with a version control system, as Ralph
recommends. Subversion is a free open source system that's very widely used, Microsoft Visual Source Safe (as recommended by Ralph) is pretty cheap these days - and hopefully the old bugs which corrupted the archives are fixed now too :) On Thu, 11 Jun 2009 03:36:15 -0700 (PDT), Mark
<mark.tunnard.jack***@googlemail.com> wrote: >You really would be better off with a version control system, as Ralph Oh yes! The corrupted archives, I remember them well. When I was>recommends. Subversion is a free open source system that's very widely >used, Microsoft Visual Source Safe (as recommended by Ralph) is pretty >cheap these days - and hopefully the old bugs which corrupted the >archives are fixed now too :) programming at work (now retired, thank God), we wouldn't touch SS with a ten-foot pole. Typical over-engineering by the One Microsoft Way team. I mean, it can't be THAT difficult to add a date/time stamp at the end of changed or new lines, surely? Moving the goalposts of the requirement is like asking the old Irish peasant how to get to Dublin: "Well, in your place, oi wouldn't start from here..." Just looking right now at VBE.ActiveVBProject.VBComponents(sModuleName).CodeModule.ReplaceLine in my trusty Creating Visual Basic 5 Add-Ins book. MM
Show quote
Hide quote
"MM" <kylix***@yahoo.co.uk> wrote in message Actually just trying to be helpful.news:5tp135hlocjeqj5g37atfcss3bnhqjf9bv@4ax.com... > On Thu, 11 Jun 2009 03:36:15 -0700 (PDT), Mark > <mark.tunnard.jack***@googlemail.com> wrote: > > >You really would be better off with a version control system, as Ralph > >recommends. Subversion is a free open source system that's very widely > >used, Microsoft Visual Source Safe (as recommended by Ralph) is pretty > >cheap these days - and hopefully the old bugs which corrupted the > >archives are fixed now too :) > > Oh yes! The corrupted archives, I remember them well. When I was > programming at work (now retired, thank God), we wouldn't touch SS > with a ten-foot pole. Typical over-engineering by the One Microsoft > Way team. > > I mean, it can't be THAT difficult to add a date/time stamp at the end > of changed or new lines, surely? Moving the goalposts of the > requirement is like asking the old Irish peasant how to get to Dublin: > "Well, in your place, oi wouldn't start from here..." > > Just looking right now at > VBE.ActiveVBProject.VBComponents(sModuleName).CodeModule.ReplaceLine > in my trusty Creating Visual Basic 5 Add-Ins book. > I once designed and built a "commenting scheme" for a financial package (subject to micro-auditing). I too thought it would be great to embed a complete record of all changes. In this situation we went one better, we not only marked changes, we tied it to the initializing change-control (thus tracking date, programmer, testing, etc), meanwhile inserting CASE design information so it could be tied to the model. So we quickly ended up with crap like this ... '##ModelId=3F62060E02A6 Private mCN As ADODB.Connection '##ChangeID=2F043 '##ModelId=3F62060E02B5 Public Function GetCN() As ADODB.Connection Set GetCN = mCN '##ChangeID=2F043 End Function '-------------------------------------------------------------------------- ' Procedure : Init ' Created : ' Return : Boolean ' Purpose : Initializes with an open connection to the given database '##ProjID=0012.4.2 '##ChangeID=10004 '##ChangeID=30144 '##ChangeID=2F043 '------------------------------------------------------------------------- '##ModelId=3F62060E02D4 Public Function Init(dbFile As String, Optional sUserID As Variant, Optional sPassword As Variant) As Boolean Dim sTmp As String '@dev65 05/12/19xx Dim sArg As String ' Validate the parameters On Error GoTo Init_Err If Len(dbFile) = 0 Then Exit Function ' Build string '@dev65 05/12/19xx sTmp = DATABASE_STR '##ChangeID=1004 sTmp = Replace(sTmp, "@db", dbFile) '##ChangeID=10004 '##ChangeID=30144 If IsMissing(sUserID) Then sArg = "" Else sArg = ";USERID=" & sUserID End If sTmp = Replace(sTmp, "@uid", sArg)'##ChangeID=10004 '##ChangeID=30144 If IsMissing(sPassword) Then sArg = "" Else sArg = ";PASSWORD=" & sPassword End If sTmp = Replace(sTmp, "@pwd", sArg) '##ChangeID=10004 '##ChangeID=30144 ' Open the connection Set mCN = New ADODB.Connection '##ChangeID=2F043 mCN.Open sTmp '##ChangeID=2F043 Init = True 'On Error GoTo 0 '@dev03 05/12/19xx Exit Function Init_Err: HandleError2 Err, "Class Module CDBxxx::Init" & " Connection string = " & _ vbCrLf & "[" & sTmp & "]" '@dev65 05/12/19xx Debug.Assert False Init = False End Function It added nothing to reability and even less to providing any useful information. Few coming later even bothered to try and read it. All it succeeded in doing is insuring that one never touched it unless their job was at stake. Crappy code stayed crappy code. -ralph PS:
Management recognizing the readibility problem then came up with the policy that all inline comments were to be spaced over to 80 characters, and no code lines were to be greater than 80 (actually kept at ~60 characters - must have been an IBMer around there). About this time I left. Apologizing profusely to everyone as I headed for the door. -ralph On Thu, 11 Jun 2009 08:47:52 -0500, "Ralph"
<nt_consultin***@yahoo.com> wrote: Show quoteHide quote > That's not crap! That's EXACTLY what I want! (I don't actually need>"MM" <kylix***@yahoo.co.uk> wrote in message >news:5tp135hlocjeqj5g37atfcss3bnhqjf9bv@4ax.com... >> On Thu, 11 Jun 2009 03:36:15 -0700 (PDT), Mark >> <mark.tunnard.jack***@googlemail.com> wrote: >> >> >You really would be better off with a version control system, as Ralph >> >recommends. Subversion is a free open source system that's very widely >> >used, Microsoft Visual Source Safe (as recommended by Ralph) is pretty >> >cheap these days - and hopefully the old bugs which corrupted the >> >archives are fixed now too :) >> >> Oh yes! The corrupted archives, I remember them well. When I was >> programming at work (now retired, thank God), we wouldn't touch SS >> with a ten-foot pole. Typical over-engineering by the One Microsoft >> Way team. >> >> I mean, it can't be THAT difficult to add a date/time stamp at the end >> of changed or new lines, surely? Moving the goalposts of the >> requirement is like asking the old Irish peasant how to get to Dublin: >> "Well, in your place, oi wouldn't start from here..." >> >> Just looking right now at >> VBE.ActiveVBProject.VBComponents(sModuleName).CodeModule.ReplaceLine >> in my trusty Creating Visual Basic 5 Add-Ins book. >> > >Actually just trying to be helpful. > >I once designed and built a "commenting scheme" for a financial package >(subject to micro-auditing). I too thought it would be great to embed a >complete record of all changes. In this situation we went one better, we not >only marked changes, we tied it to the initializing change-control (thus >tracking date, programmer, testing, etc), meanwhile inserting CASE design >information so it could be tied to the model. > >So we quickly ended up with crap like this ... > >'##ModelId=3F62060E02A6 >Private mCN As ADODB.Connection '##ChangeID=2F043 > >'##ModelId=3F62060E02B5 >Public Function GetCN() As ADODB.Connection > Set GetCN = mCN '##ChangeID=2F043 >End Function > >'-------------------------------------------------------------------------- >' Procedure : Init >' Created : >' Return : Boolean >' Purpose : Initializes with an open connection to the given database >'##ProjID=0012.4.2 >'##ChangeID=10004 >'##ChangeID=30144 >'##ChangeID=2F043 >'------------------------------------------------------------------------- >'##ModelId=3F62060E02D4 >Public Function Init(dbFile As String, Optional sUserID As Variant, Optional >sPassword As Variant) As Boolean > Dim sTmp As String '@dev65 05/12/19xx > Dim sArg As String > > ' Validate the parameters > On Error GoTo Init_Err > If Len(dbFile) = 0 Then Exit Function > ' Build string '@dev65 05/12/19xx > sTmp = DATABASE_STR '##ChangeID=1004 > sTmp = Replace(sTmp, "@db", dbFile) '##ChangeID=10004 >'##ChangeID=30144 > If IsMissing(sUserID) Then > sArg = "" > Else > sArg = ";USERID=" & sUserID > End If > sTmp = Replace(sTmp, "@uid", sArg)'##ChangeID=10004 '##ChangeID=30144 > If IsMissing(sPassword) Then > sArg = "" > Else > sArg = ";PASSWORD=" & sPassword > End If > sTmp = Replace(sTmp, "@pwd", sArg) '##ChangeID=10004 >'##ChangeID=30144 > > ' Open the connection > Set mCN = New ADODB.Connection '##ChangeID=2F043 > mCN.Open sTmp '##ChangeID=2F043 > Init = True > 'On Error GoTo 0 '@dev03 05/12/19xx > Exit Function >Init_Err: > HandleError2 Err, "Class Module CDBxxx::Init" & " Connection string = " >& _ > vbCrLf & "[" & sTmp & "]" '@dev65 05/12/19xx > Debug.Assert False > Init = False >End Function the dev's name now, but I'd still make it an option.) >It added nothing to reability and even less to providing any useful It would to me. I could tell at a glance which is the oldest code,>information. which the newest, which was changed since the last release, and so on. Highly useful feature, in my view. And the stamp could be placed far to the right of the actual code, not all bunched up against the code. Perhaps a more sophisticated approach would cause a 'tooltip' to appear if the cursor was hovered over a line. The tooltip could state the date and time when the line was changed. Thus in normal reading of the code the stamps wouldn't get in the way so much. Even if you consider they do, I reckon the feature is well handy! > Few coming later even bothered to try and read it. All it Did you not provide a freeze-point at which you could remove all the>succeeded in doing is insuring that one never touched it unless their job >was at stake. Crappy code stayed crappy code. stamps? That's what I would do. That's something an add-in *could* do in spades. I'd still have 'em in my zipped backups if I wanted to refer back. Anyway, now you have *exactly* defined the spec, let's see how to implement it! MM "MM" <kylix***@yahoo.co.uk> wrote in message Well to each their own. hanews:lbc235dkdsp08ion4ha9rq3dfcte0nt55v@4ax.com... > > Anyway, now you have *exactly* defined the spec, let's see how to > implement it! > We did it with a bastardized Addon we stole from someone (before MZTools) with a Tool Buttom that provided a drop down list. You simply clicked the item. The item list came from an .ini file which was updated on every developers box through VSS. The modeling and procedural comments were updated by an external utility applied when projects/source were 'checked-in' to the master database from the developer's sandbox. There are some great CASE tools that will do this. Do you have a spare $7,000-$15,000 laying around? I'll see if I have any of that stuff lying around. (Probably do in that stack of floppies I'm going to move to DVD someday. lol) -ralph On Thu, 11 Jun 2009 13:38:00 -0500, "Ralph"
<nt_consultin***@yahoo.com> wrote: Show quoteHide quote > Well, one way would be to forget about an add-in and simply compare>"MM" <kylix***@yahoo.co.uk> wrote in message >news:lbc235dkdsp08ion4ha9rq3dfcte0nt55v@4ax.com... >> >> Anyway, now you have *exactly* defined the spec, let's see how to >> implement it! >> > >Well to each their own. ha > >We did it with a bastardized Addon we stole from someone (before MZTools) >with a Tool Buttom that provided a drop down list. You simply clicked the >item. The item list came from an .ini file which was updated on every >developers box through VSS. > >The modeling and procedural comments were updated by an external utility >applied when projects/source were 'checked-in' to the master database from >the developer's sandbox. There are some great CASE tools that will do this. >Do you have a spare $7,000-$15,000 laying around? > >I'll see if I have any of that stuff lying around. (Probably do in that >stack of floppies I'm going to move to DVD someday. lol) the previous version (of the project) with the latest version and mark changed lines accordingly. Given the speed at which modern PCs operate it would take a mere matter of seconds probably. I am amazed how fast my Pascal-to-VB Type 1 to 0 MIDI conversion routine is! Even quite a lengthy MIDI file is converted as soon as I click the button. By the way, how big is your stack of floppies? I have two large-ish 2' x 1.5' x 1' crates full of them. Plus loads of others in smaller boxes. I've finally started to throw some away. These are 95% 5¼" ones. I managed to hook up a 5¼" to my ancient Evergreen CPU Windows 95 box and transfer the important ones to a hard drive, including TurboPascal, QuickC, QuickBASIC, Basic 7.1, the C compiler and lots more. Probably never ever needed again. Hundreds of pounds worth of software, and now all for the birds. This is not like classic cars. If I'd have kept my Standard Vanguard, Morris Eight (2 of 'em!), Triumph TR2, Wolseley 10, a 1939 Hilllman Minx and a 1956 Ford Popular, they'd all be worth together around 50k now if restored to concours condition, whereas the software on the floppies is worth naff all. MM
Show quote
Hide quote
"MM" <kylix***@yahoo.co.uk> wrote in message Mine occupied several shelves in a closet until recently. Now serveral milknews:k2o2351jsnc29kt887guhcru4434i772bm@4ax.com... > On Thu, 11 Jun 2009 13:38:00 -0500, "Ralph" > <nt_consultin***@yahoo.com> wrote: > > > > >"MM" <kylix***@yahoo.co.uk> wrote in message > >news:lbc235dkdsp08ion4ha9rq3dfcte0nt55v@4ax.com... > >> > >> Anyway, now you have *exactly* defined the spec, let's see how to > >> implement it! > >> > > > >Well to each their own. ha > > > >We did it with a bastardized Addon we stole from someone (before MZTools) > >with a Tool Buttom that provided a drop down list. You simply clicked the > >item. The item list came from an .ini file which was updated on every > >developers box through VSS. > > > >The modeling and procedural comments were updated by an external utility > >applied when projects/source were 'checked-in' to the master database from > >the developer's sandbox. There are some great CASE tools that will do this. > >Do you have a spare $7,000-$15,000 laying around? > > > >I'll see if I have any of that stuff lying around. (Probably do in that > >stack of floppies I'm going to move to DVD someday. lol) > > Well, one way would be to forget about an add-in and simply compare > the previous version (of the project) with the latest version and mark > changed lines accordingly. Given the speed at which modern PCs operate > it would take a mere matter of seconds probably. I am amazed how fast > my Pascal-to-VB Type 1 to 0 MIDI conversion routine is! Even quite a > lengthy MIDI file is converted as soon as I click the button. > > By the way, how big is your stack of floppies? I have two large-ish 2' > x 1.5' x 1' crates full of them. Plus loads of others in smaller > boxes. I've finally started to throw some away. These are 95% 5¼" > ones. I managed to hook up a 5¼" to my ancient Evergreen CPU Windows > 95 box and transfer the important ones to a hard drive, including > TurboPascal, QuickC, QuickBASIC, Basic 7.1, the C compiler and lots > more. Probably never ever needed again. Hundreds of pounds worth of > software, and now all for the birds. This is not like classic cars. If > I'd have kept my Standard Vanguard, Morris Eight (2 of 'em!), Triumph > TR2, Wolseley 10, a 1939 Hilllman Minx and a 1956 Ford Popular, they'd > all be worth together around 50k now if restored to concours > condition, whereas the software on the floppies is worth naff all. > > MM cartons stacked in a garage overhead. About 5 of those 'roldex-type' boxes with the flip lid. Numerous plastic 'index-type' boxes, in 5 milk cartons. ha Was always going to get to it one of these days, but now doubt I ever will. They are all well labeled. Unfortunately with my memory they might as well be written in Sanskrit or Swahili. I know there are several floppy catalogers in there some place. The sad part is I'm now building a pile of CDs and DVDs, plus a small shoe box of USB Sticks - thus even more unknown media with a lot more stuff on them. USB Sticks are worse - the writing is smaller and more terse. The older I get the more I wish I'd kept the Triumph TR3. Don't know why I ever got rid of it. Just because you often had to beat on the fuel pump with a small mallet to start it; or that the roof always leaked, or that everything leaked sooner or later; or that a "tune-up" meant partial dissassembly of the engine, or that the brakes seldom made it through a season, or that parts of your body were either baked or frozen at the same time; or had an electrical system built with bio-degradeable wire; or that a 2" snow fall turned it into a snowplow; or that that needed part, they think is in Kansas City (but was finally found in Atlanta two weeks later by a friend of a friend who knew somebody in Denver); or that it always developed ominous rattles and clanks at 3am 45 miles from the next town (which of course were gone the next morning); or that there was always something that had to be done Saturday morning before that trip; ... ; are very poor reasons for letting a car go. -ralph On Thu, 11 Jun 2009 21:11:33 -0500, "Ralph"
<nt_consultin***@yahoo.com> wrote: Show quoteHide quote > Then here's something that will make you weep! A TR3 can be yours for>"MM" <kylix***@yahoo.co.uk> wrote in message >news:k2o2351jsnc29kt887guhcru4434i772bm@4ax.com... >> On Thu, 11 Jun 2009 13:38:00 -0500, "Ralph" >> <nt_consultin***@yahoo.com> wrote: >> >> > >> >"MM" <kylix***@yahoo.co.uk> wrote in message >> >news:lbc235dkdsp08ion4ha9rq3dfcte0nt55v@4ax.com... >> >> >> >> Anyway, now you have *exactly* defined the spec, let's see how to >> >> implement it! >> >> >> > >> >Well to each their own. ha >> > >> >We did it with a bastardized Addon we stole from someone (before MZTools) >> >with a Tool Buttom that provided a drop down list. You simply clicked the >> >item. The item list came from an .ini file which was updated on every >> >developers box through VSS. >> > >> >The modeling and procedural comments were updated by an external utility >> >applied when projects/source were 'checked-in' to the master database >from >> >the developer's sandbox. There are some great CASE tools that will do >this. >> >Do you have a spare $7,000-$15,000 laying around? >> > >> >I'll see if I have any of that stuff lying around. (Probably do in that >> >stack of floppies I'm going to move to DVD someday. lol) >> >> Well, one way would be to forget about an add-in and simply compare >> the previous version (of the project) with the latest version and mark >> changed lines accordingly. Given the speed at which modern PCs operate >> it would take a mere matter of seconds probably. I am amazed how fast >> my Pascal-to-VB Type 1 to 0 MIDI conversion routine is! Even quite a >> lengthy MIDI file is converted as soon as I click the button. >> >> By the way, how big is your stack of floppies? I have two large-ish 2' >> x 1.5' x 1' crates full of them. Plus loads of others in smaller >> boxes. I've finally started to throw some away. These are 95% 5¼" >> ones. I managed to hook up a 5¼" to my ancient Evergreen CPU Windows >> 95 box and transfer the important ones to a hard drive, including >> TurboPascal, QuickC, QuickBASIC, Basic 7.1, the C compiler and lots >> more. Probably never ever needed again. Hundreds of pounds worth of >> software, and now all for the birds. This is not like classic cars. If >> I'd have kept my Standard Vanguard, Morris Eight (2 of 'em!), Triumph >> TR2, Wolseley 10, a 1939 Hilllman Minx and a 1956 Ford Popular, they'd >> all be worth together around 50k now if restored to concours >> condition, whereas the software on the floppies is worth naff all. >> >> MM > >Mine occupied several shelves in a closet until recently. Now serveral milk >cartons stacked in a garage overhead. About 5 of those 'roldex-type' boxes >with the flip lid. Numerous plastic 'index-type' boxes, in 5 milk cartons. >ha > >Was always going to get to it one of these days, but now doubt I ever will. >They are all well labeled. Unfortunately with my memory they might as well >be written in Sanskrit or Swahili. I know there are several floppy >catalogers in there some place. > >The sad part is I'm now building a pile of CDs and DVDs, plus a small shoe >box of USB Sticks - thus even more unknown media with a lot more stuff on >them. USB Sticks are worse - the writing is smaller and more terse. > >The older I get the more I wish I'd kept the Triumph TR3. Don't know why I >ever got rid of it. Just because you often had to beat on the fuel pump with >a small mallet to start it; or that the roof always leaked, or that >everything leaked sooner or later; or that a "tune-up" meant partial >dissassembly of the engine, or that the brakes seldom made it through a >season, or that parts of your body were either baked or frozen at the same >time; or had an electrical system built with bio-degradeable wire; or that a >2" snow fall turned it into a snowplow; or that that needed part, they think >is in Kansas City (but was finally found in Atlanta two weeks later by a >friend of a friend who knew somebody in Denver); or that it always developed >ominous rattles and clanks at 3am 45 miles from the next town (which of >course were gone the next morning); or that there was always something that >had to be done Saturday morning before that trip; ... ; are very poor >reasons for letting a car go. > >-ralph > 32,000 pounds (approx $51,000). http://www.carandclassic.co.uk/car/C91970/ MM "MM" <kylix***@yahoo.co.uk> wrote in message <snipped>news:p00435ldrhe5640johnevmacehf333i4sd@4ax.com... > On Thu, 11 Jun 2009 21:11:33 -0500, "Ralph" > <nt_consultin***@yahoo.com> wrote: > LOL> Then here's something that will make you weep! A TR3 can be yours for > 32,000 pounds (approx $51,000). > http://www.carandclassic.co.uk/car/C91970/ > Which means if I had kept it in shape over the last 30 years - I would almost break even in repair costs. -ralph "Mark" <mark.tunnard.jack***@googlemail.com> wrote in message I too like Subversion, but not for the classic VB development platform. VSSnews:96c3f2fa-f84b-4b56-82b3-c743f24e6bb8@y7g2000yqa.googlegroups.com... > You really would be better off with a version control system, as Ralph > recommends. Subversion is a free open source system that's very widely > used, Microsoft Visual Source Safe (as recommended by Ralph) is pretty > cheap these days - and hopefully the old bugs which corrupted the > archives are fixed now too :) works hand and glove with VB, both as an external utility and a full featured Add-On. Due to the peculiarities of how the VBIDE manages "source files", Subversion can only be reliably used as an external utility. [Note: these comments are aimed at VSS versions normally available with VS6 and below and for its use with the classic VBIDE.] VSS does have a rep for being "buggy" although this rep is largely unfounded. It gets the rep primarily because of three reasons. 1) VSS needs to be periodically checked for errors (cleaned 'n packed). Something, I often find users of the product not even aware of. The reason for this is that VSS is extremely paranoid when it comes to integrity, it is embarrassing redundant. The frequency depends on how it is being used. I normally check mine every week and encounter a "repair" (which it can do automatically) needed about 3 times a year. 2) Due to the way VSS manages its file store you cannot use incremental backups (or other marking schemes), something Admins like. You must use full-backups, something Admins normally don't like. 3) And last, a surprising number of developers don't know how to use or design a SCCS and unfortunately the first SCCS they usually get their hands on is VSS. :-) -ralph Why not use WinMerge instead? I make source backup for every released
version, so if someone reported a problem with a specific version, I can check what has changed that caused the problem. http://en.wikipedia.org/wiki/WinMerge "MM" <kylix***@yahoo.co.uk> wrote in message If you still prefer an Addin solution, perhaps an easier and more flexible news:oi1l25hd8tk81qc6avt03u0vrl6fuul18t@4ax.com... > One feature I would have wanted to see in the classic VB line is a > date/time stamp in a comment to every line of code edited or added. approach is to use a docking window that can be glued to the source window and show the information side by side, like the way MZTools create its windows. You can for instance make it show only the date for changes made in the last X Hours/Days/Weeks, and display the date in other formats, like "5h10m ago". Use search by title in MSDN to find "Manipulating the IDE with Add-Ins", and read "LinkedWindows Collection" subtopic. I think you can make a docking window by adding a new form to your Addin, and set BorderStyle property to "5 - Sizable ToolWindow", but I am not sure.
Show quote
Hide quote
On Thu, 11 Jun 2009 10:18:55 -0400, "Nobody" <nob***@nobody.com> Earlier today I had a look at my flagship addin (internal use only)wrote: >"MM" <kylix***@yahoo.co.uk> wrote in message >news:oi1l25hd8tk81qc6avt03u0vrl6fuul18t@4ax.com... >> One feature I would have wanted to see in the classic VB line is a >> date/time stamp in a comment to every line of code edited or added. > >If you still prefer an Addin solution, perhaps an easier and more flexible >approach is to use a docking window that can be glued to the source window >and show the information side by side, like the way MZTools create its >windows. You can for instance make it show only the date for changes made in >the last X Hours/Days/Weeks, and display the date in other formats, like >"5h10m ago". > >Use search by title in MSDN to find "Manipulating the IDE with Add-Ins", and >read "LinkedWindows Collection" subtopic. > >I think you can make a docking window by adding a new form to your Addin, >and set BorderStyle property to "5 - Sizable ToolWindow", but I am not sure. that I developed over many months, and refreshed my memory on the VBE. However, there is no way one can detect an actual change to a line other than by the use of a timer to compare before and after versions. With e.g. the CodeModule.Lines property you can inspect a line and manipulate it, but there is no actual event to indicate that it has been edited. That is the missing link. Possibly something could be achieved with a timer on a short-ish interval, but that strikes me as messy. But I will take a look at your suggestion. At present this idea is just something that has been rolling around in my head (plenty of free space...) for a few years, so another month or two won't hurt. MM "MM" <kylix***@yahoo.co.uk> wrote in message You can subclass the IDE, or set a hook on the IDE thread.news:iib235dtf6968scogmm6fitn8ulvi7iajt@4ax.com... > However, there is no way one can detect an actual change to a line > other than by the use of a timer to compare before and after versions. Also, if needed, you can intercept a compile or Run and do what you want. See ImmClear Addin below, which you can use as a template. Look for "EnterRunMode" event. This event fires just when you run a project. There is also "BeginCompile" event in the drop down, but it's not used in this Addin. http://www.lockdesign.co.uk/immcldl.htm On Thu, 11 Jun 2009 12:44:53 -0400, "Nobody" <nob***@nobody.com> Whew! Yes, I suppose one could do that. But what would one check forwrote: >"MM" <kylix***@yahoo.co.uk> wrote in message >news:iib235dtf6968scogmm6fitn8ulvi7iajt@4ax.com... >> However, there is no way one can detect an actual change to a line >> other than by the use of a timer to compare before and after versions. > >You can subclass the IDE, or set a hook on the IDE thread. in order to detect a line edit/addition? Obviously, the parser knows exactly what's happening since it is so quick to highlight a syntax error. MM
Show quote
Hide quote
"MM" <kylix***@yahoo.co.uk> wrote in message You can call GetSelection Method of the CodePane Object to get the caret news:mtn2359618h1ajb36m31vci2rdp2rov6d8@4ax.com... > On Thu, 11 Jun 2009 12:44:53 -0400, "Nobody" <nob***@nobody.com> > wrote: > >>"MM" <kylix***@yahoo.co.uk> wrote in message >>news:iib235dtf6968scogmm6fitn8ulvi7iajt@4ax.com... >>> However, there is no way one can detect an actual change to a line >>> other than by the use of a timer to compare before and after versions. >> >>You can subclass the IDE, or set a hook on the IDE thread. > > Whew! Yes, I suppose one could do that. But what would one check for > in order to detect a line edit/addition? Obviously, the parser knows > exactly what's happening since it is so quick to highlight a syntax > error. location. Note that this method takes variables by reference, to fill them with position data. You can compare before/after keyboard or mouse messages to see if the position has changed.
Sub .... or Private Sub....
When and where do I do Set m_FormVar = Nothing? Serial Number VB6 - Just In Time Error Message Help MS Access Query in VB6 fso.Drives replacement The GPF in VB6 Environment is caused by: Call HtmlHelp(Me.hwnd, App.HelpFile, HH_CLOSE_ALL, 0&) Open a FoxPro DAT file? Security Settings Programmatically Determining File Size and/or contents |
|||||||||||||||||||||||