Hmmmmm....
I never would have thought it.
>Hi John,
>
>oTest = CREATEOBJECT([Test])
>
>WAIT WINDOW IIF([abc] = [abc], oTest.TestMe(), [No go])
>
>DEFINE CLASS Test AS CUSTOM
> FUNCTION TestMe()
> RETURN [Got it]
> ENDFUNC
>ENDDEFINE
>
>
>>Hi Spencer,
>>
>>AFAIK, calling a method from the middle of an IIF() won't work to begin with. IIF() is designed to return expressions, not execute methods.
>>
>>
>>>Anyone have a considered response to the following?
>>>
>>>Given that in FoxPro an immediate IF, IIF(), is more efficient than an equivalent IF...ELSE, I had a question.
>>>
>>>Would this strategy, in fact, actually be more efficient in conditionally calling a form method. For example, would
>>>
>>> =iif( SomeCondition, SomeObject.Refresh(), .F. )
>>>
>>>have some efficiency advantage (however trivial) over
>>>
>>> if ( SomeCondition )
>>> SomeObject.Refresh
>>> endif
>>>
>>>I fully appreciate that likely of greater concern are issues of code readability, maintainability, etc. than negligible speed improvements.
>>>My question is really just for a point of knowledge. Thanks.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05