Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
(Object) = (Object): Operator/operand type mismatch
Message
De
31/10/1998 11:28:06
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00152639
Message ID:
00153173
Vues:
27
>Cetin,
>
>Objects created by SCATTER don't.
>
>>Totally agree on having a check for name existence. Just my curiosity, except application, which object(s) doesn't have name property ?
Yes (Unless table doesn't have a name property - from Christof). Thanks to both of you for the info :)
As a conclusion compobj() could be made generic and bulletproof (except all props are protected or RO) like this :)
function mycompobj
LPARAMETERS o1,o2
LOCAL llSame,lnProps,ix,lcTemp
LOCAL array aProps[1]
llSame = compobj(o1,o2)
IF llSame
  lnProps=aMembers(aProps,o1)
  FOR ix=1 to lnProps
    IF !pemstatus(o1, aProps[ix], 2) ;
        and !sys(1269,o1,aProps[ix],1) ;
        and !type("o1."+aProps[ix])="G"  && !protected,rw, !General
      lcTemp = getpem(o1,aProps[ix])  && Temporarily change prop
      STORE "" to ("o1."+aProps[ix])
      STORE lcTemp to ("o1."+aProps[ix]) && and restore
      llSame = sys(1269,o2,aProps[ix],0) && Is o2 changed too ?
      EXIT
    ENDIF
  ENDFOR
ENDIF
*
* If all props are protected or RO then would be informed as same
*
RETURN llSame
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform