STRANGE ERROR ON RADIOMENU resolved !!!

STRANGE ERROR ON RADIOMENU resolved !!!

Postby Silvio » Thu Apr 21, 2011 11:36 am

the radio control not show the position of
the values
nRutipo:=4 ,
nRUPAG:=2

on the radio controls in this dialog

WHY


PLS SEE THIS TEST
Code: Select all  Expand view
#include"fivewin.ch"

FUNCTION TEST()
   LOCAL oDlg,oFont,aGet[14],oFld
   Local nRutipo:=4 ,  nRUPAG:=2




DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 8
DEFINE DIALOG oDlg FROM 100, 100 TO 510,608;
                 TITLE "TEST" PIXEL FONT oFont

 @ 12, 10 SAY "Tipo:" OF oDlg SIZE 23, 8 PIXEL FONT oFont
 
   @ 10, 50    RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12  OF oDlg   UPDATE
         @ 10, 104  RADIOITEM "Elenco email" RADIOMENU aGet[1]  PIXEL SIZE 50, 12   OF oDlg
         @ 10, 155 RADIOITEM "&Amico personale" RADIOMENU aGet[1]  PIXEL SIZE 50, 12 OF oDlg
        @ 10, 210 RADIOITEM "Altro" RADIOMENU aGet[1]      PIXEL SIZE 40, 12    OF oDlg


  @  104,10 FOLDER oFld ;
        SIZE 245,  80 ;
        OF oDlg ;
         ITEMS "&1","&2" ;
        FONT oFont ;
        PIXEL


@ 7, 10 SAY "Forma:" OF  oFld:aDialogs[1] SIZE 23, 8 PIXEL FONT oFont
     @ 5, 50  RADIO aGet[14] VAR nRUPAG PROMPT "&Bonifico Bancario" PIXEL SIZE 50, 12  OF  oFld:aDialogs[1]
     @ 5, 104 RADIOITEM "&Carta di credito" RADIOMENU aGet[14]  PIXEL SIZE 50, 12   OF  oFld:aDialogs[1]
     @ 5, 155 RADIOITEM "&In contanti" RADIOMENU aGet[14]  PIXEL SIZE 40, 12OF  oFld:aDialogs[1]
     @ 5, 200 RADIOITEM "&Assegno" RADIOMENU aGet[14]      PIXEL SIZE 40, 12   OF  oFld:aDialogs[1]




ACTIVATE DIALOG oDlg
Last edited by Silvio on Thu Apr 21, 2011 2:01 pm, edited 1 time in total.
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU

Postby ukoenig » Thu Apr 21, 2011 11:55 am

Silvio,

missing prompt-defines:

nRutipo:=4
PROMPT "&Utente registrato", "Test 2", "Test 3", "Test 4"

nRUPAG:=2
PROMPT "&Bonifico Bancario", "Test"

Best regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: STRANGE ERROR ON RADIOMENU

Postby Silvio » Thu Apr 21, 2011 12:54 pm

UWE,

why you not read after ...

@ 10, 50 RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12 OF oDlg UPDATE



I use these because if I make PROMPT "&Utente registrato", "Test 2", "Test 3", "Test 4" it show the radio one down another but I use

@ 10, 104 RADIOITEM "Elenco email" RADIOMENU aGet[1] PIXEL SIZE 50, 12 OF oDlg
@ 10, 155 RADIOITEM "&Amico personale" RADIOMENU aGet[1] PIXEL SIZE 50, 12 OF oDlg
@ 10, 210 RADIOITEM "Altro" RADIOMENU aGet[1] PIXEL SIZE 40, 12 OF oDlg


I must redefined the prompts ??????????
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU

Postby Daniel Garcia-Gil » Thu Apr 21, 2011 1:35 pm

Silvio

it's not a strange error, is a correct feature...

when RADIO MENU is created ...
Code: Select all  Expand view
@ 10, 50 RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12 OF oDlg UPDATE


there are not item added...

the variable nRutipo only save the item selected, it not select a item

after created the item you can check it...

sample
Code: Select all  Expand view

#include"fivewin.ch"

FUNCTION TEST()
   LOCAL oDlg,oFont,aGet[14],oFld, o
   Local nRutipo:=4 ,  nRUPAG:=2




DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 8
DEFINE DIALOG oDlg FROM 100, 100 TO 510,608;
                 TITLE "TEST" PIXEL FONT oFont

 @ 12, 10 SAY "Tipo:" OF oDlg SIZE 23, 8 PIXEL FONT oFont
 
 @ 10, 50    RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12  OF oDlg   UPDATE
 @ 10, 104  RADIOITEM "Elenco email" RADIOMENU aGet[1]  PIXEL SIZE 50, 12   OF oDlg
 @ 10, 155 RADIOITEM "&Amico personale" RADIOMENU aGet[1]  PIXEL SIZE 50, 12 OF oDlg
 @ 10, 210 RADIOITEM "Altro" RADIOMENU aGet[1]      PIXEL SIZE 40, 12    OF oDlg

 aGet[1]:aItems[ nRutipo ]:Check()
 
 @  104,10 FOLDER oFld ;
        SIZE 245,  80 ;
        OF oDlg ;
         ITEMS "&1","&2" ;
        FONT oFont ;
        PIXEL


 @ 7, 10 SAY "Forma:" OF  oFld:aDialogs[1] SIZE 23, 8 PIXEL FONT oFont
 @ 5, 50  RADIO aGet[14] VAR nRUPAG PROMPT "&Bonifico Bancario" PIXEL SIZE 50, 12  OF  oFld:aDialogs[1]
 @ 5, 104 RADIOITEM "&Carta di credito" RADIOMENU aGet[14]  PIXEL SIZE 50, 12   OF  oFld:aDialogs[1]
 @ 5, 155 RADIOITEM "&In contanti" RADIOMENU aGet[14]  PIXEL SIZE 40, 12OF  oFld:aDialogs[1]
 @ 5, 200 RADIOITEM "&Assegno" RADIOMENU aGet[14]      PIXEL SIZE 40, 12   OF  oFld:aDialogs[1]

 aGet[14]:aItems[ nRUPAG ]:Check()

ACTIVATE DIALOG oDlg
 


very util suggestions for you...
1) try to find other way to debug your sources...
2) try to study the class's source code, before report a problem in the class, normally the "strange error" come from us

this solutions worked???
http://forums.fivetechsupport.com/viewtopic.php?p=113552#p113552
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: STRANGE ERROR ON RADIOMENU

Postby Silvio » Thu Apr 21, 2011 1:40 pm

sorry daniel

I copied a test samples of fwh .

.it is the same of .testrad2.prg

and on this file I not see check comand


// Testing some radio buttons

#include "FiveWin.ch"

static oWnd

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

function Main()

local nValue := 3, oRad

SET _3DLOOK ON
SET HELPFILE TO "Test.hlp"

DEFINE DIALOG oWnd ;
TITLE "Testing a Radio Buttons Menu" COLOR "N/W"

@ 1, 1 BUTTON "&Test" SIZE 70, 20 ;
ACTION ( MsgInfo( nValue ), oRad:aItems[ 2 ]:SetText( "&Changed!" ) )

@ 3, 2 RADIO oRad VAR nValue ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 150, 25 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()

// adding an extra radio item at a different location
@ 5, 25 RADIOITEM "Fo&ur" RADIOMENU oRad OF oWnd SIZE 150, 25


ACTIVATE DIALOG oWnd CENTERED ;
ON INIT oWnd:SetSize( 600, 400 )

return nil

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

procedure AppSys // XBase++ requirement

return





1) If I found an error look on manuals ( i have also the xharbour guide of Patrick Mast)
2) then I see all sample in samples folder of fivewin
3) then I make a small test to found the problem

and at last I write on forum if I not Found the error

for the second solution : yes it is working now..
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU

Postby Daniel Garcia-Gil » Thu Apr 21, 2011 1:50 pm

Silvio


my answer and suggestions is same...

you wrote to uwe
Silvio wrote:I use these because if I make PROMPT "&Utente registrato", "Test 2", "Test 3", "Test 4" it show the radio one down another but I use


suggestion 2)
Daniel Garcia-Gil wrote:2) try to study the class's source code, before report a problem in the class, normally the "strange error" come from us

if you see the source code of CLASS TRadMenu...
when we assign all item in one time the class first create the item after selected it, because all item are send same time, but you want not...
you want show radio the right side
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: STRANGE ERROR ON RADIOMENU

Postby Silvio » Thu Apr 21, 2011 1:52 pm

Daniel these there is another error not resolved


the report tests run ok but when I insert thesame lines command on mine test not run

seems to be an error in the report class

from stephan Haupt
every color inside the report is set correct, but not printed :-(

viewtopic.php?f=3&t=21352

if you want I can send you a minimal test
Last edited by Silvio on Thu Apr 21, 2011 1:59 pm, edited 1 time in total.
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU

Postby Silvio » Thu Apr 21, 2011 1:58 pm

Daniel Garcia-Gil wrote:Silvio


my answer and suggestions is same...

you wrote to uwe
Silvio wrote:I use these because if I make PROMPT "&Utente registrato", "Test 2", "Test 3", "Test 4" it show the radio one down another but I use


suggestion 2)
Daniel Garcia-Gil wrote:2) try to study the class's source code, before report a problem in the class, normally the "strange error" come from us

if you see the source code of CLASS TRadMenu...
when we assign all item in one time the class first create the item after selected it, because all item are send same time, but you want not...
you want show radio the right side



I not understood what you mean

I only saw the sample testrad2.prg : it was the same commnd of my test

Uwe , often anwerred me with another argumentor topic or solution I ask

How if I must resolve with his solution what he me sad , also if there is another solution ...
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU - resolved

Postby Silvio » Thu Apr 21, 2011 2:01 pm

thanks to Daniel, and Uwe
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU - resolved

Postby Daniel Garcia-Gil » Thu Apr 21, 2011 2:04 pm

Silvio

Silvio wrote:I only saw the sample testrad2.prg : it was the same commnd of my test


it's no same command

testrad (all item together)

Code: Select all  Expand view
@ 3, 2 RADIO oRad VAR nValue ;
      ITEMS "&One", "&Two", "T&hree" _3D SIZE 150, 25 ;
      HELPID 100, 101, 102 ;
      ON CHANGE MsgBeep()



your code... (one item by time)

Code: Select all  Expand view
@ 10, 50    RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12  OF oDlg   UPDATE
 @ 10, 104  RADIOITEM "Elenco email" RADIOMENU aGet[1]  PIXEL SIZE 50, 12   OF oDlg
 @ 10, 155 RADIOITEM "&Amico personale" RADIOMENU aGet[1]  PIXEL SIZE 50, 12 OF oDlg
 @ 10, 210 RADIOITEM "Altro" RADIOMENU aGet[1]      PIXEL SIZE 40, 12    OF oDlg


Silvio wrote:thanks to Daniel, and Uwe

your welcome
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: STRANGE ERROR ON RADIOMENU - resolved

Postby Silvio » Fri Apr 22, 2011 6:46 am

Daniel Garcia-Gil wrote:Silvio

Silvio wrote:I only saw the sample testrad2.prg : it was the same commnd of my test


it's no same command

testrad (all item together)

Code: Select all  Expand view
@ 3, 2 RADIO oRad VAR nValue ;
      ITEMS "&One", "&Two", "T&hree" _3D SIZE 150, 25 ;
      HELPID 100, 101, 102 ;
      ON CHANGE MsgBeep()



your code... (one item by time)

Code: Select all  Expand view
@ 10, 50    RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12  OF oDlg   UPDATE
 @ 10, 104  RADIOITEM "Elenco email" RADIOMENU aGet[1]  PIXEL SIZE 50, 12   OF oDlg
 @ 10, 155 RADIOITEM "&Amico personale" RADIOMENU aGet[1]  PIXEL SIZE 50, 12 OF oDlg
 @ 10, 210 RADIOITEM "Altro" RADIOMENU aGet[1]      PIXEL SIZE 40, 12    OF oDlg


Silvio wrote:thanks to Daniel, and Uwe

your welcome










Daniel,

the prg not was testrad.prg but testrad2.prg
on this there are the same commands and not see your check command


// Testing some radio buttons

#include "FiveWin.ch"

static oWnd

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

function Main()

local nValue := 3, oRad

SET _3DLOOK ON
SET HELPFILE TO "Test.hlp"

DEFINE DIALOG oWnd ;
TITLE "Testing a Radio Buttons Menu" COLOR "N/W"

@ 1, 1 BUTTON "&Test" SIZE 70, 20 ;
ACTION ( MsgInfo( nValue ), oRad:aItems[ 2 ]:SetText( "&Changed!" ) )

@ 3, 2 RADIO oRad VAR nValue ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 150, 25 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()

// adding an extra radio item at a different location
@ 5, 25 RADIOITEM "Fo&ur" RADIOMENU oRad OF oWnd SIZE 150, 25

ACTIVATE DIALOG oWnd CENTERED ;
ON INIT oWnd:SetSize( 600, 400 )

return nil

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

procedure AppSys // XBase++ requirement

return
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU resolved !!!

Postby Daniel Garcia-Gil » Fri Apr 22, 2011 10:01 am

Silvio

Silvio wrote:the prg not was testrad.prg but testrad2.prg

yes, i know...i forget write the "2" in testrad....
i copied and pasted the code from testrad2.prg

please see my post and the testrad2.prg code

MY POST
Daniel Garcia-Gil wrote:testrad (all item together)
@ 3, 2 RADIO oRad VAR nValue ;
      ITEMS "&One", "&Two", "T&hree" _3D SIZE 150, 25 ;
      HELPID 100, 101, 102 ;
      ON CHANGE MsgBeep()


YOUR POST
Silvio wrote:@ 3, 2 RADIO oRad VAR nValue ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 150, 25 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()

is same in both post...

Silvio wrote:on this there are the same commands

is TOTALLY DIFFERENT at your, you use RADIOITEM, testrad2.prg NO

Silvio wrote:@ 10, 50    RADIO aGet[1] VAR nRutipo PROMPT "&Utente registrato" PIXEL SIZE 50, 12  OF oDlg   UPDATE
 @ 10, 104  RADIOITEM "Elenco email" RADIOMENU aGet[1]  PIXEL SIZE 50, 12   OF oDlg
 @ 10, 155 RADIOITEM "&Amico personale" RADIOMENU aGet[1]  PIXEL SIZE 50, 12 OF oDlg
 @ 10, 210 RADIOITEM "Altro" RADIOMENU aGet[1]      PIXEL SIZE 40, 12    OF oDlg


Silvio wrote:and not see your check command

what do you mean, i never talk about check command...
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: STRANGE ERROR ON RADIOMENU resolved !!!

Postby Silvio » Fri Apr 22, 2011 10:49 am

Sorry Daniel
why you joke with me ?

on mine testrad2.prg I found on my folder and I have the same command

@ 3, 2 RADIO oRad VAR nValue ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 150, 25 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()

// adding an extra radio item at a different location
@ 5, 25 RADIOITEM "Fo&ur" RADIOMENU oRad OF oWnd SIZE 150, 25



I 'm seeing the same commands


for the check command you told me to set

aGet[1]:aItems[ nRutipo ]:Check()

but this check command there is not on testrad2.prg
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: STRANGE ERROR ON RADIOMENU resolved !!!

Postby Daniel Garcia-Gil » Fri Apr 22, 2011 11:16 am

Silvio forget...

i'll not try show your mistake again... the fact is: you solved, is ok to me

Silvio wrote:why you joke with me ?

i dont like the joke... i'm a serious and professional with my job
My intention is to solve a problem, not cause them
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: STRANGE ERROR ON RADIOMENU resolved !!!

Postby Silvio » Fri Apr 22, 2011 12:49 pm

OK :) IT IS GOOD FOR ME
THANKS TO U FOR ALL
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 9 guests