Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DynamicBackColor invalid expr if the grid has focus else
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01318705
Message ID:
01319640
Views:
14
>Hi Cetin
>
>>In expression.
>
>This is the latest expression as stored in the DynamicBackColor property, I have checked for the column as an object
>
>
IIF((NOT EMPTY(v_tdocslk.iID)) AND (TYPE('THIS.colcname') = 'O' AND THIS.colcname.ENABLED AND (NOT THIS.colcname.READONLY)), goApp.nBackColorFld, goApp.nBackColorForm)
>
>also as VARTYPE()
>
>
IIF((NOT EMPTY(v_tdocslk.iID)) AND (VARTYPE(THIS.colcname) = 'O' AND THIS.colcname.ENABLED AND (NOT THIS.colcname.READONLY)), goApp.nBackColorFld, goApp.nBackColorForm)
>
>no change to the problem.
>
>Taking your idea further I found the problem, well, the application object goApp was no longer available, I was getting the application as a visual so I presumed the goApp was still existing.
>
>
IIF((NOT EMPTY(v_tdocslk.iID)) AND (TYPE('THIS.colcname') = 'O' AND THIS.colcname.ENABLED AND (NOT THIS.colcname.READONLY)), IIF(TYPE('goApp') = 'O', goApp.nBackColorFld, 0), IIF(TYPE('goApp') = 'O', goApp.nBackColorForm, 0))
>
>Thanks.

Change check for TYPE('goApp')='O' to vartype(goApp) = 'O'. The first check doesn't check if the object is NULL.
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