| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 3:13 am Post subject: child window problem (list close) |
|
|
hello all
I have all my child windows working fine but one, the problem is if i close the window i get a error (becuase of the list is not closed) if i close the list then that makes other problem cuase then my combo1click won't work cuase i closed the list how can i fix this so it will work right?
the list in question is list 1
here is the code
thanks
| Code: |
%%subwin = Open
DIALOG CREATE,test,-1,0,320,311,ONTOP,COLOR graY,DRAGDROP,NOTITLE
DIALOG ADD,STYLE,BigText2,Times New Roman,20,
DIALOG ADD,STYLE,BigText1,Times New Roman,8,
DIALOG ADD,STYLE,BigText,Arial,10,B
DIALOG ADD,BUTTON,BUTTON1,264,112,104,24,Close window,,BigText1,HAND
DIALOG ADD,COMBO,COMBO1,108,72,180,21,,,CLICK,BigText,HAND
DIALOG SHOW
LIST CREATE, 1
LIST ADD, Combo1, "Please Select................>"
LIST ADD, 1, "Please Select................>"
LIST ADD, Combo1, programs1
lIST ADD, 1,programs1
LIST SEEK, Combo1,0
:Combo1CLICK
%%heading = @item(1,@index(Combo1))
goto evloop
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 01, 2005 3:38 am Post subject: |
|
|
Exactly which error are you getting? Are you by chance creating list 1 twice? _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 4:08 am Post subject: |
|
|
nope i don't see it twice i get this error
i get a invaild list operation error
when i close that window....i can fix it my adding list close BUT then my click won't work right cuase the list is closed  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 5:06 am Post subject: |
|
|
let me try to explain more
i have other child windows when i go back and forth to the other windows then back to this window this is when i get the error
hard to explain  _________________ Have a nice day  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 01, 2005 5:36 am Post subject: |
|
|
Are you deleting an item from the combobox or list before or after closing
the window?
All I'm doing is grasping for air here Tim. You aren't posting enough code,
only tid bits, which makes it hard to figure what you're trying to do. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Tue Mar 01, 2005 5:46 am Post subject: |
|
|
Not quite sure what you are trying to accomplish...
However, perhaps you could try saving the list contents to a variable and then clear the list without closing?
| Code: |
list create,1
list add,Pizza
list add,Rocks!
%%text = @text(1)
list clear,1
list append,1,%%text
|
If so, then simply use the above and replace any "list close" and "list open" code with "list clear" and "list append"...
Or perhaps something like the following?
| Code: |
DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,BUTTON,BUTTON1,41,87,64,24,Open Child
DIALOG SHOW
list create,1
list add,1,John
list add,1,Doe
%%text = @text(1)
list close,1
:main
list create,1
list append,1,%%text
rem Do stuff here...
%%text = @text(1)
info %%text
list close,1
goto evloop
:back
info %%text
:evloop
wait event
goto @event()
:button1button
goto child
:close
exit
:child
DIALOG CREATE,Child,-1,0,400,160
DIALOG ADD,BUTTON,CLOSE,48,237,64,24,Close
DIALOG ADD,BUTTON,text,50,118,64,24,Text
DIALOG SHOW
:child_loop
wait event
%E = @event()
if @equal(%E,close)
goto closebutton
end
goto %E
:closebutton
DIALOG CLOSE
wait event
while @event()
wend
goto back
:textbutton
list create,1
list append,1,%%text
rem Do stuff here...
%%text = @text(1)
info @text(1)
list close,1
goto evloop
|
Still not sure if this is what you are looking for...
Cheers,
- Boo |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Mar 01, 2005 7:43 am Post subject: |
|
|
hey tim,
not sure if this will help - i have found that to properly close a child dialog, it needs to be active first - say you want to close your child dialog number 2, and then you want to have the focus on your main dialog, then
| Code: |
dialog select, 2
dialog close
dialog select, 0
|
serge _________________
|
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 8:14 am Post subject: |
|
|
hummm yea this is a hard one to explain..what i don't get is that i had ALL the same type of child windows thru out the whole program even the one i'am having troubles with worked intill i added a combo list
i would post the whole code but its big that is why i only posted the code i'am having troubles with..which i understand it is hard to fix it unless you know what the whole program is doing...i think the main problems is i have to have a list create for that combo list to work..i wish i didn't added the combo list but i had to  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 8:44 am Post subject: |
|
|
i have notice also to if i selected a item from the combo list...then if i re-selected from the list i get that error...i think think i know why its becuase the list create is in the first part of the code and not in the combo1click...if ya follow what i mean, and if i try to added a list create to the combo1click then i wll get that list error right away
| Code: |
:Combo1CLICK
%%heading = @item(1,@index(Combo1))
goto evloop
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|