Tom

I handle forms in my version control. I use a method to get all form objects 
into an object-its an object of my own format…here is a sample below. Pretty 
extensive. I have code to pack and unpack the form objects so i can compare 
current version of a form with the last one (not using diff) to tell me in 
plain english what is changed. The object is put into t blob and written out to 
a version control document

the object is build using a call like this...

CORE_T_ParseFormName:=$_aT_FormNames{$_L_Index}
FORM LOAD($_aT_FormNames{$_L_Index})
C_OBJECT($CORE_ob_FormObject)
CLEAR VARIABLE($CORE_ob_FormObject)
CORE_GetFormObjects ($_aT_FormNames{$_L_Index};0;->$CORE_ob_FormObject)

I have put a copy of CORE_GetFormObjects on my 
dropbox..https://www.dropbox.com/s/banb0mpgllkj8na/CORE_GetFormObjects.txt?dl=0 
its fairly self explanatory if a little wordy..its shockingly fast i mean 
really uncompiled ‘boom' all them form objects parsed into an object faster 
than a fast thing.

If I was modifying it i would not have the constants hard coded as i now have 
code I got from the forum for reading the names of all 4D constants.


Three caveats….

1) if you try to get the menu bar of the form i think you just get the current 
menu bar(i build my menus on the fly anyway so this is not an issue for 
me)..but it can lead to you being told the menu bar has changed!
2) If you use inherited forms when you parse a form you get the inherited form 
objects and you can have an object named the same on the inherited form as on 
the inheriting form(!) and when you get the form objects they don't always come 
in the same order, this can lead to an object x on the inherited form being 
found in the array of objects before the object on the inheriting form on pass 
and then next time after-which can lead to you reporting that the object type 
has changed-i just make sure my object names on inherited forms are unique!
3)There are a couple of properties you can't get-they are as follows:-
//the following form setting cannot be obtained in code
//Markers
//access
//menu bar
//print settings
//appearance
//form type
//inherited form table
//inherited form name
//save geometry
(This is on V14 maybe on 15/16 you can get these)


this(without much comment) is the code i use to report the differences between 
two form objects(current and previous) 
https://www.dropbox.com/s/9u16tzd9db6689i/Diff_CompareForms.txt?dl=0



{"Form Name":"CODE_CHANGES","Number of Pages":2,"Fixed Width":false,"Fixed 
Height":false,"Form Title":"","Form Menu":"","Active Form Events":["On 
Load","On Validate","On Clicked","On outside Call","On Double CLicked","On 
drop","On menu selected","on Plug in area","on data change","On drag over","On 
timer","On after keystroke","on after edit","On begin drag over","On bound 
variable change","On mac toolbar button","On page change"],"Form 
Objects":[{"Page Number":1,"Name":"oCODLBChangesVIewer","Variable 
Name":"CODE_abo_MethodChanges","Type":7,"Type Name":"Object type 
listbox","Multiline option":0,"Multiline option Name":"Multiline Auto","Style 
Sheet":"__automatic__","Font Name":".SF NS Text","Font Size":12,"Font 
Style":0,"Font Style Name":"Plain","Is visible?":true,"Foreground 
Colour":"Foreground Color","Background Colour":"Foreground Color","Alternate 
Background Colour":"Foreground Color","Left Position":144,"Top 
Position":55,"Right Position":495,"Bottom Position":604,"Horizontal 
Resize":0,"Horizontal Resize Name":"Resize horizontal None","Vertical 
Resize":0,"Vertical Resize Name":"Resize Vertical None","Horizontal 
Alignment":1,"Horizontal Alignment Name":"Align …lots more here-cutting this as 
its a long bit of text


I have recently added a ‘watcher’ process which looks for all forms modified 
since the last time it looked(it looks every few mins) and if a form is 
modified runs code to compare it and save a new version of the object out. 
Happy to hear from anyone with comment/critique on this code.


> On 20 Apr 2017, at 14:04, Benedict, Tom via 4D_Tech <[email protected]> 
> wrote:
> 
> Lutz writes:
> 
>> we use a modified version of the mentioned vc-framework component. It saves 
>> all changes in the code to text files
>> immediately and keeps track of the timestamps of the changes in an external 
>> database. The text files can be
>> committed to a source code versioning tool like svn, mercurial, git ...
> 
>> We extended it a bit to allow reimporting of the exported code. So we are 
>> able to switch between branches and
>> we can do team development without a development server and dev clients. All 
>> members of our team use single user >instances of 4D. The result of the 
>> development will be compiled into a built/merged server application.
>> A very old version (V13 yet) with import code can be found on Github: 
>> https://github.com/elutz/vc-framework-v13
> 
> Do your apps use 4D forms? If so, how do you deal with them with respect to 
> version control?
> 
> Thanks,
> 
> Tom Benedict
> Optum
> 
> This e-mail, including attachments, may include confidential and/o
> proprietary information, and may be used only by the person or entity
> to which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to