TGet's Button problem-Solved

TGet's Button problem-Solved

Postby richard-service » Thu Jun 30, 2016 3:33 am

Hi
Please look it http://www.fivetech.com.tw/downloads/Video_2016-06-30_105725.wmv
Default I call ButtonBmp Action myself method no problem. but now I set button within TGet and get error.
Code: Select all  Expand view

METHOD ReGet() CLASS TUsersMsf

  REDEFINE GROUP ::oGrp ID 400 OF ::oDlg TRANSPARENT

  REDEFINE GET ::oUSERID   VAR  ::oDB:USERID   ID 101 OF ::oDlg UPDATE
  REDEFINE GET ::oPASSWD   VAR  ::oDB:PASSWD   ID 102 OF ::oDlg UPDATE
  REDEFINE GET ::oE_NO     VAR  ::oDB:E_NO     ID 103 OF ::oDlg UPDATE BITMAP "SB_FIND1" ACTION( ::Find_EmpData(1) )
  REDEFINE GET ::oFULLNAME VAR  ::oDB:FULLNAME ID 104 OF ::oDlg UPDATE

  ::oE_NO:lBtnTransparent := .t.

RETURN NIL

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

METHOD ReBtn() CLASS TUsersMsf

   ::oSubBtn2 := Array(1)

   REDEFINE BUTTONBMP ::oSubBtn2[1] ID 701 OF ::oDlg ;
            BITMAP "SB_FIND1"                        ;
            TOOLTIP "查詢員工編號資料"               ;
            MESSAGE "查詢員工編號資料"               ;
            ACTION ::Find_EmpData(1)

RETURN NIL

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

METHOD Find_EmpData( nPos ) CLASS TUsersMsf

LOCAL oDlg, oRdo, nRdo, oGet1, oGet2, oBtn[3], oGrp, oBrw, oCol
LOCAL lOK       := .F.
LOCAL cNO       := SPACE(6)
LOCAL cNAME     := SPACE(12)

      DEFAULT nPos := 1
              nRdo := nPos

      IF ::oEmployeeDB:LastRec() == 0
         MsgAlert("資料檔中無任何資料,無法查詢 !","警告")
         RETURN NIL
      ENDIF

      ::oEmployeeDB:cQuery := "SELECT * FROM employeemsf WHERE comp_no = '"+cCP_NO+"' ORDER BY e_no"
      ::oEmployeeDB:Refresh()

      DEFINE DIALOG oDlg RESOURCE "D_DR_WIN_USERSMSF_FINDEMP" FONT oFnt1

             oBrw := TXBrowse():New( oDlg )

             oBrw:SetMySQL(@::oEmployeeDB)

.............
 


Error occurred at: 2016.06.30, 10:57:09
Error description: Warning BASE/1004 Message not found: TGET:FIND_EMPDATA

Stack Calls
===========
Called from: source\rtl\tobject.prg => TGET:ERROR( 0 )
Called from: source\rtl\tobject.prg => TGET:MSGNOTFOUND( 0 )
Called from: source\rtl\tobject.prg => TGET:FIND_EMPDATA( 0 )
Called from: .\SOURCE32\Comm_Prg\TUsersMsf.prg => (b)TUSERSMSF:REGET( 497 )
Called from: .\source\classes\TGET.PRG => (b)TGET:CREATEBUTTON( 527 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 658 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 894 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1721 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1833 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3276 )
Called from: => DIALOGBOXW( 0 )
Called from: .\SOURCE32\Fwh_LIB\Dialog.prg => TDIALOG:ACTIVATE( 306 )
Called from: .\SOURCE32\Comm_Prg\TUsersMsf.prg => TUSERSMSF:FORMCREATE( 203 )
Called from: .\SOURCE32\Comm_Prg\TUsersMsf.prg => TUSERSMSF:NEW( 100 )
Called from: .\SOURCE32\Main.prg => TWINCRANEERP:RUNUSERSMSF( 1395 )
Called from: .\SOURCE32\Main.prg => (b)TWINCRANEERP:BUILD_FW_MENU( 638 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1085 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1084 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3276 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1040 )
Called from: .\SOURCE32\Main.prg => TWINCRANEERP:NEW( 555 )
Called from: .\SOURCE32\Main.prg => MAIN( 319 )


This is my main problem. second fix when TGet disable, button disable color
Last edited by richard-service on Thu Jun 30, 2016 8:49 am, edited 1 time in total.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: TGet's Button problem

Postby Antonio Linares » Thu Jun 30, 2016 6:51 am

Richard,

Code: Select all  Expand view
METHOD ReGet() CLASS TUsersMsf

  local oThis := Self

  REDEFINE GROUP ::oGrp ID 400 OF ::oDlg TRANSPARENT

  REDEFINE GET ::oUSERID   VAR  ::oDB:USERID   ID 101 OF ::oDlg UPDATE
  REDEFINE GET ::oPASSWD   VAR  ::oDB:PASSWD   ID 102 OF ::oDlg UPDATE
  REDEFINE GET ::oE_NO     VAR  ::oDB:E_NO     ID 103 OF ::oDlg UPDATE BITMAP "SB_FIND1" ACTION( oThis:Find_EmpData(1) )
  REDEFINE GET ::oFULLNAME VAR  ::oDB:FULLNAME ID 104 OF ::oDlg UPDATE

  ::oE_NO:lBtnTransparent := .t.

RETURN NIL
regards, saludos

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

Re: TGet's Button problem

Postby Antonio Linares » Thu Jun 30, 2016 6:54 am

For your second question please review:

viewtopic.php?f=3&t=32545
regards, saludos

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

Re: TGet's Button problem-Solved

Postby richard-service » Thu Jun 30, 2016 8:45 am

Hi Antonio,

Two question be solved. Thanks a lot.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 48 guests