Create event on Browse.Refresh

Source code related resources

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 2878
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 136 times
Been thanked: 69 times
Contact:

Create event on Browse.Refresh

Post by mol » Fri Oct 31, 2014 1:21 pm

Is it the way to create event on Browse.REFRESH?
I want to test where my application loose time and unnecessary refresh data (it looks like blinking).
I've read whole code and can't find solution.
regards, Marek

User avatar
mol
Posts: 2878
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 136 times
Been thanked: 69 times
Contact:

Post by mol » Fri Oct 31, 2014 1:47 pm

I've found simple solution.
I've modified source file h_browse.prg, function _BrowseRefresh and I've added lines:

Code: Select all

  if valtype("Browse_Refresh_Event") == "C"
		&Browse_Refresh_Event
 endif
In my app I've declared variable Browse_Refresh_Event as char with assigned tracking function:

Code: Select all

private Browse_Refresh_Event := "BROWSE_WhereAmI()"
and BROWSE_WhereAmI() function:

Code: Select all

function BROWSE_WhereAmI
   local cTrack := ""
   local i := 2
	while ( !Empty(ProcName(i)) )
		cTrack+= ProcName(i) + "(" + NTRIM(ProcLine(i)) + ")"+EOL
		i++
	end
	msgdebug(cTrack)
return

Maybe it will be useful for sb.

Regards, Marek

Javier Tovar
Posts: 1274
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar » Fri Oct 31, 2014 5:21 pm

Hola Mol,

Si podrías subir el archivo completo de h_browse.prg, y un ejemplo para su aplicación?

Saludos

Post Reply