<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>Hello everyone,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>We have an issue with GME-Interpreter working as Add-On.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>What we want to do:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>Set an Objects Registry-Value “nameColor” according to this Objects Attribute named “Color”.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>Problem:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>It works fine for the FIRST time, but when we change the Attribute a second time, nothing happens (the Interpreter doesn’t start at all).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>After restarting GME it works, but again just for one time.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>You’ll find our Interpreter-Code attached.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>Note:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>If we comment the lines where Registry is set, the Interpreter works even several times (but nothing happens in the model for sure).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>otherFCO->getRegistry()->setValueByPath(<span style='color:#A31515'>"/nameColor"</span> , <span style='color:#A31515'>"0xff0000"</span>);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Any idea?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks in advance.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Florian<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal>---------<o:p></o:p></p><p class=MsoNormal><b>Dipl.-Ing. Florian Kraus<o:p></o:p></b></p><p class=MsoNormal><b>Institut für Luftfahrtsysteme (ILS)<o:p></o:p></b></p><p class=MsoNormal>Universität Stuttgart<o:p></o:p></p><p class=MsoNormal>Pfaffenwaldring 31<o:p></o:p></p><p class=MsoNormal>70569 Stuttgart (Vaihingen)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>Tel.: +49 (0)711 685-67004<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Fax: +49 (0)711 685-63591<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Email: </span><a href="mailto:florian.kraus@ils.uni-stuttgart.de"><span lang=EN-US style='color:blue'>florian.kraus@ils.uni-stuttgart.de</span></a><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>URL: </span><a href="http://www.ils.uni-stuttgart.de"><span lang=EN-US style='color:blue'>http://www.ils.uni-stuttgart.de</span></a><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>___________________________________________________________________________________<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Code:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:green'>// ====================================================</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:green'>// If the component is an Add-On, then this method is called for every Object Event</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas;color:blue'>void</span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> Component::objectEventPerformed( Object& object, <span style='color:blue'>unsigned</span> <span style='color:blue'>long</span> <span style='color:blue'>event</span>, VARIANT v )<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>{<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:green'>// ======================</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:green'>// Insert application specific code here</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> std::string MetaName;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> std::string InterfaceColor;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>char</span> anyChar[65];<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> _itoa(<span style='color:blue'>event</span>, anyChar, 16);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>using</span> <span style='color:blue'>namespace</span> GMEConsole;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> Console::Out::WriteLine(CString(<span style='color:#A31515'>"Interpreter startet"</span>) + CString(<span style='color:#A31515'>" - event:"</span>) + CString(anyChar));<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span>(<span style='color:blue'>event</span> == 0x00000001){ <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> ObjectStatus Status;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> Status = object->getStatus();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (Status == OST_Deleted){<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>goto</span><span style='font-size:9.5pt;font-family:Consolas'> cancel;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'> </span><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>}<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (<span style='color:blue'>event</span> == MON::OET_AttributeChanged){<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> MetaName = object->getObjectMeta().name();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> Console::Out::WriteLine(MetaName.c_str());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (MetaName == <span style='color:#A31515'>"MyAtom"</span> ) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> BON::FCO otherFCO(object);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> InterfaceColor = otherFCO->getAttribute(<span style='color:#A31515'>"Color"</span>)->getStringValue();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (InterfaceColor == <span style='color:#A31515'>"RED"</span>) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> otherFCO->getRegistry()->setValueByPath(<span style='color:#A31515'>"/nameColor"</span> , <span style='color:#A31515'>"0xff0000"</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (InterfaceColor == <span style='color:#A31515'>"YELLOW"</span>) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> otherFCO->getRegistry()->setValueByPath(<span style='color:#A31515'>"/nameColor"</span> , <span style='color:#A31515'>"0xffff00"</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>if</span> (InterfaceColor == <span style='color:#A31515'>"BLUE"</span>) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> otherFCO->getRegistry()->setValueByPath(<span style='color:#A31515'>"/nameColor"</span> , <span style='color:#A31515'>"0x0000ff"</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>cancel:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'>Console::Out::WriteLine(CString(<span style='color:#A31515'>"Interpreter stopped"</span>));<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> </span><span style='font-size:9.5pt;font-family:Consolas'>}<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'>}<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>