Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I shortcut this code?
Message
De
13/01/2000 02:36:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
12/01/2000 23:20:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00316384
Message ID:
00317426
Vues:
9
>>
Ohh but I love tricks :) Kidding you're right my friend. Still here goes my 0.2 cents of "clever few liner" < bg >
>>
>>
function isAllEmpty
>>scatter name oEmpty memo blank
>>scatter name oCurrent memo
>>return compobj(oEmpty, oCurrent)
I know it doesn't think of general fields.
>>Cetin
>
>I knew there was a way to compare objects, but I was trying just IF oEmpty=oCurrent, but that only tells you that the two variables are pointing to the same object or not.


Yeah Fred,
Using "=" for objects is yet another capability I love with VFP6 :) Before I was using Ken Levy's trick to change name property temporarily. I include it here for the benefit of previous versions users :
function _IsSameObject
lparameters toObject1, toObject2
local lcSaveName, llRetVal
llRetVal = compobj(toObject1, toObject2)
if llRetVal   && Are they pointing to the same obj or just PEM match ?
   lcSaveName = toObject1.name
   toObject1.name = "_xx_"
   llRetval = compobj(toObject1, toObject2)
   toObject1.name = lcSaveName
endif
return llRetVal
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