Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nesting Error
Message
From
15/04/2016 12:09:02
 
 
To
15/04/2016 09:28:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01634528
Message ID:
01634846
Views:
148
Hi Thomas!

>The #1 approach is the thing I thought of first to try as well on a copy of the vcx. But then IIRC you had a discussion with Lutz on creating txt files on single classes - if that functionality is in fox2bin, it might be better to rename the duplicated items ordered to their timestamp values (oldname_0x and so on) plus perhaps emptying parent column in the duplicates, use fox2bin to write out the text equivalents according to classname ?

You are talking of the "class-per-file" option implemented in FoxBin2Prg (a good idea taken from TwoFox:), but it's far less time consuming adding something like "*//*" to the comment properties of the reported objects and then deleting all related records that do not have it, than comparing the different copies of the class.
Take a look at Tommy's report, he have up to 3 copies of each class! And not neccesarily he must remember (or know) which code is the good one.
Doing the Comment's replace I suggest, you are assuring that the code you see in the IDE (and you wher working whith) is the code which remains.

Regards!


>
>That way the versions could be compared to each other and then deleted easily - even the comparisons could be scripted by a simple ! fc xxx yyy> lines built given the name of the original class and the deletion could be handled as well via SQL or xBase based on name ;-)
>
>Have not looked closely at vcx structure at a long time, but IIRC such a process should be doable in a 2 step approach, finding duplicate name (filtering out the accompanying comment row) and for each found classname creating an timestamp ordered cursor, which is used to update the older duplicate double entries...
>
>Would make sense if this really is something you have run across a few times before - I think there were only 2 vcx botched in all my vfp history where I did not hack myself the vcx and back then I just used latest saved version and recreated from memory ;-)
>
>>Hi Tommy:
>>
>>This is the kind of stuff I'm talking about when I say that FoxBin2Prg can show some "garbage" in the binary and report in a way that you can fix it.
>>Those duplicated records sometimes makes that the form or class behave erroneously, or that you change some code but another code is really executed.
>>
>>Now that you know the names and paths of the objects affected, you need to make a manual repair (backup 1st, of course).
>>
>>You have two ways of doing that:
>>
>>1) The short way:
>>a - Open your class library with "USE FORMS_RX.vcx"
>>b - Browse each group of related records (ie: BROWSE LAST FOR "olehccsol" $ objname AND "frmrx" $ parent)
>>c - Delete all records except the one that have the bigger timestamp value
>>d - Finally, close the table and make again the text version (VC2) with FoxBin2Prg to see if there are more errors
>>e - Test your library
>>> Normally this works ok.
>>
>>
>>2) The long way (if step 1 did not work):
>>a - Open the class in the VFP IDE (MODIFY CLASSLIBRARY ... or using the VFP proyect and MODIFY button on the class)
>>b - For each object add some identifier string to the "Comments" property (ie: "*//*")
>>c - Close it and reopen it as a table (ie: "USE FORMS_RX.vcx")
>>d - Browse each group of related records (ie: BROWSE LAST FOR "olehccsol" $ objname AND "frmrx" $ parent)
>>e - Delete all records that do not have your id on the Comments property (ie, Comments = "*//*")
>>f - Repeat from step (d), changing the object info you are looking for, until there are no more objects to look for
>>g - Finally, close the table and make again the text version (VC2) with FoxBin2Prg to see if there are more errors
>>h - Test your library
>>> Normally this works ok too.
>>
>>
>>Here is an example using one VFP library of the XSource that FoxBin2Prg reported errors of this kind (RepordBuilder\frxpanels.vcx)
>>
>>The errors reported:
>>
>>
>>2016-04-15T10:04:12  ----------------------------------------------------------------------------------------------------
>>ERRORS FOUND IN FILE [C:\_TEMP\Tools (vfp9)\xsource\VFPSource\ReportBuilder\frxpanels.vcx] 
>>* Duplicated Object "chk.paneltextformat.chkbackdefault" @Recno 223, (1st.Recno:14)
>>* Duplicated Object "chk.paneltextformat.chkforedefault" @Recno 221, (1st.Recno:13)
>>* Duplicated Object "cmd.paneltextformat.cmdbackcolor" @Recno 224, (1st.Recno:11)
>>* Duplicated Object "cmd.paneltextformat.cmdfont" @Recno 216, (1st.Recno:7)
>>* Duplicated Object "cmd.paneltextformat.cmdforecolor" @Recno 222, (1st.Recno:10)
>>* Duplicated Object "lbl.paneltextformat.cntpreview.previewtext" @Recno 231, (1st.Recno:3)
>>* Duplicated Object "shp.paneltextformat.cntpreview.shp1" @Recno 230, (1st.Recno:2)
>>* Duplicated Object "lbl.paneltextformat.lbl2" @Recno 228, (1st.Recno:9)
>>* Duplicated Object "lbl.paneltextformat.lbl3" @Recno 220, (1st.Recno:12)
>>* Duplicated Object "lbl.paneltextformat.lbl4" @Recno 226, (1st.Recno:8)
>>* Duplicated Object "frxformatutil.paneltextformat.oformatter" @Recno 217, (1st.Recno:4)
>>* Duplicated Object "txt.paneltextformat.txtfont" @Recno 215, (1st.Recno:6)
>>
>>
>>Now we are going to repair the "chk.paneltextformat.chkbackdefault" Duplicated Object
>>
>>Using method 1: ======================================================
>>
>>
BROWSE LAST FOR "chkbackdefault" $ LOWER(objname) AND "paneltextformat" $ LOWER(parent)
>>
>>(see "screenshot.1555.png" attached image)
>>I see something like this:
>>
>>
>>Record#  PLATFORM UNIQUEID    TIMESTAMP
>>     14  WINDOWS  _12F1EDIWK  793939357
>>    223  WINDOWS  _12F1EDIWK  824676018
>>
>>
>>So I delete record #14 because #223 have a higher TIMESTAMP
>>
>>I keep doing the same for all other objects, and finally, when generating the SC2 againg no more errors are shown.
>>(Remember to RECOMPILE the classlib! => COMPILE CLASSLIB yourlib.vcx)
>>
>>
>>Using method 2: ======================================================
>>
>>After I have added "*//*" to the Comments property of the reported objects on the VFP IDE (see "screenshot.1556.png" attached image), I reopen the classlibrary as a table and search for the reported objects:
>>
>>
BROWSE LAST FOR "chkbackdefault" $ LOWER(objname) AND "paneltextformat" $ LOWER(parent)
>>
>>(see "screenshot.1557.png" attached image)
>>
>>I only keep the record that have Comment = "*//*" in the properties memo field, and delete the rest.
>>
>>I keep doing the same for all other objects, and finally, when generating the SC2 againg no more errors are shown.
>>(Remember to RECOMPILE the classlib! => COMPILE CLASSLIB yourlib.vcx)
>>
>>
>>Hope it helps,
>>
>>Fernando.-
>>
>>
>>>Hi Fernando, and Al.
>>>
>>>I set up the FoxBin2Prg.exe and ran it with my FORMS_RX.vcx file ( the problem file that was having the weird nesting error) to convert to a VC2 text file ( this worked fine with other VCX's in the same folder).
>>>
>>>What I got was an error file for the FORMS_RX.vcx... here is a sample....
>>>
>>>
>>>2016-04-14T11:30:40  ----------------------------------------------------------------------------------------------------
>>>ERRORS FOUND IN FILE [E:\test2\Pharmacy73\Class Libraries\Forms\forms_rx.vcx] 
>>>* Duplicated Object "olecontrol.frmrx.olehccsol" @Recno 1014, (1st.Recno:565)
>>>* Duplicated Object "olecontrol.frmrx.olehccsol" @Recno 3000, (1st.Recno:565)
>>>* Duplicated Object "pageframe.frmrx.pgfscreen" @Recno 568, (1st.Recno:3)
>>>* Duplicated Object "pageframe.frmrx.pgfscreen" @Recno 1015, (1st.Recno:3)
>>>* Duplicated Object "pageframe.frmrx.pgfscreen" @Recno 3001, (1st.Recno:3)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdadditionaldoc" @Recno 976, (1st.Recno:432)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdadditionaldoc" @Recno 1429, (1st.Recno:432)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdadditionaldoc" @Recno 3420, (1st.Recno:432)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdbasic1" @Recno 977, (1st.Recno:433)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdbasic1" @Recno 1430, (1st.Recno:433)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdbasic1" @Recno 3421, (1st.Recno:433)
>>>* Duplicated Object "cmdcancel.frmrx.pgfscreen.fillpage.cmdcancel" @Recno 936, (1st.Recno:392)
>>>* Duplicated Object "cmdcancel.frmrx.pgfscreen.fillpage.cmdcancel" @Recno 1389, (1st.Recno:392)
>>>* Duplicated Object "cmdcancel.frmrx.pgfscreen.fillpage.cmdcancel" @Recno 3381, (1st.Recno:392)
>>>* Duplicated Object "commandbutton.frmrx.pgfscreen.fillpage.cmddrugpicture" @Recno 961, (1st.Recno:417)
>>>* Duplicated Object "commandbutton.frmrx.pgfscreen.fillpage.cmddrugpicture" @Recno 1414, (1st.Recno:417)
>>>* Duplicated Object "commandbutton.frmrx.pgfscreen.fillpage.cmddrugpicture" @Recno 3405, (1st.Recno:417)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdfill" @Recno 935, (1st.Recno:391)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdfill" @Recno 1388, (1st.Recno:391)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdfill" @Recno 3380, (1st.Recno:391)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdnh" @Recno 957, (1st.Recno:413)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdnh" @Recno 1410, (1st.Recno:413)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdnh" @Recno 3402, (1st.Recno:413)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdnote" @Recno 955, (1st.Recno:411)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdnote" @Recno 1408, (1st.Recno:411)
>>>* Duplicated Object "cmdbasic.frmrx.pgfscreen.fillpage.cmdnote" @Recno 3400, (1st.Recno:411)
>>>..... so forth and so on..................
>>>
>>>
>>>Looks like a lot of triplicated records in it.... what would you suggest for this ?
>>>
>>>Thanks for the help and guidance !!
>>>
>>>Tommy
Fernando D. Bozzo
Madrid / Spain
Previous
Reply
Map
View

Click here to load this message in the networking platform