Hi,
to clear up why the code in the first post wasn't working, here a copy of my answering-mail to the same question you had also sent by mail:
In this call:
|
Quellcode
|
1
|
indexoftxt(pos,get(viewpointSetting), ',');
|
the get() will be resolved to:
|
Quellcode
|
1
|
indexoftxt(pos, map_settings.viewpoint2_xy, ',');
|
That means the name of the variable itself will be searched and not the content of the variable itself.
To search the content of the variable, it must be first read-out/copied to an other variable (because a get(get(var)) is not possible).
e.g. this can be done by such code:
|
Quellcode
|
1
|
copy(varcontent, get(viewpointsetting));
|
After resolving the get(), the code will look like:
|
Quellcode
|
1
|
copy(varcontent, map_settings.viewpoint2_xy);
|
And with that code, the content from 'map_settings.viewpoint2_xy' will be copied to 'varcontent'.
That new 'varcontent' variable can now by used to as get(varcontent) in the indexoftxt() call.
That means the final working code will look like this:
|
Quellcode
|
1
2
3
|
txtadd(viewpointsetting, 'map_settings.viewpoint', get(cnt), '_xy');
copy(varcontent, get(viewpointsetting));
indexoftxt(pos, get(varcontent), ',');
|
Best regards,
Klaus