Hello,
I suppose the title is not really clear, but I do not know how to title my problem...
So here is the thing...
I have a plugin which contains more than one field:
|
Quellcode
|
1
2
3
4
|
<plugin name="var"
A="text1"
B="text2"
>
|
If I do
|
Quellcode
|
1
2
3
|
trace(get(plugin[var].A),' ',get(plugin[var].B));
set(plugin[var].A,'text3');
trace(get(plugin[var].A),' ',get(plugin[var].B));
|
then I get an output like
|
Quellcode
|
1
2
|
text1 text2
text3 text2
|
So, everything is fine!
Now if I want to get the value of
var.A into
var.B, then I do
|
Quellcode
|
1
2
3
|
trace(get(plugin[var].A),' ',get(plugin[var].B));
set(plugin[var].B,get(plugin[var].A));
trace(get(plugin[var].A),' ',get(plugin[var].B));
|
with the output like
|
Quellcode
|
1
2
|
text1 text2
text1 text1
|
If I however try to do the following thing
|
Quellcode
|
1
2
3
4
|
trace(get(plugin[var].A),' ',get(plugin[var].B));
set(plugin[var].B,get(plugin[var].A));
set(plugin[var].A,text4);
trace(get(plugin[var].A),' ',get(plugin[var].A));
|
I get as an output
|
Quellcode
|
1
2
|
text1 text2
text4 text4
|
when what I would expect is
|
Quellcode
|
1
2
|
text1 text2
text4 text1
|
So, somehow
plugin[var].B ist also affected by the
set(plugin[var].A,text4) line due to the comand
set(plugin[var].B,get(plugin[var].A)); before, although it is not even 'touching' that variable.
How can this be?????
What am I doing wrong??
Cheers