Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post Reply
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by Compuin »

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
Last edited by Compuin on Sun May 01, 2016 7:01 pm, edited 1 time in total.
FWH 25.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
User avatar
Antonio Linares
Site Admin
Posts: 42655
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 67 times
Been thanked: 96 times
Contact:

Re: Error de sintaxis con Button y Say

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
User avatar
karinha
Posts: 7963
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 5 times
Contact:

Re: Error de sintaxis con Button y Say

Post by karinha »

Sintax de Sbutton By Manuel Mercado:

Code: Select all | Expand


   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
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Re: Error de sintaxis con Button y Say

Post by Compuin »

Algun ejemplo funcional de la clase TSBUTTON ???
FWH 25.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
User avatar
armando.lagunas
Posts: 346
Joined: Mon Oct 05, 2009 3:35 pm
Location: Curico-Chile
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by armando.lagunas »

muestra el trozo de código en donde te genera el error...

la sintaxis es clara como por ejemplo :

Code: Select all | Expand

       @ 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
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by Compuin »

Como compilo la lib? LO he intentado y no he podido
FWH 25.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
User avatar
karinha
Posts: 7963
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 5 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by karinha »

Añade los .PRGs a tu proyecto. Solo esto.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by Compuin »

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.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
User avatar
karinha
Posts: 7963
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 5 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by karinha »

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by Compuin »

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.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
User avatar
cnavarro
Posts: 6572
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Has thanked: 4 times
Been thanked: 6 times

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by cnavarro »

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
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by Compuin »

Ya lo descargue pero no funcionan los samples.

Alguien me djo que incluyera los prg pero no se como
FWH 25.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
User avatar
joseluisysturiz
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by joseluisysturiz »

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... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by Compuin »

Gracias Jose Luis

Probare y comentare
FWH 25.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
User avatar
Compuin
Posts: 1258
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 21 times
Been thanked: 4 times
Contact:

Re: Forma correcta de configurar clase TSBUTTON...alguna ayuda?

Post by Compuin »

Igual no funciono
FWH 25.01 | Hbmk2 32/64 Bits (Build 19.29.30133) | Microsoft Visual C 32 Bits | MySql 8.0.24 32/64 Bits | VS Code
Post Reply