forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


child window problem (list close)

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 01, 2005 3:13 am    Post subject: child window problem (list close) Reply with quote

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 Sad 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 Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Mar 01, 2005 3:38 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 01, 2005 4:08 am    Post subject: Reply with quote

nope i don't see it twice i get this error

i get a invaild list operation error Sad

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 Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 01, 2005 5:06 am    Post subject: Reply with quote

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 Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Mar 01, 2005 5:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Tue Mar 01, 2005 5:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Mar 01, 2005 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 01, 2005 8:14 am    Post subject: Reply with quote

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 Sad

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 Sad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 01, 2005 8:44 am    Post subject: Reply with quote

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 Sad



Code:

:Combo1CLICK
%%heading = @item(1,@index(Combo1))
  goto evloop

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group