Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCATTER and properties?
Message
De
07/04/2003 10:02:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/04/2003 09:44:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00774677
Message ID:
00774687
Vues:
13
>I'm having trouble understanding a paragraph in the Help for SCATTER, under the "Remarks" section. It states:
>---------- start excerpt -------------
>If properties corresponding to field names do not exist for the object, SCATTER...NAME ADDITIVE automatically creates them. However, SCATTER might not create all the necessary properties because some might be marked as Hidden or Protected. If Visual FoxPro cannot create or set a property, it generates an error. For example, you can have a field name that matches a native Visual FoxPro object property name as long as the field and property data types are the same. However, Visual FoxPro generates an error if the field name matches a method, event, or object name.
>----------- end excerpt --------------
>I have bolded the words that I find confusing - I have no idea why hidden or protected has anything to do with SCATTER...NAME. What am I missing??
>
>Immediately below is the statement:
>---------- start excerpt -------------
>You can avoid problems by using an object created by SCATTER...NAME and not one derived from a Visual FoxPro class. Unlike when SCATTER is used with only NAME, Visual FoxPro does not overwrite the existing object to create a new object.
>----------- end excerpt --------------
>Again, I have no concept of what the bolded words are telling me.
>
>Immediately below is the statement:
>---------- start excerpt -------------
>SCATTER...NAME ADDITIVE does not generate an error when a read-only property cannot be set for a field in the table. However, the value of the property remains unchanged.
>----------- end excerpt --------------
>Again, I'm missing some connection between (read-only) properties and (table) fields.
>
>Can someone please clarify this stuff? THANKS

Jim,
This is new in VFP8. If you have an object and scatter to it with additive you're dealing with it. An example exists for saving/restoring form properties.

USE (ThisForm.cRunPath+"FormProps")
SCATTER NAME ThisForm ADDITIVE
USE IN FormProps

If your record say has Class field it'd error since it's protected.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform