Another problem with Btnbmp

Another problem with Btnbmp

Postby Silvio.Falconi » Thu Jun 11, 2020 8:12 am

I use btnbmp to open a Selection as you can see on this snapshot

Image

when I click on btnbmp is on the dialog lookup return this error

this is the error

Code: Select all  Expand view
Application
===========
   Path and name: C:\Work\Errori\Numeri_Ombrelloni_sezione\test.Exe (32 bits)
   Size: 3,994,624 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.04
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.2, Build 9200

   Time from start: 0 hours 0 mins 4 secs
   Error occurred at: 06/11/20, 10:03:52
   Error description: Error BASE/1004  No exported method: ACTIVATE
   Args:
     [   1] = U  
     [   2] = N   42
     [   3] = N   34
     [   4] = O   TDIALOG
     [   5] = L   .F.

Stack Calls
===========
   Called from:  => ACTIVATE( 0 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 981 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2043 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: test2.prg => TE


here the test
Code: Select all  Expand view
#include "fivewin.ch"


Function Test()
   Local oDlg,oBtnSel
   local nElemento:=35
   local ctype:="01"
   local dFirst:=date()
   local dLast:=date()


   DEFINE DIALOG oDlg SIZE 200,200

   @ 07,17  BTNBMP oBtnSel FILENAME "selbtn.png";
   FLAT SIZE 20,14 PIXEL OF oDlg NOBORDER

      oBtnSel:oPopUp:= { |oBtn| ElementiVicini(nElemento,ctype,dFirst,dLast,oBtn) }


   ACTIVATE DIALOG oDLG
return nil

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

Function ElementiVicini(nElemento,ctype,dFirst,dLast,ocontrol)

local abtn:=array(2)

Local nBtnW :=25
Local nBtnH :=15
local nSelection:=0
local n:= 1
Local nRow:=10
Local nCol:=1

DEFINE DIALOG oDlg SIZE 260,190
  for n=1 to len(abtn)
  @ nRow,nCol BTNBMP abtn[n]   OF oDlg SIZE nBtnW,nBtnH FLAT CENTER
          abtn[n]:bAction := { | o | nSelection := o:Cargo, oDlg:end() }
    next
ACTIVATE DIALOG oDlg CENTERED

 return nSelection
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Another problem with Btnbmp

Postby nageswaragunupudi » Thu Jun 11, 2020 8:31 am

In the function ElementiVicini, declare oBtn as local variable
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Another problem with Btnbmp

Postby Silvio.Falconi » Thu Jun 11, 2020 8:51 am

make the same
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests