ven. 06 janvier 2012, 10h10
Gregory
atoutfox.public.association
Re: BindEvent(...,nFlag)
Si cEvent est un evenement, le bindevent appelle cDelegate dans deux cas
(1) l'evenement se produit, ou
(2) l'appel direct de la fonction (eg =m.this.ProgrammaticChange())
Pour eviter que le deuxieme cas se produit, on met ce fameux bit 1 (= valeur
2)
Maintenant, l'aide dit que pour certains evenements la valeur 2 ne marchera
pas parce que en interne ProgrammaticChange() n'est pas considere comme un
evenement mais comme un appel direct (These events are treated as method
calls internally by Visual FoxPro)
> C'est un peu obscur AMHA
Not really
______
Gregory
______
"Thierry N" wrote in message news:je6d3f$oa5$1@news.niouzes.net...
Merci Gregory
J'ai lu l'aide, bien sûr
Comment interpréter
"do not work if the second bit of the nFlags
parameter is set, for example, nFlags set to 2"
?
Qu'est-ce qui ne marche pas?
La méthode ?
Son délégué ?
Les deux ?
C'est un peu obscur AMHA
thn
Le 06/01/12 09:02, Gregory a écrit :
>> Qu'est-ce qui m'échappe ?
>
> L'aide ...
>
>
> Remarks
>
> .....
>
> Certain control events such as GotFocus, LostFocus, InteractiveChange,
> and ProgrammaticChange do not work if the second bit of the nFlags
> parameter is set, for example, nFlags set to 2. These events are treated
> as method calls internally by Visual FoxPro, even though they are
> considered events. The same behavior applies to the Refresh method of an
> object on a form that is called when the form's Refresh method is
> called. Certain events such as When and Valid require code in the event
> for it to occur.
> ....
>
>
>
>
> ______
> Gregory
> ______
> "Thierry N" wrote in message news:je55a5$2j1j$1@news.niouzes.net...
>
> Bonjour,
>
> BINDEVENT(oEventSource, cEvent, oEventHandler, cDelegate [, nFlags])
>
> D'après ce que je comprends de la doc, la valeur
> nFlag = 2 (bit 1 à 1)
> empêche .cEvent() de s'exécuter.
>
> Or, avec
> BindEvent(m.this, 'ProgrammaticChange', m.this, 'wAdaptNotes', 2)
>
> .ProgrammaticChange() s'exécute quand .Value change dans le code.
> Je ne vois même pas .wAdaptNotes() s'exécuter.
>
> Qu'est-ce qui m'échappe ?
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000007871