1. wxEuphoria combo box
- Posted by sixs <sixs at ida.net> Apr 14, 2005
- 405 views
Hello, I am trying to put a line together as I did in win32lib. when I get to the add_item (Combo8,line) command I get the statement that I can't poke a atom. some code is as follows --==================================================================== function Lessfields(object afd,atom aft) trace(1) if equal("+", aft)or equal("9",aft) then line = {line, sprintf("%d",fd)} else line = {line,fd} return line end if end function --==================================================================== function Equalfields( object afd, atom aft) trace(1) if equal("+", aft) or equal("9",aft) then line = {line, sprintf("%d",fd)&", "} else line = {line,fd&", "} return line end if end function --====================================================== --WINDOW ON OPEN procedure --======================================================= procedure MainWin_onOpen() --(integer self,integer event,sequence params) atom fl ok =select_current(thisdb,thistbl ) listlen = db_table_size() listlen = listlen holdText = repeat({},listlen) sql = " SELECT * FROM YOU;" sql = run_sql( sql ) if atom(sql) then wx_puts(1, EUSQL_ERR_MSG[sql] ) abort(1) end if fn = (sql[1]) ft= (sql[3]) line = " " --line = (sprintf("%d",sql[2][x1][1])&", "& trace(1) --for x1 = 1 to 7 do for x1 = 1 to listlen do line = " " fd = (sql[2][x1]) fl = length(sql[2][x1]) for x2 = 1 to fl do aft = ft[x2] afd = fd[x2] if equal(13,x2) then afd = Equalfields(afd, aft) else afd = Lessfields(afd,aft) end if trace(1) -- line ={ line, {afd}} end for aline = {line} add_item(Combo8,line) end for end procedure MainWin_onOpen() wxMain(MainWin ) --------------------------------------------- I use addItem(Combo8,line) in win32lib] Thanks for any help Jim
2. Re: wxEuphoria combo box
- Posted by cklester <cklester at yahoo.com> Apr 14, 2005
- 404 views
sixs wrote: > > Hello, > I am trying to put a line together as I did in win32lib. > when I get to the add_item (Combo8,line) command I get the statement > that I can't poke a atom. You might need to use "insert_listctrl_item()". Matt, for consistency's sake, since you use "delete_list_item()," I think you should use "add_list_item()" or even just "add_item()" for list controls. "insert_listctrl_item()" isn't that hard to remember, but I'm just not used to it yet yet. :D -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
3. Re: wxEuphoria combo box
- Posted by cklester <cklester at yahoo.com> Apr 14, 2005
- 396 views
cklester wrote: > sixs wrote: > > I am trying to put a line together as I did in win32lib. > > when I get to the add_item (Combo8,line) command I get the statement > > that I can't poke a atom. > You might need to use "insert_listctrl_item()". > Matt, for consistency's sake, since you use "delete_list_item()," I think > you should use "add_list_item()" or even just "add_item()" for list controls. > "insert_listctrl_item()" isn't that hard to remember, but I'm just not used > to it yet yet. :D Actually, you could make "add_list_item()" a wrapper for using insert_listctrl_item() to add an item to the bottom/end of the list. Or whatever. :) Two pennies from me to you. -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
4. Re: wxEuphoria combo box
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 14, 2005
- 399 views
sixs wrote: > > Hello, > I am trying to put a line together as I did in win32lib. > when I get to the add_item (Combo8,line) command I get the statement > that I can't poke a atom. What is the value of line when this error occurs? Matt Lewis