Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine, if a method has some Code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00793398
Message ID:
00793938
Vues:
25
Alexander,

let me show some specific code:
for i = 1 to this.ColumnCount
   if ( pemstatus( this.Columns[i].Header1, "click", 0 ) )
      * already overridden
   else
      * bind it here
   endif
endfor
you can also:
if ( ! empty( this.Columns[i].Header1.ReadMethod( "click" ) ) )
for headers you can check the Class and see if it's Header, then it's a baseclass and there's no higher up that needs to be tested. If it's not then you have to work your way up the inheritance tree using Class and ParentClass.


>Thank you for your idea, but unfortunately I couldn't follow it. Probably I have to explain the problem somewhat more detailed.
>
>It is actually quite simple: I have a grid-class. The Click-Event of every header is bound (BINDEVENT) to a Sort_On_Column_Of_This_Header Method of the grid itself which provides the sorting on the corresponding column. I just loop through all the column-objects and bind all Click-events of their headers in the init-code of the grid class.
>
>This is the class functionality of my grid class and I don't have to think about it anymore but for the cases when I'd like to have some other behavior in the header's Click - event. So my idea was just to write Code into the Click-event of the corresponding headers and only bind the click-events of the headers whoes click-events are "empty". So if nothing else specified, the Sort_On_Column_Of_This_Header event of the grid will do its work, otherwise - the Click-Event of the header.
>
>Now the problem is to find out, the click-events of which headers must be bound, and which - not.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform