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 


what i'am missing....list remove problem

 
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: Mon Feb 28, 2005 6:07 pm    Post subject: what i'am missing....list remove problem Reply with quote

hello all

when i click to remove a item from a list...it removes it ok however the varible still holds the value when i save it Sad what i'am missing here?

the varible in question is %%button1

thanks

Code:

%%var4 = test.ini
%%var0 = @WINDIR(S)

INIFILE OPEN,%%var0\%%var4
%%button1 = @INIREAD(test,button1)
INIFILE OPEN,%%var0\%%var4
%%path1 = @INIREAD(test,path1)


DIALOG CREATE,New Dialog,-1,0,240,160
  DIALOG ADD,LIST,list100,12,16,208,124,click on item to remove it from list!,CLICK,,HAND
  DIALOG SHOW
  list create,list100
  list add,list100,%%button1
   
  goto evloop
:list100click
LIST DELETE,LIST100

list create,10
list add,10,[test]
list add,10,button1=%%button1
list add,10,path1=%%path1
rem LIST DELETE,LIST100
rem LIST ASSIGN,list100,10 
LIST SAVEFILE,list100,C:\test\files.ini


end
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: Mon Feb 28, 2005 6:17 pm    Post subject: Reply with quote

Just clear the variable %%button1 after saving the file.

Code:

  .
  .
  .
  list savefile,list100,c:\test\files.ini
  %%button1 =
  goto Evloop



I also noticed an unneeded end command, since there are not any
ifs being used.

_________________
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 12:51 am    Post subject: Reply with quote

right but i don't want the varible cleared unless i remove it from the list

if ya follow what i mean


thanks

_________________
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:44 am    Post subject: Reply with quote

Aren't you deleting an item from the list when the list gets clicked? That's
what I'm seeing anyway. If so, then that is when you clear the variable.

I also see list create,list100 twice in your posted code.

_________________
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:03 am    Post subject: Reply with quote

yes i'am deleting a item from the list BUT that item hold a varible and that varible is not getting clear for some reason 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:44 am    Post subject: Reply with quote

Just deleting the item from the list won't clear the variable. You have to
write a simple line of code to do it.

Add this to your :List100CLICK label after deleting the list item =>
Code:

  %%button1 =


This line =>
Code:

list add,list100,%%button1

only adds the contents of the variable to the list, not the actual variable.
So even if you delete the list item, with out clearing the variable yourself,
the variable will still hold whatever contents it held before.

_________________
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 8:06 am    Post subject: Reply with quote

i see what you are saying..hummm problem is that list holds many varibles and i don't want to clear them all only if they are deleted from a list....if yea folllow what i mean
_________________
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