FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Thu Apr 28, 2016 10:55 AM

Hola

No comprendo este error por mas que verifico la sintaxis

C:\PME>c:\bcc7\bin\make -ftest.rmk
MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
C:\xharbour\bin\harbour .\prg\pme.PRG /L /N /W /Oobj\ /IC:\fwh\inclu
de;C:\xharbour\include
xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603)
Copyright 1999-2015, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\prg\pme.PRG'...
.\prg\pme.PRG(80) Error E0030 Syntax error: "syntax error at 'XBUTTON'"
.\prg\pme.PRG(90) Error E0030 Syntax error: "syntax error at 'XBUTTON'"
.\prg\pme.PRG(50) Error E0030 Syntax error: "syntax error at '@'"
.\prg\pme.PRG(60) Error E0030 Syntax error: "syntax error at '@'"
4 errors

No code generated

** error 1 ** deleting .\obj\pme.OBJ

DEFINE BUTTONBAR oBar 3D SIZE 40,40 OF oEdit:oDlg

DEFINE lBUTTON oBtn OF oBar;
ACTION (oEditOm:aMemo[8]:=oEdit:oWnd:oClient:GetText(),;
oEdit:lCancel:=.t.,oEdit:nOption:=0,oEdit:Close(),;
EVAL(bRun,oEditOm) ,;
DpFocus(oFocus));
FILE oDp:BitMaps+"XSALVA.BMP";
MESSAGE "F2: Aceptar";
TOOLTIP "F2: Regresar";
SIZE 40,40;
COLORS CLR_WHITE, { nRGB(243,250,200), CLR_BLACK, 5 }

oEdit:oBtn:=oBtn

@20,20 LBUTTON oSave;
SIZE 50, 19 FONT oFont;
COLORS CLR_BLACK, { CLR_WHITE, 16765864, 1 };
FILE "BITMAPS\EXIT.BMP","BITMAPS\EXIT.BMP";
PROMPT "Salir" NOBORDER; // WHEN oNomina:oLee:Recno()>1;
ACTION (lAceptar:=.F.,oForm:Close())

Al parecer falta algo ?

Uso la clase TSButton

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error de sintaxis con Button y Say
Posted: Fri Apr 29, 2016 10:11 AM

En el error indica XBUTTON pero en el código que has publicado no hay ningun XBUTTON

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error de sintaxis con Button y Say
Posted: Fri Apr 29, 2016 01:20 PM
Sintax de Sbutton By Manuel Mercado:

Code (fw): Select all Collapse
   DEFINE SBUTTON OF oBAR RESOURCE "B_MAS" NOBORDER;
      PROMPT "Adicionar" + CRLF + "Participantes" TEXT POSITION 3 FONT oFntBar ;
      TOOLTIP "Adicionar Participantes" ACTION PTOS_USUARIOS(.T.)


Saludos
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Error de sintaxis con Button y Say
Posted: Sat Apr 30, 2016 04:02 PM

Algun ejemplo funcional de la clase TSBUTTON ???

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 346
Joined: Mon Oct 05, 2009 03:35 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Mon May 02, 2016 12:11 PM
muestra el trozo de código en donde te genera el error...

la sintaxis es clara como por ejemplo :
Code (fw): Select all Collapse
        @ 05, 02 SBUTTON FILENAME ".\SYSTEM\FAST.BMP" ACTION Llamar_Datos() SIZE  33,25 PIXEL OF oDlg NOBOX RECT COLOR CLR_BLACK, { CLR_WHITE, CLR_HGRAY } TOOLTIP {"Llama nuevamente","Recargar"}


según el error es un XBUTTON y debe ser SBUTTON
SkyPe: armando.lagunas@hotmail.com

Mail: armando.lagunas@gmail.com
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Mon May 02, 2016 12:16 PM

Como compilo la lib? LO he intentado y no he podido

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Mon May 02, 2016 12:44 PM

Añade los .PRGs a tu proyecto. Solo esto.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Mon May 02, 2016 12:49 PM

Compiling...
Harbour 3.2.0dev (r1506171039)
Copyright (c) 1999-2015, http://harbour-project.org/
Compiling 'tsbutton.prg' and generating preprocessed output to 'tsbutton.ppo'...

Lines 3892, Functions/Procedures 2
Generating C source output to 'tsbutton.c'... Done.
...\include\hbsetup.ch(66) Warning W0002 Redefinition or duplicate definition
of #define HB_COMPAT_C53
tsbutton.prg(29) Warning W0005 RETURN statement with no return value in functio
n
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies,
Inc.
tsbutton.c:
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, In
c.
Error: Unresolved external '_HB_FUN_TSBUTTON' referenced from C:\FWH\SAMPLES\TSB
UTTON.OBJ
Error: Unable to perform link
* Linking errors *

Aca el .PRG

include "FiveWin.ch"

INCLUDE "TSButton.ch"

//----------------------------------------------------------------------------//

function Main()

local oDlg, lExit := .f., oBtn

DEFINE DIALOG oDlg FROM 5, 5 TO 15, 40 TITLE "A Dialog Box"

@ 3, 4 BUTTON "&Ok" OF oDlg SIZE 40, 12

@ 3, 12 BUTTON oBtn PROMPT "&Cancel" OF oDlg SIZE 40, 12 ;
ACTION ( MsgInfo( "Cancel" ), lExit := .t., oDlg:End() )

@ 05, 02 SBUTTON FILENAME ".\SYSTEM\FAST.BMP" ;
ACTION Llamar_Datos() SIZE 33,25 PIXEL OF oDlg NOBOX RECT ;
COLOR CLR_BLACK, { CLR_WHITE, CLR_HGRAY } TOOLTIP {"Llama nuevamente","Recargar"}

ACTIVATE DIALOG oDlg VALID lExit

return nil

//----------------------------------------------------------------------------//
FUNCTION Llamar_Datos()
RETURN

La lib y el .ch estan en las carpetas correspondientes

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Mon May 02, 2016 02:08 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Mon May 02, 2016 02:16 PM

C:\PME>c:\bcc7\bin\make -ftest.rmk
MAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
c:\xharbour\bin\harbour .\prg\TSBUTTON.PRG /L /N /W /Oobj\ /Ic:\fwh\incl
ude;c:\xharbour\include
xHarbour 1.2.3 Intl. (SimpLex) (Build 20151110)
Copyright 1999-2015, http://www.xharbour.org http://www.harbour-project.org/
Compiling '.\prg\TSBUTTON.PRG'...
.\prg\TSBUTTON.PRG(166) Error E0019 #error: 'Class "TSButton" not declared for
method: New( nTop, nLeft, cPrompt, oWnd, aResource, aFile, aSize, lPixel, bActio
n, bWhen, bValid, lDefault, oFont, cMsg, cToolTip, nHelpId, cBorder, lCancel, l
Adjust, aColors, nCaptPos, lOpaque, oPBrush, cShape
.\prg\TSBUTTON.PRG(365) Error E0019 #error: 'Class "TSButton" not declared for
method: NewBar( oBar, aSize, cPrompt, aResource, aFile, bAction, bWhen, oFont, c
Msg, cToolTip, nHelpId, cBorder, lCancel, lAdjust, aColors, nCaptPos, lOpaque,
cShape, oPBrush, bMenu, lGroup, nPos, bDrop, lUpdat
.\prg\TSBUTTON.PRG(539) Error E0019 #error: 'Class "TSButton" not declared for
method: ReDefine( nId, aResource, aFile, cMsg, bAction, nHelpId, cBorder, oWnd,
bWhen, bValid, cToolTip, cPrompt, oFont, lCancel, nCaptPos, aColors, lOpaque, o
PBrush, cShape, bMenu, lAdjust, lUpdate, c3DMode )'
.\prg\TSBUTTON.PRG(683) Error E0019 #error: 'Class "TSButton" not declared for
method: AddHotSpot( aRect, bAction, cToolTip )'
.\prg\TSBUTTON.PRG(704) Error E0019 #error: 'Class "TSbutton" not declared for
method: CalcClips()'
.\prg\TSBUTTON.PRG(785) Error E0019 #error: 'Class "TSButton" not declared for
method: CheckAnima()'
.\prg\TSBUTTON.PRG(814) Error E0019 #error: 'Class "TSButton" not declared for
method: CheckHotSpot( nRowPix, nColPix )'
.\prg\TSBUTTON.PRG(842) Error E0019 #error: 'Class "TSButton" not declared for
method: Click()'
.\prg\TSBUTTON.PRG(865) Error E0019 #error: 'Class "TSButton" not declared for
method: Default()'
.\prg\TSBUTTON.PRG(949) Error E0019 #error: 'Class "TSButton" not declared for
method: Destroy()'
.\prg\TSBUTTON.PRG(974) Error E0019 #error: 'Class "TSButton" not declared for
method: Disable( nWakeup )'
.\prg\TSBUTTON.PRG(991) Error E0019 #error: 'Class "TSButton" not declared for
method: Display()'
.\prg\TSBUTTON.PRG(1003) Error E0019 #error: 'Class "TSButton" not declared for
method: FreeBitMaps( nBitMap )'
.\prg\TSBUTTON.PRG(1135) Error E0019 #error: 'Class "TSButton" not declared for
method: GetDlgCode( nLastKey )'
.\prg\TSBUTTON.PRG(1159) Error E0019 #error: 'Class "TSButton" not declared for
method: GetNextClip()'
.\prg\TSBUTTON.PRG(1189) Error E0019 #error: 'Class "TSButton" not declared for
method: GetWH( lWidth, lShape )'
.\prg\TSBUTTON.PRG(1253) Error E0019 #error: 'Class "TSButton" not declared for
method: GotFocus( hCtlLost )'
.\prg\TSBUTTON.PRG(1290) Error E0019 #error: 'Class "TSButton" not declared for
method: HandleEvent( nMsg, nWParam, nLParam )'
.\prg\TSBUTTON.PRG(1302) Error E0019 #error: 'Class "TSButton" not declared for
method: HasAlpha( hBitMap )'
.\prg\TSBUTTON.PRG(1318) Error E0019 #error: 'Class "TSButton" not declared for
method: KeyDown( nKey, nFlags )'
.\prg\TSBUTTON.PRG(1378) Error E0019 #error: 'Class "TSButton" not declared for
method: LButtonDown( nRow, nCol, nKeyFlags, lDouble )'
.\prg\TSBUTTON.PRG(1456) Error E0019 #error: 'Class "TSButton" not declared for
method: LButtonUp( nRow, nCol, nKeyFlags )'
.\prg\TSBUTTON.PRG(1496) Error E0019 #error: 'Class "TSButton" not declared for
method: LDblClick( nRow, nCol, nKeyFlags )'
.\prg\TSBUTTON.PRG(1512) Error E0019 #error: 'Class "TSButton" not declared for
method: LoadBitmaps( aResource, aFile )'
.\prg\TSBUTTON.PRG(1870) Error E0019 #error: 'Class "TSButton" not declared for
method: LostFocus()'
.\prg\TSBUTTON.PRG(1883) Error E0019 #error: 'Class "TSButton" not declared for
method: MouseMove( nRow, nCol, nKeyFlags )'
.\prg\TSBUTTON.PRG(1971) Error E0019 #error: 'Class "TSButton" not declared for
method: NewGroup( aBtn, nTop, nLeft, aPrompt, oWnd, aResource, aFile, aSize, lP
ixel, aAction, bWhen, bValid, nSpace, oFont, cMsg, cToolTip, nHelpId, cBorder,
lCancel, lAdjust, aColors, nCaptPos, lOpaque, oPBrush
.\prg\TSBUTTON.PRG(2020) Error E0019 #error: 'Class "TSButton" not declared for
method: nAlphaLevel( uLevel )'
.\prg\TSBUTTON.PRG(2039) Error E0019 #error: 'Class "TSButton" not declared for
method: nRows()'
.\prg\TSBUTTON.PRG(2062) Error E0019 #error: 'Class "TSButton" not declared for
method: Paint()'
.\prg\TSBUTTON.PRG(2259) Error E0019 #error: 'Class "TSButton" not declared for
method: RButtonDown( nRow, nCol, nKeyFlags )'
.\prg\TSBUTTON.PRG(2283) Error E0019 #error: 'Class "TSButton" not declared for
method: RButtonUp( nRow, nCol, nKeyFlags )'
.\prg\TSBUTTON.PRG(2299) Error E0019 #error: 'Class "TSButton" not declared for
method: SetAnimated( lActivate, oWnd, nClips )'
.\prg\TSBUTTON.PRG(2335) Error E0019 #error: 'Class "TSButton" not declared for
method: SetColor( nClrText, nClrPane )'
.\prg\TSBUTTON.PRG(2357) Error E0019 #error: 'Class "TSButton" not declared for
method: SetText( cCaption, nRow, nCol, l3DMode, nClrLight, nClrShadow )'
35 errors

No code generated

** error 1 ** deleting .\obj\TSBUTTON.OBJ

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Tue May 03, 2016 06:15 PM
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Tue May 03, 2016 06:26 PM

Ya lo descargue pero no funcionan los samples.

Alguien me djo que incluyera los prg pero no se como

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Wed May 04, 2016 02:02 AM
Compuin wrote:Ya lo descargue pero no funcionan los samples.

Alguien me djo que incluyera los prg pero no se como


Simplementre copia los .prg donde estan los tuyos como si fuesen uno mas y listo...asi de sencillo...saludos... :-)
Dios no está muerto...



Gracias a mi Dios ante todo!
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Wed May 04, 2016 02:13 AM

Gracias Jose Luis

Probare y comentare

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?
Posted: Wed May 04, 2016 02:27 AM

Igual no funciono

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Continue the discussion