>Wow - I managed to put all of that in the title :).
>
>This started recently, and I really don't know what started it (or was it that I didn't notice much before?). When I edit some classes or form which have object where caption is a function call like this
>
>
Caption = (SomeFunction("SomeParameter"))
>
>which is how it looks in the class browser's output. In the PEM window, it's
>
>
=SomeFunction("SomeParameter")
>
>The function is actually called, and since the DBC it uses and its tables as well are not accessible, it errors out. If I cancel it, I'm able to edit the form (although the caption of the form is blank now). If I have the dbc open, it populates the caption and leaves a global object and few variables visible in the debugger - meaning it runs whatever I do, I can only choose between allowing it or canceling it.
>
>Is there a way to disable this edit-time evaluation of captions?
Well, few ideas.
1. Remove it from properties and put in the code.
2. If you don't like the idea number 1, then your function may have
if _VFP.StartMode = 0
return 'My Temp caption'
endif
3. Have it as = iif(_VFP.StartMode = 0, 'No caption', MyFunc())
If it's not broken, fix it until it is.
My Blog