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


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Feb 28, 2005 6:07 pm Post subject: what i'am missing....list remove problem |
|
|
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 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  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Mon Feb 28, 2005 6:17 pm Post subject: |
|
|
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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 12:51 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 01, 2005 3:44 am Post subject: |
|
|
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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 4:03 am Post subject: |
|
|
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  _________________ 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:44 am Post subject: |
|
|
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 =>
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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 01, 2005 8:06 am Post subject: |
|
|
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  |
|
| 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
|
|