aeval y buttons.

aeval y buttons.

Postby goosfancito » Tue Aug 26, 2014 1:13 am

Code: Select all  Expand view  RUN

::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 view  RUN
  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
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: aeval y buttons.

Postby Antonio Linares » Tue Aug 26, 2014 7:56 am

Quitando la "d" :-)

o:disable()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: aeval y buttons.

Postby goosfancito » Tue Aug 26, 2014 11:00 am

Nope.

Code: Select all  Expand view  RUN
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
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: aeval y buttons.

Postby compubrion » Tue Aug 26, 2014 1:15 pm

Saludos !
A quien hereda la CLASS T
Harbour / Bcc / MinGW / Fwh 13.9
User avatar
compubrion
 
Posts: 130
Joined: Thu Mar 08, 2007 6:12 pm
Location: Miranda - Venezuela

Re: aeval y buttons.

Postby goosfancito » Tue Aug 26, 2014 1:40 pm

a Nadie estimado.

Code: Select all  Expand view  RUN
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
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: aeval y buttons.

Postby compubrion » Tue Aug 26, 2014 3: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
User avatar
compubrion
 
Posts: 130
Joined: Thu Mar 08, 2007 6:12 pm
Location: Miranda - Venezuela

Re: aeval y buttons.

Postby albeiroval » Tue Aug 26, 2014 4:04 pm

Goosfancito,

Prueba asi :

Code: Select all  Expand view  RUN


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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests