1. getNumber in wxEuphoria

I use the command getNumber in win32lib as:
HMEID = getNumber(EMEID)
set_parameter("HMEID",HMEID)

---
I want to do the same thing in wxEuphoria. I have trouble  changing the 
text field to integer to insert into edb using eusql.
Thanks for any help
jim

new topic     » topic index » view message » categorize

2. Re: getNumber in wxEuphoria

> I use the command getNumber in win32lib as:
> HMEID = getNumber(EMEID)
> set_parameter("HMEID",HMEID)

This does the same thing:

    HMEID = getText( EMEID )

    HMEID = value( HMEID )
    if HMEID[1] = GET_SUCCESS then
        HMEID = HMEID[2]
    else
        HMEID = 0
    end if

    set_parameter( "HMEID", HMEID )

> I want to do the same thing in wxEuphoria. I have trouble  changing the
> text field to integer to insert into edb using eusql.
> Thanks for any help
> jim

new topic     » goto parent     » topic index » view message » categorize

3. Re: getNumber in wxEuphoria

sixs wrote:
> 
> I use the command getNumber in win32lib as:
> HMEID = getNumber(EMEID)
> set_parameter("HMEID",HMEID)
> 
> ---
> I want to do the same thing in wxEuphoria. I have trouble  changing the 
> text field to integer to insert into edb using eusql.

As Greg alluded, you need to use value():
temp = value( get_text_value( EMEID ) )
HMEID = temp[2]
set_parameter( "HMEID", HMEID )

This comes up occaisionally, so I suppose I'll add this for the next 
release:
global function get_text_number( atom textctrl )
	sequence text
	text = value( get_text_value( textctrl ) )
	return text[2]
end function


Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

4. Re: getNumber in wxEuphoria

Matt Lewis wrote:
> 
> sixs wrote:
> > 
> > I use the command getNumber in win32lib as:
> > HMEID = getNumber(EMEID)
> > set_parameter("HMEID",HMEID)
> > 
> > ---
> > I want to do the same thing in wxEuphoria. I have trouble  changing the 
> > text field to integer to insert into edb using eusql.
> 
> As Greg alluded, you need to use value():

BTW, I don't use value() in Win32lib. I use a much more flexible 
function: w32TextToNumber().

-- 
Derek Parnell
Melbourne, Australia
irc://irc.sorcery.net:9000/euphoria

new topic     » goto parent     » topic index » view message » categorize

5. Re: getNumber in wxEuphoria

Thanks to all who responded.
Jim
Derek, I hope you keep involved  in  Euphoria development.
Jim.

Derek Parnell wrote:

>
>
>posted by: Derek Parnell <ddparnell at bigpond.com>
>
>Matt Lewis wrote:
>  
>
>>sixs wrote:
>>    
>>
>>>I use the command getNumber in win32lib as:
>>>HMEID = getNumber(EMEID)
>>>set_parameter("HMEID",HMEID)
>>>
>>>---
>>>I want to do the same thing in wxEuphoria. I have trouble  changing the 
>>>text field to integer to insert into edb using eusql.
>>>      
>>>
>>As Greg alluded, you need to use value():
>>    
>>
>BTW, I don't use value() in Win32lib. I use a much more flexible 
>function: w32TextToNumber().
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu