Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding properties to Favorites
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01011617
Message ID:
01012312
Views:
23
>>>Or maybe I'm wrong... maybe BUILDER.PRG is not handling the presence of a Builder property correctly... or it's calling the specifically-reference Builder program (of the Builder property) when it really shouldn't be. There does seem to be code in BUILDER.PRG to do that, but for some reason, maybe it's not working.
>>>
>>>I don't know what the right answer is.
>>>
>>>--Brad
>>
>>May be somebody using MereMortals can jump in. In the meantime I've just sent a bug report.
>
>
>Just for the heck of it, I created a form, added a Builder property to it, populated it with a dummy program reference, then right-clicked on a property in the Property sheet and chose "Add To Favorites" and my dummy program came up.
>
>In looking at the code of the BUILDER.PRG, it seems to check MEMBERDATA before it calls any specific builder in a BuilderX or Builder Property (see first line):
>
>
>IF NOT ISNULL(tcRunBuilder) AND IIF(TYPE("wbcpOrigin")="C" AND UPPER(wbcpOrigin)=="MEMBERDATA",.F.,.T.)
>
>*-- Check for specified tcRunBuilder.
>	IF TYPE("tcRunBuilder")=="C" AND NOT EMPTY(tcRunBuilder)
>		lcBuilder=tcRunBuilder
>		liBuilderResult = DoBuilder(toObject,tuSource,lcBuilder,.T.)
>		_vfp.LanguageOptions = liOldLanguageOptions 	&& restore memvar checking value (jd 11/26/00)
>		RETURN liBuilderResult
>	ENDIF
>
>*-- Check for specified BuilderX property.
>	IF TYPE("toObject.BuilderX")=="C" AND NOT EMPTY(toObject.BuilderX)
>		lcBuilder=toObject.BuilderX
>		liBuilderResult = DoBuilder(toObject,tuSource,lcBuilder)
>		_vfp.LanguageOptions = liOldLanguageOptions 	&& restore memvar checking value (jd 11/26/00)
>		RETURN liBuilderResult
>	ENDIF
>
>*-- Check for specified Builder property.
>	IF TYPE("toObject.Builder")=="C" AND NOT EMPTY(toObject.Builder)
>		lcBuilder=toObject.Builder
>		liBuilderResult = DoBuilder(toObject,tuSource,lcBuilder)
>		_vfp.LanguageOptions = liOldLanguageOptions 	&& restore memvar checking value (jd 11/26/00)
>		RETURN liBuilderResult
>	ENDIF
>
>ENDIF
>
>
>It seems pretty foolproof... it runs the specific Builder defined by "toObject.Builder" if "MEMBERDATA" is NOT in the 2nd parameter passed to BUILDER.PRG. And yet, we know that "MemberData" IS passed as the 2nd parameter and yet it runs the toObject.Builder program anyway. What should happen is that it sees "MEMBERDATA" and so it should bypass ALL that code and end up further down in the program where it does a CREATEOBJ("builder") which will end up calling the Member Data Editor.
>
>So I'm wondering if the BUILDER.APP that ships with VFP9 is NOT the most current up-to-date compiled version. BUILDER.PRG looks like it handles things correctly, but BUILDER.APP is not exhibiting the expected behavior.
>
>If you rebuild your BUILDER.APP, but take out that extra code you added, does it work correctly? I think the fact that you rebuilt the APP made it work because it brought in a more current BUILDER.PRG.
>
>Just a theory...
>
>--Brad

Brad,

If you look closer into builder.prg, you'll notice, that there is more code before the createobject command. In particular, check the code which is right after the if endif you mentioned. This is the code, which is being executed in my case...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform