FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error con TSButton
Posts: 199
Joined: Thu Oct 06, 2005 09:07 PM
Error con TSButton
Posted: Tue Mar 17, 2009 08:43 AM
Hola,

Tengo un error al cambiar el texto a un super button, anexo codigo y error.


Saludos,
Mauricio

mi trozo de codigo
Code (fw): Select all Collapse
   REDEFINE SBUTTON oBotones[1] ID 501 OF oDlg FILE BotonFamilia() ADJUST;
            PROMPT 'X' ;
            ACTION msginfo('Menu 1')  LOOK W97 CANCEL COLOR 'W/W'

   oBotones[1]:setText('prueba')


trozo de codigo de TSButton.prg, linea donde marca el error
Code (fw): Select all Collapse
      nWidth  := ::GetWH( .T., ! Empty( ::hBitMap5 ) )
      nHeight := ::GetWH( .F., ! Empty( ::hBitMap5 ) )

      If nWidth > ::nWidth() .or. nHeight > ::nHeight()
         nWidth  := Max( nWidth, ::nWidth() )
         nHeight := Max( nHeight, ::nHeight() )
         ::SetSize( nWidth, nHeight, .T. )
         ::nRight  := ::nLeft + nWidth
         ::nBottom := ::nTop + nHeight
      EndIf


el error lo marca aquí.



Application
===========
Path and name: C:\CLIP53\cash32\ff\ff.Exe (32 bits)
Size: 737,792 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 17-03-2009, 00:33:25
Error description: Error BASE/1082 Argument error: -
Args:
[ 1] = N 0
[ 2] = U

Stack Calls
===========
Called from: .\source\classes\WINDOW.PRG => TSBUTTON:NWIDTH(0)
Called from: C:\CLIP53\CASH32\FF\SOURCE\SUPER\TSBUTTON.PRG => TSBUTTON:SETTEXT(2389)
Called from: C:\CLIP53\CASH32\FF\SOURCE\TOUCH1.PRG => TOUCH1(148)
Called from: C:\CLIP53\CASH32\FF\SOURCE\FF.PRG => (b)BUILDMENU(128)
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: C:\CLIP53\CASH32\FF\SOURCE\FF.PRG => MAIN(93)

System
======
CPU type: AMD Turion(tm) 64 X2 Mobile Technology TL-58 1900 Mhz
Hardware memory: 2048 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Compiler version: xHarbour build 1.1.0 Intl. (SimpLex) (Rev. 6195)
Windows version: 6.0, Build 6001 Service Pack 1
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: Error con TSButton
Posted: Thu Mar 19, 2009 07:51 AM
Mauricio wrote:Tengo un error al cambiar el texto a un super button, anexo codigo y error
 [/code]Hola Mauricio:

La istrucción: oBotones[1]:setText('prueba'), deberás ponerla en la activación del diálog (ON INIT), ya que en la posición en que la ejecutas todavía no se crea el handle para el objeto TSButton.

Un abrazo.

Manuel Mercado.
manuelmercado at prodigy dot net dot mx
Posts: 199
Joined: Thu Oct 06, 2005 09:07 PM
Re: Error con TSButton
Posted: Thu Mar 19, 2009 11:55 PM

Don Manuel,

Gracias ya quedo :-)

Saludos,
Mauricio

Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Error con TSButton
Posted: Fri Mar 20, 2009 09:42 AM

Manuel
when create Tsbutton Alpha bitmap ?

Best Regards, Saludos



Falconi Silvio

Continue the discussion