Comments Cutting Tool

I HAVE FOUND IT!!! Make a new Time event form. Run the form and start developing. Every time you save an object, you will catch it, and can do what you want. OnOpenForm() LastDate := TODAY; LastTime := TIME; OnTimer() //If you work after midnight If Today > LastDate THEN Begin LastDate := Today; CLEAR(LastTime); End; ProgObj.SETRANGE(Datum,LastDate,99991231D); ProgObj.SETRANGE(Tid,LastTime,235959T); IF ProgObj.FIND(’-’) THEN BEGIN //Do what you want… MESSAGE(‘You have changed %1 %2 %3’,ProgObj.Typ,ProgObj.ID,ProgObj.Namn); LastDate := TODAY; LastTime := TIME; END; I have an idée that I could add some new function to our version handling tool that keep documentation of changes in a table. Every time anyone are chaning a object it will bring up a form there you enter documentation. Then we can stop document inside object, (But still comment code). From this information could we generate external system documentation. Per Bay Edited by - per bay on 2001 Jul 12 08:19:42

Very nice! This can be very useful. One problem still to solve is when You are more the one developer in a database. //Lars Edited by - Lars Westman on 2001 Jul 11 23:11:48

If we have more than one developer in same database, then we should need to have “Check out” and “Check in” functionality for the object. If we just assign the object to a USERID in a “Check out” table we could check this when an object is saved. But we could not check this when an object is open . Any suggestion? Is multi-developing environment common?, or is this an over-kill function. Product Manager

Is there a way through code to export an object? (I dont think so) If there was, you could run this timer function, export on change, automatically run diff scripts to parse the changes between the new file and the most recent one and therefore have all changes documented automatically. This may not need to worry about different users modifying the database because if they used their own initials in comments around the code then the diff script could work it out automagically - but that requires an export function … Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu

I’ve been playing around with the following concept: Query the objects table from the CFront ocx and write all modified object no’s to a text file. Pass this text file to a vbscript which first selects all the objects (Marked = True) and then export the objects as text files. Not the most glamorous operation, as it uses SendKeys, but it works. If you have some sort of standard in comments (as you should:), it should not be too hard to extract comments from here? Another approach I’ve been playing with is to assign a number to each change we make (reference the Documentation() with this number), and write the logic behind the mod as well as where code has been modified to a database. This database then gets queried either by job (giving you all mods pertaining to that job) or by object (giving you the modification history of that object). Anyway, if you’re looking for volunteers: I’m in. Regards, Andre

Whauw, what a lengthy thread! For some reason i just still find it easier to teach a programmer good programming practice, than trying to control this with automated tasks. After all this is an issue of discpline for the developer. And most often undocumented features are “born” when you have a programmer working at a customers site, with the customer pacing the work. Thats just my 5 cents. And this also closes this thread for now. Soren Nielsen, moderator Integration/Developer NOLUG