RBTN ERROR

RBTN ERROR

Postby Silvio.Falconi » Sun Feb 03, 2013 4:31 pm

I have on W7 an error when select a menu popup on a rbtn then I try to press the button close of the dialog and the dialog not is closed
if I not select the menupopup then I can close the dialog

this is the source test
Code: Select all  Expand view
#include "fivewin.ch"
#include "xBrowse.ch"
#include "constant.ch"
#include "ribbon.ch"



#define TOPSCOPE      0
#define BOTTOMSCOPE   1

REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO



Function test()
Local oDlg
   Local nBottom   := 38.9
   Local nRight    := 106.5
   Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local nHeight := nBottom * DLG_CHARPIX_H


 MENU oPopRecord POPUP
   MENUITEM "Record and Print"
   MENUITEM "Record and Email"
   MENUITEM "Record and Fax"
   MENUITEM "Record and Payment"
   MENUITEM "Record only"
   MENUITEM "Save as Draft"
   MENUITEM "Save as Recurring"
   SEPARATOR
   MENUITEM "Preview"
ENDMENU




DEFINE DIALOG oDlg        ;
   TITLE "New Invoice"    ;
   SIZE nWidth, nHeight  TRANSPARENT PIXEL              
   


@ 270, 65 RBBTN PROMPT "Record select     ";
          SIZE  100,12 ;
          OF oDlg PIXEL ;
          POPUP  MENU oPopRecord BORDER ROUND



ACTIVATE DIALOG oDlg centered


RETURN NIL




 
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: RBTN ERROR

Postby Antonio Linares » Mon Feb 04, 2013 12:34 pm

Silvio,

You have to issue a oDlg:oPopup := either from a menuitem action or from the RBtn action:

Code: Select all  Expand view
  MENUITEM "Record and Print" ACTION oDlg:oPopup := nil


or

Code: Select all  Expand view
@ 270, 65 RBBTN PROMPT "Record select     ";
          SIZE  100,12 ;
          OF oDlg PIXEL ;
          POPUP  MENU oPopRecord BORDER ROUND ;
          ACTION oDlg:oPopup := nil
regards, saludos

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

Re: RBTN ERROR

Postby Silvio.Falconi » Mon Feb 04, 2013 12:42 pm

THANKS...
and checked the last selection ? (how change the checked menuitem)

I tried with but not run

MENU oPopRecord POPUP
MENUITEM oMenuItem[1] PROMPT "Record and Print" ACTION (oDlg:oPopup := nil,MsgInfo("Stampa"),oMenuItem[1]:lChecked:=.t.)
MENUITEM oMenuItem[2] PROMPT "Record and Email"
MENUITEM oMenuItem[3] PROMPT "Record and Fax"
MENUITEM oMenuItem[4] PROMPT "Record and Payment"
MENUITEM oMenuItem[5] PROMPT "Record only"
MENUITEM oMenuItem[6] PROMPT "Save as Draft"
MENUITEM oMenuItem[7] PROMPT "Save as Recurring"
SEPARATOR
MENUITEM oMenuItem[8] PROMPT "Preview"
ENDMENU

oMenuItem[8]:lChecked:=.t.
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: RBTN ERROR

Postby Antonio Linares » Mon Feb 04, 2013 1:11 pm

Silvio,

oMenuItem[8]:SetCheck( .T. )
regards, saludos

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

Re: RBTN ERROR

Postby Silvio.Falconi » Tue Feb 05, 2013 10:23 am

ANTONIO,
Code: Select all  Expand view
MENU oPopRecord POPUP
MENUITEM oMenuItem[1] PROMPT "Record and Print" ACTION (oDlg:oPopup := nil,MsgInfo("Stampa"),oMenuItem[1]:SetCheck( .T. ))
MENUITEM oMenuItem[2] PROMPT "Record and Email"
MENUITEM oMenuItem[3] PROMPT "Record and Fax"
MENUITEM oMenuItem[4] PROMPT "Record and Payment"
MENUITEM oMenuItem[5] PROMPT "Record only"
MENUITEM oMenuItem[6] PROMPT "Save as Draft"
MENUITEM oMenuItem[7] PROMPT "Save as Recurring"
SEPARATOR
MENUITEM oMenuItem[8] PROMPT "Preview"
ENDMENU

 @ 12, 65 RBBTN PROMPT "Record select     ";
          SIZE  100,12 ;
          OF oDlg PIXEL ;
          POPUP  MENU oPopRecord BORDER ROUND ;
          ACTION oDlg:oPopup := nil

 


Make error
Code: Select all  Expand view

Application
===========
   Path and name: C:\work\errori\INVOICE\TEST.Exe (32 bits)
   Size: 2,293,248 bytes
   Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
   FiveWin  Version: FWHX 12.03
   Windows version: 5.1, Build 2600 Service Pack 2

   Time from start: 0 hours 0 mins 3 secs
   Error occurred at: 02/05/13, 11:21:36
   Error description: Error BASE/1004  Class: 'NIL' has no exported method: SETCHECK
   Args:
     [   1] = U  
     [   2] = L   .T.

Stack Calls
===========
   Called from:  => SETCHECK( 0 )
   Called from: TEST.PRG => (b)INVOICE( 48 )
   Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 494 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONUP( 824 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1690 )
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: 7056
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 101 guests