Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putting code into method at runtime
Message
 
À
10/12/2008 12:28:25
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01366206
Message ID:
01366481
Vues:
13
>Any ideas?

It should work, here you have a silly sample
loForm			= Createobject('myForm')
loForm.Show(1)

define class myForm as Form

	add object myGrid as Grid
	add object myCustom as myCustom
	
	function Load()
		local i
		
		create cursor c_something (pk I autoinc, somedata C(10))
		for i = 1 to 100
			insert into c_something (somedata) values (Sys(2015))
		next i
		return .t.
	endfunc
	
	function Init()
		this.myGrid.RecordSource = 'c_something'
		Bindevent(this.myGrid, 'MouseEnter', this.myCustom, 'MouseEnter')
		return .t.
	endfunc
enddefine

define class myCustom as Custom
	procedure MouseEnter(nButton, nShift, nXCoord, nYCoord)
	
		wait window 'MouseEnter fired on Custom' timeout 2
	
	endproc

enddefine
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform