by fergonm » Mon Apr 21, 2008 3:07 pm
Estimado Manuel
He intentado usar el código como me indica y he logrado compilar y enlazar tas varios intentos y tras descubrir la ayuda de los dos métodos.
Al correr el programa, es decir en tiempo de ejecución, me da error e indica lo siguiente:
Application
===========
Path and name: c:\Personal\FWH\ts\TSBROWSE\SAMPLES\sbtest.exe (32 bits)
Size: 1,815,552 bytes
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 04/21/08, 16:51:49
Error description: Error BASE/1004 No exported method: EXPSEEK
Args:
[ 1] = A { ... }
[ 2] = C ali
Stack Calls
===========
Called from: => EXPSEEK(0)
Called from: .\sbtest.prg => (b)FWINDOW(1397)
Called from: => TSBUTTON:CLICK(790)
Called from: => TCONTROL:HANDLEEVENT(0)
Called from: => TSBUTTON:HANDLEEVENT(1288)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TMDIFRAME:ACTIVATE(0)
Called from: .\sbtest.prg => MAIN(163)
He modificado el programa SBTest.PRG, añadiendo la siguietes lineas.
Static Function fWindow( nSample )
Local oDlg, oBar, oFld, oBmp, oBrw[ 7 ], oCol, aRect, nEle, nBrwHeight, nMarried, nSingle, nTotSal, nAgeTot, ;
nOldAge, nOldSal, aStates, bBlock, cFer, cSearch:=SPACE(40)
Field First, Last, Married, Age, Salary, State
IF aWChild[ nSample ] == Nil
nMarried := 0
nSingle := 0
nTotSal := 0
nAgeTot := 0
nOldAge := 0
nOldSal := 0
aStates := {}
DEFINE BITMAP oBmp RESOURCE "Head"
If nSample == 7
DEFINE WINDOW aWChild[ nSample ] OF oWnd BORDER NONE NOMINIMIZE NOMAXIMIZE ;
TITLE "Sample " + LTrim( Str( nSample ) ) BRUSH aBrush[ 8 ] ;
FROM 0,0 TO oWnd:nBottom, oWnd:nRight PIXEL ;
ICON oIco ;
MDICHILD
Else
DEFINE WINDOW aWChild[ nSample ] OF oWnd BORDER NONE NOMINIMIZE NOMAXIMIZE ;
TITLE "Sample " + LTrim( Str( nSample ) ) ;
FROM 0,0 TO oWnd:nBottom, oWnd:nRight PIXEL ;
ICON oIco ;
MDICHILD
EndIf
DEFINE BUTTONBAR oBar OF aWChild[ nSample ] SIZE 36, 36
//2007
DEFINE BUTTON OF oBar NOBORDER
DEFINE BUTTON OF oBar RESOURCE "Print16" NOBORDER;
ACTION oBrw[ nSample ]:Report() ;
TOOLTIP "Print"
DEFINE BUTTON OF oBar RESOURCE "Exitb16" NOBORDER;
ACTION ( aWChild[ nSample ]:End(), aWChild[ nSample ] := Nil ) ;
TOOLTIP "Exit"
DEFINE SBUTTON OF oBar GROUP RESOURCE "Point" NOBORDER;
ACTION (MsgGet("Nombres","Buscar", @cSearch),;
If(!oBrw:ExpSeek(AllTrim(cSearch)),;
MsgStop("No hay ningún registro con los datos de busqueda",cSearch),nil));
TOOLTIP "Busqueda";
MESSAGE "Buscar nombres"
DEFINE SBUTTON OF oBar GROUP RESOURCE "Search" NOBORDER;
ACTION (MsgGet("Nombres","Buscar", @cSearch),;
cExp:=upper(AllTrim(cSearch))+"$Trim(EMPLOYEE->FIRST)+Trim(EMPLOYEE->LAST)"+;
"Trim(EMPLOYEE->STREET)",;
If(!oBrw:ExpLocate(cSearch),;
MsgStop("No hay ningún registro con los datos de busqueda",cSearch),nil));
TOOLTIP "Busqueda";
MESSAGE "Buscar nombres"
agradezco su ayuda de antemano.
Un saludo. Fernando González
Saludos. Fernando