Hi!
I have n other postprocessor problem:
My program groups have attributes, what i use as comments on the shopdoc. It works fine. I want to write these attribs to the program header, but there is a problem:
the NC controllers don't like special characters like
á - á
etc.
I wrote a code to replace these characters:
global mom_attr_PROGRAMVIEW_MEGJEGYZES
global mom_attr_PROGRAMVIEW_EGYEB
if {[hiset mom_attr_PROGRAMVIEW_MEGJEGYZES]}\
{ set MJ $mom_attr_PROGRAMVIEW_MEGJEGYZES
while { [string match "*á*" $MJ] == 1 } {
regsub "á" $MJ "a" MJ
}
#..etc.
while { [string match "*é*" $MJ] == 1 } {
regsub "é" $MJ "e" MJ
}
set MJ [string toupper $MJ]
MOM_output_literal "($MJ)"
}
This code works correctly in a simple Wish console(8.1), but when i try it in a post, only the first regsub has run, all the while cycle has been ignored..
so if i want to change any character from the attrib (ie. "g" to h"") to an other, only the 1st instance will change..
(from "gagagag" will be "hagagag", not hahahah)
what is the problem?
thanks in advance
----
kukelyk