<div dir="ltr">What version of GME are you using? There was a bug fixed in 14.10.29 that prevented addons from getting some events.<div><br></div><div>Kevin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 6:32 AM, Florian Kraus <span dir="ltr"><<a href="mailto:florian.kraus@ils.uni-stuttgart.de" target="_blank">florian.kraus@ils.uni-stuttgart.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="DE" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">Hello everyone,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></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.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">What we want to do:<u></u><u></u></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”.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">Problem:<u></u><u></u></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).<u></u><u></u></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.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">You’ll find our Interpreter-Code attached.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">Note:<u></u><u></u></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).<u></u><u></u></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>);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Any idea?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thanks in advance.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Florian<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal">---------<u></u><u></u></p><p class="MsoNormal"><b>Dipl.-Ing. Florian Kraus<u></u><u></u></b></p><p class="MsoNormal"><b>Institut für Luftfahrtsysteme (ILS)<u></u><u></u></b></p><p class="MsoNormal">Universität Stuttgart<u></u><u></u></p><p class="MsoNormal">Pfaffenwaldring 31<u></u><u></u></p><p class="MsoNormal">70569 Stuttgart (Vaihingen)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-US">Tel.: <a href="tel:%2B49%20%280%29711%20685-67004" value="+4971168567004" target="_blank">+49 (0)711 685-67004</a><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Fax: <a href="tel:%2B49%20%280%29711%20685-63591" value="+4971168563591" target="_blank">+49 (0)711 685-63591</a><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Email: </span><a href="mailto:florian.kraus@ils.uni-stuttgart.de" target="_blank"><span lang="EN-US" style="color:blue">florian.kraus@ils.uni-stuttgart.de</span></a><span lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">URL: </span><a href="http://www.ils.uni-stuttgart.de" target="_blank"><span lang="EN-US" style="color:blue">http://www.ils.uni-stuttgart.de</span></a><span lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">___________________________________________________________________________________<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Code:<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></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"><u></u><u></u></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"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></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 )<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">{<u></u><u></u></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><u></u><u></u></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><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> std::string MetaName;<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> std::string InterfaceColor;<u></u><u></u></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];<u></u><u></u></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);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></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;<u></u><u></u></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));<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></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){ <u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> ObjectStatus Status;<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> Status = object->getStatus();<u></u><u></u></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){<u></u><u></u></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;<u></u><u></u></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">}<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> <u></u><u></u></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){<u></u><u></u></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();<u></u><u></u></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());<u></u><u></u></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> ) {<u></u><u></u></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);<u></u><u></u></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();<u></u><u></u></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>) {<u></u><u></u></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>);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> }<u></u><u></u></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>) {<u></u><u></u></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>);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> }<u></u><u></u></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>) {<u></u><u></u></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>);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> }<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> }<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> <u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> }<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> <u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">cancel:<u></u><u></u></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>));<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"> <u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></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">}<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">}<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div><br>_______________________________________________<br>
gme-users mailing list<br>
<a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu</a><br>
<a href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users" target="_blank">http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users</a><br>
<br></blockquote></div><br></div>