Has anybody tried VFPX project FoxBin2PRG??

30 views
Skip to first unread message

Jim Nelson

unread,
Apr 25, 2014, 9:20:46 PM4/25/14
to foxpr...@googlegroups.com, Fernando Bozzo

Has anybody tried the newest VFPX project, FoxBin2PRG?

I have been accustomed to using SCCTEXTX for file comparisons, using Frank Perez's interface with Beyond Compare 3 when I compare files.  I find this to be a simply fantastic tool.

However, I have found that when I have made even simple changes in a file that the Beyond Compare can report a large number of spurious changes that only are reported because the order of the objects / methods / properties in the file may have changed.

Today, for example, I made a fairly simple change to a single method in a VCX.  The comparisons of the SCCTEXTX files for the before/after versions of this VCX is shown below. 

Note in particular the narrow column on the far left -- the red marks indicate places in the VCX where there are changed blocks of code.  (The text files being compared are about 220K each; the window on the left shows just a portion of the entire file.)

It would appear that I must have made massive changes, which is not true at all.

Inline image 2

Then I used FoxBin2PRG on the same before/after files. It generates files with extension of "VC2".  The Beyond Compare results of these files is shown below -- note that the red lines indicating "changed blocks of code" are almost all gone.

This is certainly what I would hope for and expect.

So, the question -- has anybody else done any work with FoxBin2Prg?  It claims to have other advantages (being able to merge code, being able to recreate binary files, etc.) but I have not seen any discussions or comments on it.

From this one test, it seems to be quite valuable.

Inline image 1


--
Jim Nelson
ThorMaster

(805) 498-9195 (preferred)

MattSlay

unread,
Apr 26, 2014, 8:50:15 AM4/26/14
to FoxPr...@googlegroups.com
The home page also indicates that it manages TimeStamps on the binaries an text files. Not sure exactly what it does...

There is a parameter to manage this feature:

cNoTimestamps (v? IN ) '1' for clearing Timestamps on text and binaries. Useful for minimizing differences on Diff and Merge operations

Fernando D. Bozzo

unread,
Apr 29, 2014, 6:30:21 AM4/29/14
to FoxPr...@googlegroups.com, foxpr...@googlegroups.com, Fernando Bozzo
Hi Jim!

As you can see, there is not much feedback about this tool in this forum, but fortunately I have some feedback by email, including a the person that have reviewed it on VFPX leaving a comment.

May be it is a language barrier, because I've done an effort to traduce to English the most important things, like an explanation of what it is this tool intended for, and the configuration, but the documentation is in Spanish, on my blog (http://fdbozzo.blogspot.com.es/)

If there are any questions about it, I'll glad to answer.


Best regards!

Jim Nelson

unread,
Apr 29, 2014, 9:00:09 AM4/29/14
to FoxPr...@googlegroups.com
Fernando --

And yet another possibility is that many who would have use for it are already using another tool (SCCTEXTX or TWOFOX) as part of their Source Control and do not see the need or advantage for switching.




--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Fernando D. Bozzo

unread,
Apr 29, 2014, 9:41:20 AM4/29/14
to FoxPr...@googlegroups.com
Yeah, culd be.

I've used SccText many years, from late 90's up to the end of last year (I've contributed some changes and optimizations in SccTextX), and have used TwoFox for the last two years because of the need of merging code

- With SccTextX the problem I found is that it is one-way, so you can look at differences, but you need to make the merging manually, method by method, opening the origin and destination form/class/report/etc and doing the changes manually or copying/pasting, which is an error prone procedure when there are multiple changes

- With TwoFox you can merge XML, but I've encountered the problem that XML is not easy to modify for developers, so you end not just merging the code, but having to make sure that XML tags are all in place and the XML structure intact, which is another level of complexity.

Both tools generate many differences even with little modifications, as you have seen, so with FoxBin2Prg I've the purpose of doing somewthing about that, and using some of the knowledge adquired with the SccTextX internals and the TowFox, I've made a tool that is more likely as the "Export code" function of the Class Browser.

The objective was to create something that feels like real PRG code and that can be modified and merged like a PRG, so many developers can modify at the same time

Another objetive was that with this modified or merged PRG-like code, you can regenerate the original binaries. Even having properties and methods not ordered internally like the original binary, the functionality is the same, and what you see when open the binary with modify command is the same too.

Final steps where to optimize some aspects:

- ZOrdering: is a list of objects without the original ZOrder number, on which the original order is maintained depending on the phisical order ob the items, which is more easy to modify and keep differences at a minimum (This is some of the things that make so many changes on SccTextX nad TwoFox, the ZOrder numbered records)

- OleObjects: Are encapsulated on the class or control that use it, making easy to move to another place on the file, using any editor, because the binary part of the code is base64 converted

- PAM zone (Properties, Arrays and Methods): Is delimited with comments, which make them easy to modify. I think that there are some room for improvement here, like dropping the special symbols (^ and *), because they are already identified with *p:, *a: and *m: markers

- Class, method and property comments look like the real ones (&&), because they are very important, not only because they document the PAM or clas, they are easy to modify and maintain too

- All the "code" is generated in a manner that cause the minimal differences possible

Actually I'm using this on production code using PlasticSCM as the new source code manager, for teams that can modify and merge very quick and in a very intuitive manner, that was the goal of this project.


I hope more people find this development useful. For me it was an opportunity to share something that I need to use in my day to day living for the next 4 or 5 years at least.

Jim Nelson

unread,
Apr 29, 2014, 10:00:13 AM4/29/14
to FoxPr...@googlegroups.com
Fernando --

Thank you for your work and for sharing this with all of us.

I expect to start using this in the not-to-distant future.




--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Slay

unread,
Apr 29, 2014, 11:14:55 AM4/29/14
to FoxPr...@googlegroups.com

I too am now using this in place of SccTextX and TwoFox.   I haven’t made many code changes since I switched over, so I can give much feedback at this point.

 

One function/feature I found missing from this tool is a wrapper that will handle all files in a Project. Currently, it seems to be a one-file-at-a-time tool. Most users, I believe, will want to run it on an entire Project.

 

The way I solved this was to modify one the Thor Tool Procs to call this instead of SccTextx.

--
You received this message because you are subscribed to a topic in the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/FoxProThor/Kl-b1E0oRFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to FoxProThor+...@googlegroups.com.

Jim Nelson

unread,
Apr 29, 2014, 11:13:54 AM4/29/14
to FoxPr...@googlegroups.com
Do either SCCTEXTX or TWOFOX provide this "entire project" functionality?

I think the Thor Proc you refer to is one of those undocumented features in Thor. Maybe we should clean it up a little and make it available to others who might find it of interest.

Fer

unread,
Apr 29, 2014, 11:17:07 AM4/29/14
to FoxPr...@googlegroups.com

Hi Matt:

In the readme.txt there is a configuration for included scripts that are for that.
They are used in File Explorer with the "send to" trick, and you can process one file, multiple files or a directory

Matt Slay

unread,
Apr 29, 2014, 11:27:19 AM4/29/14
to FoxPr...@googlegroups.com

Thanks, but that is still a manual process, and I would prefer a pure FoxPro code-based solutions that I can run from a Project hook, or launch from the Command Window in FoxPro.

Matt Slay

unread,
Apr 29, 2014, 11:31:08 AM4/29/14
to FoxPr...@googlegroups.com

Yes, TwoFox can do an entire project like this:

 

Do 'H:\work\util\twofox\genxml.app' with (lcProject)

 

 

 

For SccTextX, it is no native, as we made a Thor Proc, and it is called like this:

 

llGenereateSccFiles = ExecScript(_Screen.cThorDispatcher, 'Thor_Proc_GenerateSccFilesOnProject', lcProject)

Jim Nelson

unread,
Apr 29, 2014, 11:28:39 AM4/29/14
to FoxPr...@googlegroups.com
But our Thor Proc creates SCCTEXTX files, right?

So, someday, we should give an option so that it would create these FoxBin2PRG files instead.

Matt Slay

unread,
Apr 29, 2014, 11:45:10 AM4/29/14
to FoxPr...@googlegroups.com

>> But our Thor Proc creates SCCTEXTX files, right?

 

 

Yes, it calls eventually calls Thor_Proc_SccTextx.Prg on each file.

 

However, on my machine, I added this code to override SccTextX, and use this code to call FoxBin2Prg instead:

 

 

Lparameters tcFile

 

Local lnReturn

 

Try

     Do "H:\Work\util\Thor\Thor\Tools\Components\FoxBIN2PRG\FoxBin2Prg.prg" with (tcFile)

     lnReturn = 1

Catch

     lnReturn = - 1

EndTry

 

 

Execscript (_Screen.cThorDispatcher, 'Result=', lnReturn)

 

Return lnReturn

Fer

unread,
Apr 29, 2014, 11:43:39 AM4/29/14
to FoxPr...@googlegroups.com

Oh, I see what you mean.
It's something that I can add for next version may be, so may be something like:
Do foxbin2prg with "directory", .T. / .F.

Jim Nelson

unread,
Apr 29, 2014, 11:45:09 AM4/29/14
to FoxPr...@googlegroups.com
Fernando --

Well, doing a directory isn't quite good enough either.

My projects cross a number of folders (and do not include everything in those folders, either)


Matt Slay

unread,
Apr 29, 2014, 11:52:20 AM4/29/14
to FoxPr...@googlegroups.com

I would want to be able to specify the exact Project filename (.pjx file)

 

Some users may want to specify a folder path, and a flag to process subfolders also.

Fer

unread,
Apr 29, 2014, 11:57:09 AM4/29/14
to FoxPr...@googlegroups.com

Yeah, could be. That behavior needs a special parameter, because pjx (and pjm) are converted too.

Fernando D. Bozzo

unread,
Apr 29, 2014, 6:38:01 PM4/29/14
to FoxPr...@googlegroups.com, foxpr...@googlegroups.com, Fernando Bozzo
Matt, Jim:

I've added the batch convertion for a project. I've attached the modified version.

It's used like this:


*-- Convert all binaries from a project to tx2:
*-- In this case, the PJX (table) is opened, scanned and
all contained files converted to text
DO foxbin2prg.prg WITH 'C:\DESA\TEST\VARIOS\vcx2xml\bin2xml.pjx', '*'


*-- Convert all tx2 from a project back to binary:
*-- In this case, PJ2 (text) is opened, scanned, and all contained files converted to binary
DO foxbin2prg.prg WITH 'C:\DESA\TEST\VARIOS\vcx2xml\bin2xml.pj2', '*'


I think that's the best and cleanest approach. The right '*' makes the difference between converting just de PJX/PJ2 or the entire project.

Please, let me know if works for you.

Cheers.-

foxbin2prg.prg.txt

Jim Nelson

unread,
Apr 29, 2014, 6:41:19 PM4/29/14
to FoxPr...@googlegroups.com, Fernando Bozzo
Thanks for this! And how quickly you did so.

Cheers


--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Slay

unread,
Apr 30, 2014, 10:38:51 AM4/30/14
to FoxPr...@googlegroups.com

*-- Convert all binaries from a project to tx2:
*-- In this case, the PJX (table) is opened, scanned and all contained files converted to text
DO foxbin2prg.prg WITH 'C:\DESA\TEST\VARIOS\vcx2xml\bin2xml.pjx', '*'


 

 

Here is my feedback:

 

1. I like the progress bar. Very nice touch!

 

 

 

 

2. I failed if the project file was already open in the FoxPro IDE. Perhaps you can work around this by some means.

 

 

 

 

 

3. It failed when it tried to process FoxUser.dbf, which, for whatever reason is included in  my Project File. I assume it will also fail for any other dbf that Used and also included in the Project. Once I removed this file from my Project, your tool ran just fine.

 

 

 

 

 

4. It takes a bit of time to run though the whole project. Can you please explain if it generates the txt file for every binary, even if they have matching file dates? Perhaps this could be made quicker if you re-generate text files only if the binary file is newer than the text file, or if the text file does not exist.

 

 

Here is the code that our SccText Thor tool uses to determine if the text file needs to be re-generated:

 

loShellApp    = Createobject ('Shell.Application')

 

     lcFile = Alltrim(filename) && Binary file

     lcSCCFilename = GetSCCFilename(lcFile) && Name for text file, based on binary file type

 

     *-- Get DateTime of binary file -----------------------------------------

     loNameSpace        = loShellApp.NameSpace (Justpath (lcFile))

     loFile             = loNameSpace.ParseName (Justfname (lcFile))

     ldBinaryFileDate   = loFile.ModifyDate

 

     *-- Get date on SCC file, so we can compare to binary file

     If File (lcSCCFilename)

           loNameSpace       = loShellApp.NameSpace (Justpath (lcSCCFilename))

           loFile            = loNameSpace.ParseName (Justfname (lcSCCFilename))

           ldSCCFileDate = loFile.ModifyDate

     Else

           ldSCCFileDate = {//::}

     Endif

 

     If ldBinaryFileDate > ldSCCFileDate

           **-- Generate the text file…

     Endif

--
You received this message because you are subscribed to a topic in the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/FoxProThor/Kl-b1E0oRFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to FoxProThor+...@googlegroups.com.

image001.png
image002.png
image003.png

Jim Nelson

unread,
Apr 30, 2014, 10:42:36 AM4/30/14
to FoxPr...@googlegroups.com
I think that the problems with the "File In Use" errors can be corrected by adding "AGAIN" to the USE command.


--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Fer

unread,
Apr 30, 2014, 3:31:39 PM4/30/14
to FoxPr...@googlegroups.com
Hi Matt:

I answer on your post.


2014-04-30 16:38 GMT+02:00 Matt Slay <matt...@jordanmachine.com>:

*-- Convert all binaries from a project to tx2:
*-- In this case, the PJX (table) is opened, scanned and all contained files converted to text
DO foxbin2prg.prg WITH 'C:\DESA\TEST\VARIOS\vcx2xml\bin2xml.pjx', '*'


 

 

Here is my feedback:

 

1. I like the progress bar. Very nice touch!

 

 


Thanks Matt :-)  At the beginning I thought that this was a need when mass-converting files, to not desperate :-)

 

 

 

2. I failed if the project file was already open in the FoxPro IDE. Perhaps you can work around this by some means.

 

 


There is a parameter for that:

*-- Regenerate all, but don't show errors, nor debug info:
DO c:\desa\foxbin2prg\foxbin2prg.prg WITH 'C:\DESA\TEST\VARIOS\vcx2xml\bin2xml.pj2', '*', '', '', '1'


*-- Regenerate all, don't show errors, and generate debug info file (to see what happens internally):
DO c:\desa\foxbin2prg\foxbin2prg.prg WITH 'C:\DESA\TEST\VARIOS\vcx2xml\bin2xml.pj2', '*', '', '', '1', '1'


 

 

 

 

3. It failed when it tried to process FoxUser.dbf, which, for whatever reason is included in  my Project File. I assume it will also fail for any other dbf that Used and also included in the Project. Once I removed this file from my Project, your tool ran just fine.

 

 


Same as (2)
 

 

 

 

4. It takes a bit of time to run though the whole project. Can you please explain if it generates the txt file for every binary, even if they have matching file dates? Perhaps this could be made quicker if you re-generate text files only if the binary file is newer than the text file, or if the text file does not exist.

 


Yes, until now I've regenerated all binaries, and only optimization was to compare final tx2 with existent tx2 to decide if replace or not.
Added the timestamp optimization, as you suggested.

Attached is a zip file (with a .txt added), that includes de foxbin2prg.prg and the texts translation file foxbin2prg_en.h, which if you rename to foxbin2prg.h and recompile, translates almost all messages to english.

foxbin2prg.zip.txt

Jim Nelson

unread,
Apr 30, 2014, 3:35:48 PM4/30/14
to FoxPr...@googlegroups.com
Fernando --

As I noted in my earlier message (responding to Matt), you can avoid the "file in use" errors by including "AGAIN" as part of your USE command:

USE SomeFile Again Shared In 0

I am pretty sure that I will have the project file open, for instance, when calling this as part of the build process.




--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Matt Slay

unread,
Apr 30, 2014, 3:48:52 PM4/30/14
to FoxPr...@googlegroups.com

Hmmm…

 

I got an error message trying to extract the files from the zip:

 

Can you re-build the zip file and send it again?

 

Jim – Did it work for you?

 

 

 

image004.png
image005.png
image006.png
image007.png

Jim Nelson

unread,
Apr 30, 2014, 3:46:38 PM4/30/14
to FoxPr...@googlegroups.com
Not me ... I am only able to read these emails and maybe comment on them, but I am not able to do anything more than that today.  And probably not tomorrow, from the looks of it.



--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Fer

unread,
Apr 30, 2014, 3:48:09 PM4/30/14
to FoxPr...@googlegroups.com
Hi Jim:

AGAIN only works when using the PRG, and doesn't resolve the Exclusive case. And don't forget that when regenerating the binary, I need exclusive use.

My recomendation is using the EXE, not th PRG, because it's faster and can be used with external programs. The PRG is principally for making possible that people inspects the code, but that's a personal choice.

Thanks!


Fer

unread,
Apr 30, 2014, 3:49:34 PM4/30/14
to FoxPr...@googlegroups.com
Ok, attached as 7zip.
foxbin2prg.7z

Jim Nelson

unread,
Apr 30, 2014, 3:55:57 PM4/30/14
to FoxPr...@googlegroups.com
Fernando --

No, I think AGAIN does resolve the Exclusive case.  Give it a try.

No doubt you do need exclusive access when regenerating the binary, but that's the unusual case.  

The usual case is that I want to run your routine against all the files in my current open project to create text files, and you should be able to provide for this case.



PRG or EXE doesn't matter to me at this mome

Matt Slay

unread,
Apr 30, 2014, 4:14:59 PM4/30/14
to FoxPr...@googlegroups.com

Jim’s point is that for re-building the binary from the text you do need exclusive then, but for generating the text files from the binaries, you do not need exclusive access to do that.

image001.png
image002.png
image003.png

Fer

unread,
Apr 30, 2014, 4:13:08 PM4/30/14
to FoxPr...@googlegroups.com
2014-04-30 21:55 GMT+02:00 Jim Nelson <jimrn...@gmail.com>:
Fernando --

No, I think AGAIN does resolve the Exclusive case.  Give it a try.

I've not explained myself correctly, sorry. When I say that I need exclusive access to the table, is not using it exclusive, it's when recreating the table (create table xxx)

 

No doubt you do need exclusive access when regenerating the binary, but that's the unusual case.  

The usual case is that I want to run your routine against all the files in my current open project to create text files, and you should be able to provide for this case.


You are right. I've added some missed AGAIN's on existent USE SHARED

 


PRG or EXE doesn't matter to me at this mome


You are right on this too.

Fer

unread,
Apr 30, 2014, 4:14:59 PM4/30/14
to FoxPr...@googlegroups.com
Thanks Matt, I've got it on second reading, not on first :-)

And Jim is right, I'll test this use case.


Thanks both

Fer

unread,
May 1, 2014, 7:06:31 AM5/1/14
to FoxPr...@googlegroups.com
Hi:

I've added the AGAIN clause in the places that where missing. Now you can generate tx2 file for open tables that are in SHARED mode.

Keep in mind that FoxBin2Prg uses tables inside a Session class, to keep the workareas and pointers untouched.

I've attached the modifications in a 7zip file. I await for comments.


Best regards!

foxbin2prg.7z

Jim Nelson

unread,
May 1, 2014, 8:15:01 AM5/1/14
to FoxPr...@googlegroups.com
Fernando --

Thanks for adding that AGAIN phrase.  That helps a lot.  

It does more than you think, however.  You said:

Now you can generate tx2 file for open tables that are in SHARED mode.

Actually, you can also open files that were opened in EXCLUSIVE mode.  Try the following code, for instance:

Use CodeRule Exclusive In 0
Use CodeRule Again Shared In 0





--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Slay

unread,
May 1, 2014, 9:57:00 AM5/1/14
to FoxPr...@googlegroups.com

I just tried this with the Project file open, and it worked fine.

 

I also had a DBF table open that is also referenced in the Data tab of Project file, and it also worked fine there too.

 

So, it appears to be working fine now.

 

 

 

 

 

From: FoxPr...@googlegroups.com [mailto:FoxPr...@googlegroups.com] On Behalf Of Fer
Sent: Thursday, May 01, 2014 6:07 AM
To: FoxPr...@googlegroups.com
Subject: Re: {Thor} Re: Has anybody tried VFPX project FoxBin2PRG??

 

Hi:

--

Fer

unread,
May 1, 2014, 10:22:19 AM5/1/14
to FoxPr...@googlegroups.com
Jim, thank You for pointing me in the right direction.

I've tried your example, and it works ok when tables are in the same datasession, but fail when the second Use Again Shared is in another datasession.


Thanks Jim!



--
You received this message because you are subscribed to a topic in the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/FoxProThor/Kl-b1E0oRFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to FoxProThor+...@googlegroups.com.

Fer

unread,
May 1, 2014, 10:23:42 AM5/1/14
to FoxPr...@googlegroups.com
Ok Matt, I'm going to release for public with the new modifications then.

Thanks for your time!


Jim Nelson

unread,
May 1, 2014, 10:31:35 AM5/1/14
to FoxPr...@googlegroups.com
Ah!  Thanks ... good to know

Jim Nelson

unread,
May 1, 2014, 10:32:05 AM5/1/14
to FoxPr...@googlegroups.com
Actually, Fernando, it is we who thank you for your time.




--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Matt Slay

unread,
May 1, 2014, 10:01:56 AM5/1/14
to FoxPr...@googlegroups.com

Can you explain more details about how or what this TimeStamps flag does?

 

“clearing Timestamps…” – what does this mean?

 

 

 

(BTW - Perhaps your response to this question would best be handled as a new wiki page on your project that you can link to in the future.)

image001.png

Fer

unread,
May 3, 2014, 6:44:50 PM5/3/14
to FoxPr...@googlegroups.com
Hi Matt:

I've followed your suggestion, and have created a new wiki documentation page with a link available on bottom of the official FoxBin2Prg documentation page:

FoxBin2Prg Internals and Configuration


Hope it explains better some things. I will try to keep updated with the questions of the Community.

For Spanish Documentation I have the Blog anyway (http://fdbozzo.blogspot.com.es/)

Please, drop me a word if found any syntax error :-) or think that something needs explanation or more datail.


Thanks for the suggestion!




2014-05-02 20:28 GMT+02:00 Fer <fdb...@gmail.com>:
Hi Matt:

Al FoxPro tables used for VCX, SCX, MNX, etc, have a timestamp column. By default FoxBin2Prg clears this field on binaries and tx2 files, because it causes too much differences on Diff and Merge operations.
The same is aplicable to the UniqueID field, which is cleared too. You can see them in tx2 files on class headers, like this:

DEFINE CLASS cnt_controles AS container         && Descripción de la clase "cnt_controles"
    *< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />
 
    *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
    *< OBJECTDATA: ObjPath="Check2" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Check4" UniqueID="" Timestamp="" />




Both fields can be reactivated on foxbin2prg.cfg configuration file, if someone wants them back.




--

Fer

unread,
May 2, 2014, 2:28:11 PM5/2/14
to FoxPr...@googlegroups.com
Hi Matt:

Al FoxPro tables used for VCX, SCX, MNX, etc, have a timestamp column. By default FoxBin2Prg clears this field on binaries and tx2 files, because it causes too much differences on Diff and Merge operations.
The same is aplicable to the UniqueID field, which is cleared too. You can see them in tx2 files on class headers, like this:

DEFINE CLASS cnt_controles AS container         && Descripción de la clase "cnt_controles"
    *< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />
 
    *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
    *< OBJECTDATA: ObjPath="Check2" UniqueID="" Timestamp="" />
    *< OBJECTDATA: ObjPath="Check4" UniqueID="" Timestamp="" />




Both fields can be reactivated on foxbin2prg.cfg configuration file, if someone wants them back.


--

Matt Slay

unread,
Jun 7, 2014, 12:11:26 AM6/7/14
to FoxPr...@googlegroups.com

I’ve noticed that the output from FoxBin2Prg often has extra “*” characters added in certain places in the >DefinedPropArrayMethod> node of the output.

 

I cannot figure out why this would have been added to my files from one commit to the next, as I did not change anything in the binary files related to these names.

 

What is going on here?

 

 

 

image004.png

Jim Nelson

unread,
Jun 7, 2014, 12:18:51 AM6/7/14
to FoxPr...@googlegroups.com
Those look like what you see in a vcx/scx to indicate methods ... notice the "m"s and "p"s. Perhaps the * is no longer necessary.  Old value on the left in your message, newer on the right, perhaps?


--
You received this message because you are subscribed to the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to FoxProThor+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Matt Slay

unread,
Jun 7, 2014, 12:26:38 AM6/7/14
to FoxPr...@googlegroups.com

“no longer necessary”… That’s fine, but what is taking them out?  Just me making an edit to the class?

 

This code base has been editing in VFP for years now, so I’d expect all this to be settled out by now.

 

I wish something would just one pass through all the files and get this cleaned.  It makes the diff on my files very noisy, and I can’t easily see the real code changes that I made from amongst all this noise.

 

I guess this will eventually clean itself up, but until then it’s too much noise. All of my commits since I started using FoxBin2Prg seem to have lots of this going on.

 

Ready for it to end.

 

 

 

From: FoxPr...@googlegroups.com [mailto:FoxPr...@googlegroups.com] On Behalf Of Jim Nelson


Sent: Friday, June 06, 2014 11:19 PM
To: foxpr...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "Thor, the Tool Manager for FoxPro" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/FoxProThor/Kl-b1E0oRFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to FoxProThor+...@googlegroups.com.

image001.png

Matt Slay

unread,
Jun 7, 2014, 12:35:44 AM6/7/14
to FoxPr...@googlegroups.com

Notice how certain settings for this grid (on the left is older code) got removed from the right (newer code).  Most of them are just default settings that came from the parent grid class anyways, so why were they repeated here in the  first place?

 

This grid is on a page in a pageframe class.

 

No harm was really done, EXCEPT for that last line (see red arrow), which also got removed for some reason and broke my app.  I know I didn’t remove (reset) that setting or any of the other ones.

 

I did add an additional page to the pageframe class and add new controls to the new page, but somehow, this grid back on one of the other pages got many of its properties wiped out, and I have no idea why.  The same exact thing happened to another grid on another one of the pages.

 

What in the world would have caused this?

 

 

image002.png

Jim Nelson

unread,
Jun 7, 2014, 12:37:31 AM6/7/14
to FoxPr...@googlegroups.com
Well, your code base hasn't changed.  Rather, the representation of your code base as created by FoxBin2PRG has changed.

It appears that the output file from FoxBin2Prg has changed, something that can't be that unexpected given the frequency of updates.

Matt Slay

unread,
Jun 7, 2014, 1:26:46 AM6/7/14
to FoxPr...@googlegroups.com

I added the property setting back to the grid and all those other properties show right back up.

 

So this tells me FoxBin2Prg is not removing them for display simplification.  They are in the BIN file, so they are in the VC2 as well.

 

 

 

--

image001.png
image002.png

Fer

unread,
Jun 7, 2014, 6:31:41 AM6/7/14
to FoxPr...@googlegroups.com
Hi Matt!

As Jim said, it's just the text representation what have changed when regenerating from binaries, as stated on the change log on the download page of VFPx for release v1.19.21, which is the same version that have your enhancement proposal added.
I suggest that you regenerate all tx2 files (just the text files) using the new switch "OptimizeByFilestamp= 0" on foxbin2prg.cfg (added in v1.19.22 release), so yuo don't get this differences anymore and can see just your changes.

By the way: What source control tool are you using?

Best Regards!


Fernando D. Bozzo

unread,
Jun 7, 2014, 6:48:52 AM6/7/14
to FoxPr...@googlegroups.com
Hi Matt:

What version of FoxBin2Prg are you using? Starting from v1.19.22 (the newest) there are new props_*.txt files distributed in the same directory of foxbin2prg.prg that are used for correct property ordering.
If you have this version and don't have copied theese files, you will end up loosing properties. Theese files are necessary for the ordering and for better maintainability of them, and is documented on the FoxBin2Prg Internals and Configuration help page.

Don't know if this could be causing youtr problem.

Fernando D. Bozzo

unread,
Jun 7, 2014, 6:51:39 AM6/7/14
to FoxPr...@googlegroups.com
I forget to mention that the EXE component don't have this problem, because it have all the necessary files inside, so it's faster than the PRG version, which need various files to be present on the install dir.


Best regards!

Matt Slay

unread,
Jun 7, 2014, 10:15:21 AM6/7/14
to FoxPr...@googlegroups.com
I have whatever version I am getting through Thor Check for Updates.

I can open the prg file next time I get to my laptop and check the version number. 

Fer

unread,
Jun 7, 2014, 10:23:23 AM6/7/14
to FoxPr...@googlegroups.com
Hi Matt:

I can't know what was the last time you have updated, that's why I'm asking :-)

On the Thor update screen it show the available version, I've released today with some bug fixes, that are explained on the same Thor update screen, in the lower pane. All the change history is there for FoxBin2Prg (not everybody uses this useful field)

Please, drop me a line if you find any problem.


Best regards.-


Matt Slay

unread,
Jun 9, 2014, 2:20:13 PM6/9/14
to FoxPr...@googlegroups.com

I’ve upgraded to ver 1.19.23

 

But I notice that FoxBin2Prg still complains if the Project file is already open in the IDE.

 

Here is the command I run from a PRG:

 

     DO "H:\Work\util\Thor\Thor\Tools\Components\FoxBIN2PRG\FoxBin2Prg.prg" WITH (lcProject), '*'

 

 

 

 

 

 

 

 

image002.png

Fernando D. Bozzo

unread,
Jun 9, 2014, 2:52:30 PM6/9/14
to FoxPr...@googlegroups.com
I don't why trying to answer by email rejects me with an error, so I've sent the corrected PRG to your email, but I reattach the corrections in the forums, just in case someone needs the "again" functionality before next release.

Thanks for reporting!
foxbin2prg.7z

Matt Slay

unread,
Jun 9, 2014, 2:55:02 PM6/9/14
to FoxPr...@googlegroups.com

Yes, this fixed the problem.

 

Thanks!

 

 

 

From: FoxPr...@googlegroups.com [mailto:FoxPr...@googlegroups.com] On Behalf Of Fernando D. Bozzo


Sent: Monday, June 09, 2014 1:53 PM
To: FoxPr...@googlegroups.com

--

Reply all
Reply to author
Forward
0 new messages