FoxBin2Prg and order of lines in generated sc2 file

Topics: Bug Information
May 4, 2015 at 8:46 AM
Hi,
i am testing FoxBin2Prg with my VFP project. We are currently using scctextx.prg for generating textual files for our SCX and VCX files.
When I am generating SC2 for large SCX formset, I have seen that order of some controls in generated S2 file is not same after I am saving my formset.
I must save SCX (from VFP IDE) twice, to become same order of lines.

Here is some example:
    *< OBJECTDATA: ObjPath="Tform12.ebnoteco" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.lsname" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.tbsname" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.LEMail2" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.LEMail3" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.Timer1" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForName" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForCompany" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForInvoice" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForAgent" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.ebnoteco" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.lconote" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.lsname" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.tbsname" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.LEMail" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.tbinvname" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.linvname" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.Timer1" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForName" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForCompany" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForInvoice" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Tform12.CmdCallAddressForAgent" UniqueID="" Timestamp="" />
I have nothing changed in this part of source, but, those diffs are showed.

When I open my SCX file, change something, and save it again, order is OK.

Is there some parameter in foxbin2prg.exe for this?

I remember, that I had similar issue, when I was working with old scctext.prg, many years ago.
Developer
May 4, 2015 at 5:58 PM
Hi Keza:

If you see differences on the generated text with only opening and saving again your formset, then this is probably the VFP ZOrder Bug I've documented in the help entitled "FoxBin2Prg Internals and Configuration", under the ZOrder subtitle.

Can you send me the generated sc2 file?

Thanks.-
Developer
May 9, 2015 at 4:32 PM
Just to keep this thread updated for others that came here, I've emailed you to test if regenerating the binary from the sc2 text file using the new next v1.19.43 version setting "RemoveZOrderSetFromProps: 1" fixes the problem.

On my local tests this have fixed the swapping controls problem.

I wait for your feedback,

Regards.-
May 9, 2015 at 7:05 PM
It works now without problems.

Now I have first generated sc2 textual file, then converted it back to scx, and from then, when I am something changing in newly generated scx, when I convert it again in sc2 file, no diffs other then my small changes, are showed.
I haven't used "RemoveZOrderSetFromProps: 1" parameter!

Conclusion:
You must first "regenerate" your scx-s with foxbin2prg.exe:
foxbin2prg.exe d:\code\test\forms\reservat.scx
foxbin2prg.exe d:\code\test\forms\reservat.sc2
Now You have new reservat.scx.
From now on, when You are changing something in reservat.scx, and generate reservat.sc2 later, it would work properly.
Developer
May 9, 2015 at 7:13 PM
I'm glad you have the problem fixed! :D

Best regards,

Fernando.-