FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour aeval y buttons.
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
aeval y buttons.
Posted: Tue Aug 26, 2014 01:13 AM
Code (fw): Select all Collapse
::obtns:= array(2)
...
    
  REDEFINE BUTTON ::oBtns[1] ID 200 OF oDlg
  REDEFINE BUTTON ::oBtns[2] ID 201 OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ON INIT (this:botones())

   RETURN (NIL)

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

METHOD botones() CLASS T

   aEval(::oBtns, {|o| o:disabled()})

   RETURN (NIL)


Me tira un error y dice:
Code (fw): Select all Collapse
   Error description: Warning BASE/1004  Message not found: TBUTTON:DISABLED


como lo soluciono?
gracias
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: aeval y buttons.
Posted: Tue Aug 26, 2014 07:56 AM

Quitando la "d" :-)

o:disable()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: aeval y buttons.
Posted: Tue Aug 26, 2014 11:00 AM
Nope.

Code (fw): Select all Collapse
 Error description: Error BASE/1004  Class: 'NIL' has no exported method: DISABLE
   Args:
     [   1] = U
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 132
Joined: Thu Mar 08, 2007 06:12 PM
Re: aeval y buttons.
Posted: Tue Aug 26, 2014 01:15 PM

Saludos !
A quien hereda la CLASS T

Harbour / Bcc / MinGW / Fwh 13.9
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: aeval y buttons.
Posted: Tue Aug 26, 2014 01:40 PM
a Nadie estimado.

Code (fw): Select all Collapse
CLASS t
   DATA nIdMascota
   DATA nIdDiagnostico
   DATA oCnx
   DATA oGets
   DATA vGets
   DATA oBtns

METHOD NEW() CONSTRUCTOR

   PROTECTED:

METHOD crear()
METHOD abm(aRespuesta)
METHOD inicializar(aRespuesta)
METHOD botones()
METHOD grabar()

METHOD browser()

END CLASS
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 132
Joined: Thu Mar 08, 2007 06:12 PM
Re: aeval y buttons.
Posted: Tue Aug 26, 2014 03:35 PM

Puedes mostrar como creas el buttom, para q puedas heredar los methods dberias crearlo de esta forma

oBtn[nButon] := TButton:New( nRow, nCol, cCaption, oWnd, bAction, nWidth, nHeight, nHelpId, oFont, lDefault,;
lPixel, lDesign, cMsg, lUpdate, bWhen, bValid, lCancel,cVarName, lMultiline )

ó

oBtn[nButon]:= TButton:ReDefine( nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen, bValid, cPrompt, lCancel )

Harbour / Bcc / MinGW / Fwh 13.9
Posts: 400
Joined: Tue Oct 16, 2007 05:51 PM
Re: aeval y buttons.
Posted: Tue Aug 26, 2014 04:04 PM
Goosfancito,

Prueba asi :

Code (fw): Select all Collapse
METHOD Prueba() CLASS T

  Local oSelf:= Self
 
  ::obtns:= array(2)
  ...
    
  REDEFINE BUTTON ::oBtns[1] ID 200 OF oDlg
  REDEFINE BUTTON ::oBtns[2] ID 201 OF oDlg

   ACTIVATE DIALOG oDlg CENTERED ON INIT (oSelf:botones())

 RETURN (NIL)

METHOD botones() CLASS T

   aEval(::oBtns, {|o| o:disable()})

   RETURN (NIL)


Saludos,
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com

Continue the discussion