Wbrowse de Hernan con FWH 2.7 Febrero.

Post Reply
User avatar
mag071
Posts: 139
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela
Contact:

Wbrowse de Hernan con FWH 2.7 Febrero.

Post by mag071 »

Estoy usando wbrwline.c de Hernán corregido para la versión 2.7 de Febrero compila y me genera la .lib sin problemas pero ahora me consigo con unos comportamiento extraño de la clase que antes no los hacia :

1.- con las versiones anteriores del wbrowse podia desplazarme con los scroll del mouse sin problemas , ahora no.

2.- yo uso dicha clase para mostrar archivos de textos de la siguiente manera :
oLbx:SetTXT( cArchivo )
pero al correrlo me genera el siguiente error:
Called from: => READLINE(0)
Called from: => (b)SETTXT(3734)
Called from: => TWBROWSE:DEFAULT(1634)
Called from: => __EVAL(0)
Called from: => TWBROWSE:INITIATE(0)

gracias de antemano.
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Pero es un GPF ó un error controlado por el errorsys ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
mag071
Posts: 139
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela
Contact:

Wbrowse de Hernan con FWH 2.7 Febrero.

Post by mag071 »

Antonio ,

Error description: Error BASE/1004 Class: NIL has no exported method: READLINE
Args:

Stack Calls
===========
Called from: => READLINE(0)
Called from: => (b)SETTXT(3734)
Called from: => TWBROWSE:DEFAULT(1634)
Called from: => __EVAL(0)
Called from: => TWBROWSE:INITIATE(0)
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Puedes mostrar el código que hay aqui ?

Called from: => (b)SETTXT(3734)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
mag071
Posts: 139
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela
Contact:

Wbrowse de Hernan con FWH 2.7 Febrero.

Post by mag071 »

Antonio Aqui esta el Methodo


METHOD SetTXT( uTXT ) CLASS TWBrowse
LOCAL cType, oTXT

DEFAULT uTXT:= ""
cType:= Valtype( uTXT )

If cType == "C"
If !File( uTXT )
uTXT:= cGetFile( "*.txt", "Text Files" )
If !File( uTXT )
return .F.
EndIf
EndIf
::oTXT:= oTXT:= TTxtFile():New( uTXT, 0 )
ElseIf cType == "O"
oTXT:= uTXT
Else
return .F.
EndIf

::lDrawHeaders := .F.
::aHeaders := { "" }
::aJustify := { .F. }
::aColSizes := { 2000 }
::nLineStyle := 0
::cAlias := "_TXT_"
::bLine := { |cLine| cLine:= oTXT:ReadLine(),;
If( IsOem( cLine ), cLine:= OemToAnsi( cLine ),),;
{ SubStr( cLine, ::nTXTFrom ) } }


::bLogicLen := { || ::nLen := oTXT:RecCount() }
::bLogicPos := nil
::bGoLogicPos := nil
::bGoTop := { || oTXT:GoTop() }
::bGoBottom := { || oTXT:GoBottom() }
::bSkip := { | nSkip, nOld | nOld:= oTXT:RecNo(), ;
oTXT:Skip( nSkip ), ;
oTXT:RecNo() - nOld }
return nil[/b]
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Prueba a cambiar esta línea:

::oTXT:= oTXT:= TTxtFile():New( uTXT, 0 )

por esto:

oTXT:= TTxtFile():New( uTXT, 0 )
::oTXT:= oTXT
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
mag071
Posts: 139
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela
Contact:

Wbrowse de Hernan con FWH 2.7 Febrero.

Post by mag071 »

Antonio ,

Hice el cambio que me indicastes y me genera exactamente el mismo error.

Mario Gonzalez.
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Puedes probar el ejemplo samples\TestFile.prg y comprobar si funciona bien ? gracias.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply