Re: NEWT :: selecting an item from a listbox

new topic     » goto parent     » topic index » view thread      » older message » newer message
K_D_R said...

Thanks, Greg, for the sample code. I am still having problems - here is the code I have been working with, the comments will show variations I have tried.

<snip> 

Any suggestions will be appreciated!

Interesting. Maybe it's returning a string pointer? I'm completely unsure here. As the documentation states, the Listbox is the most complicated control in Newt. What happens if you do this instead?

-- get the selected "item" 
atom ptr = newt:ListboxGetCurrent( listbox )  
 
-- peek the string from the pointer 
sequence item = peek_string( ptr ) 
 
-- display the result   
printf( 1, "you selected: %s\n", {item} ) 

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu