aeval y buttons.

Post Reply
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

aeval y buttons.

Post by goosfancito »

Code: Select all | Expand


::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: Select all | Expand

  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/
User avatar
Antonio Linares
Site Admin
Posts: 42512
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: aeval y buttons.

Post by Antonio Linares »

Quitando la "d" :-)

o:disable()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: aeval y buttons.

Post by goosfancito »

Nope.

Code: Select all | Expand

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/
User avatar
compubrion
Posts: 130
Joined: Thu Mar 08, 2007 6:12 pm
Location: Miranda - Venezuela
Contact:

Re: aeval y buttons.

Post by compubrion »

Saludos !
A quien hereda la CLASS T
Harbour / Bcc / MinGW / Fwh 13.9
User avatar
goosfancito
Posts: 1955
Joined: Fri Oct 07, 2005 7:08 pm

Re: aeval y buttons.

Post by goosfancito »

a Nadie estimado.

Code: Select all | Expand

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/
User avatar
compubrion
Posts: 130
Joined: Thu Mar 08, 2007 6:12 pm
Location: Miranda - Venezuela
Contact:

Re: aeval y buttons.

Post by compubrion »

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
User avatar
albeiroval
Posts: 383
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: aeval y buttons.

Post by albeiroval »

Goosfancito,

Prueba asi :

Code: Select all | Expand



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
Post Reply