Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
(Object) = (Object): Operator/operand type mismatch
Message
 
To
30/10/1998 05:05:22
Marco Beuk
Innovero Software Solutions
The Hague, Netherlands
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00152639
Message ID:
00152655
Views:
17
Hi Marco,

>How should i check if to object refrence refer to the same object (its names are not unique).
   Function XCompObj
   LParameter toRef1, toRef2
   
      *-- Are their properties identical?
      *     CompObj(): Jeffery Donnici (75460,437)
      *     CompObj is several times faster than 
      *     all the rest of the code in the IF.
      Local llReturn
      llReturn = CompObj( toRef1, toRef2 )
      
      If llReturn
      
         *-- Find a unique ID
         Local lcID
         lcID = Sys(2015)
         Do While toRef1.Comment == lcID
            lcID = Sys(2015)
         Enddo
         
         *-- compare objects
         Local lcOldVal
         lcOldVal = toRef1.Comment
         toRef1.Comment = lcID
         llReturn = CompObj( toRef1, toRef2 )
         toRef1.Comment = lcOldVal
         
      Endif
      
      *-- return .t. if objects are identical
      Return llReturn
      
   Endfunc
Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform