Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scanning an array for an object
Message
From
15/09/1999 10:01:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00264901
Message ID:
00264907
Views:
15
>Hi,
>
>I have a 2 dimensional array that holds information about current forms. One of the columns holds an object reference to the form.
>
>I am trying to do an ascan to search for an object reference and get an "Operator/Operand type mismatch" error.
>
>The code is like this - I call a procedure oPos.releaseform(thisform)
>
>and in oPos.releaseform i have:
>
>lparameters toform
>
>ascan(this.yaforms,toform)
>
>Thanks for any help,
>Paul


lparameters toForm
lcTempName = toForm.Name
toForm.Name = "xxxx"
for ix = 1 to alen(this.yaforms,1)
  if compobj(toForm, yaforms[ix,1])
    toForm.NAme = lcTempName  && Restore name
    return ix 
  endif
endfor
toForm.NAme = lcTempName  && Restore name
return 0 && Nomatch
In VFP6 you can directly use "=" operator instead of compobj.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform