Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Columnorder equals zero?
Message
De
11/05/2006 08:12:48
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
11/05/2006 01:47:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01120588
Message ID:
01120946
Vues:
22
>Mike,
>
>I certainly would have to agree that using .columns (instead of .objects) would be more sensible and readable. Not only is that what I would write now, but it is even what I first wrote, much earlier in this thread, when I re-typed a couple of lines of code instead of cutting and pasting. (I won't do that again.)
>
>I'm not as sure about your comments about .objects. VFP documentation lists quite a few objects that have .objects: Applies To: Application Object | _VFP System Variable | _SCREEN System Variable | Column Object | CommandGroup Control | Container Object | Control Object | Custom Object | DataEnvironment Object | Form Object | FormSet Object | Grid Control | OptionGroup Control | Page Object | PageFrame Control | ToolBar Object

True enough, however, except for the grid, all of these others are containers that may have various types of objects. The grid, IIRC, can only contain columns, so I wonder why it has .objects at all.

>
>My reference to code having worked for a long time was merely to differentiate it from brand new code, which I'm always willing to question and discard immediately. If I were to change my code, the answers to the two questions immediately before my comment (underlined below) are of considerable importance -- if it's been working for a long time, and somebody suggests an alternative, I want to understand why that alternative will handle everything that the existing code handles as well as the now-failing case. The longer that the existing code has been working satisfactorily, the more conservative I become about making changes to it.

That's reasonable. The people I've seen say that usually take it too far. IMO, nothing is sacred in computing. Including the documentation.

>
>Jim
>
>P.S. I assume your reference to 100K lines of code has to do with comments you've read elsewhere; I've made no such comments.

Correct! :)

>
>>Hi James
>>
>>>But, why do you say there's a difference between .objects and .columns? Are there some circumstances where the two are not identical for a grid? (Remember, I have been using .objects successfully for a long time.)
>>
>>No offense intended, but the statement "been doing it for a long time" and spouting statistics like 100K lines of code does not mean things are done right. If a smoker says, I've smoked 500K cigarettes in my life, does that mean they're doing the right thing? ;)
>>
>>To me it just seems right and sensible to refer to .columns if you're iterating columns. .objects applies to containers and forms. Maybe it's existence on grids is a side-effect or stub feature.
>>
>>.columns only applies to grids.
>>
>>HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform