<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 02/03/2018 à 13:00, Stéphane
      Mottelet a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:9346748e-5d1f-4b6f-8b4c-e1054ece8eb4@utc.fr">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class="moz-cite-prefix">Le 01/03/2018 à 23:44, Samuel Gougeon
        a écrit :<br>
      </div>
      <blockquote type="cite"
        cite="mid:db1e1be3-fe01-738c-f252-05978e30deb1@free.fr">Le
        01/03/2018 à 23:26, Stéphane Mottelet a écrit : <br>
        <blockquote type="cite">Le 01/03/2018 à 21:57, Stéphane Mottelet
          a écrit : <br>
          <blockquote type="cite">Hello, <br>
            <br>
            <blockquote type="cite">Le 1 mars 2018 à 20:18, Samuel
              Gougeon <a class="moz-txt-link-rfc2396E"
                href="mailto:sgougeon@free.fr" moz-do-not-send="true"><sgougeon@free.fr></a>
              a écrit : <br>
              <br>
              <blockquote type="cite">Le 01/03/2018 à 20:09, Stéphane
                Mottelet a écrit : <br>
                Hello, <br>
                <br>
                I have tried to implement a (naïve) hijacking mechanism
                that works *like a charm* under scilab 5.5.2: <br>
                <br>
                newfun('scilab_set',funptr('set')); <br>
                clearfun('set'); <br>
                function set(varargin) <br>
                    scilab_set(varargin(:)) <br>
                    printf("...\n") <br>
                endfunction <br>
                // test the hijacked "set" <br>
                f=gcf() <br>
                set(f,"tag","1") <br>
                f.tag="2" <br>
                <br>
                When I test this under  6.0.0 or 6.0.1, the last line
                always crashes Scilab. Is there an evident reason why ?
                When trying this on the command line (scilab -nw) <br>
                <br>
                <blockquote type="cite">--> set(f,"tag","1") <br>
                  ... <br>
                  <br>
                  --> f.tag="2" <br>
                  ... <br>
/Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab: line 972:
                  27117 Illegal instruction: 4  "$SCILABBIN" "$@" <br>
                </blockquote>
                I can see that the problem occurs *after* the insertion
                code f.tag="2" has delegated the operation to the
                hijacked "set", hence the crash occurs in the built-in
                function which does the insertion. In order to
                understand why this crash occurs (under Linux or OSX), I
                would like to know which module is in charge of the
                insertion for handles (a kind of %h_i but built-in) ? <br>
              </blockquote>
              You may have a look at <br>
SCI\modules\graphic_objects\src\cpp\setGraphicObjectProperty.cpp <br>
              and <br>
SCI\modules\graphic_objects\src\java\org\scilab\modules\graphic_objects\*
              <br>
            </blockquote>
            Hmm, the crash occurs *after* the property has been set. So
            my question was rather about the generic code that handles
            field insertion, which is delegated to “set” for handles. <br>
            <br>
            S. <br>
            <br>
          </blockquote>
          <br>
          I have localized many methods for handle type in
          modules/ast/src/cpp/types/graphichandle.cpp. Although I don't
          know much of C++, I can see that GraphicHandle::invoke is
          delegated to the overloaded %h_e macro, hence is an extraction
          method, but I am not able to find any *insertion* method in
          this file. Maybe someone knows ? <br>
        </blockquote>
        <br>
        Maybe <br>
        edit generic_i_h <br>
      </blockquote>
      I found it in modules/ast/src/cpp/ast/visitor_common.cpp<br>
      <br>
      When you don't have any idea of where to look, sometimes a "grep
      theStringToFind -r ." is useful : <br>
      <br>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2241" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2241" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2241</a>         else if (_pVar->isHandle())</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2242" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2242" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2242</a>         {</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2243" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2243" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2243</a>             if (_pArgs->size() == 1 && (*_pArgs)[0]->isString())</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2244" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2244" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2244</a>             {</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2245" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2245" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2245</a>                 //s(["x"])</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2246" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2246" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2246</a>                 types::GraphicHandle* pH = _pVar->getAs<types::GraphicHandle>();</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2247" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2247" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2247</a>                 types::String *pS = (*_pArgs)[0]->getAs<types::String>();</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2248" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2248" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2248</a>                 types::typed_list in;</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2249" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2249" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2249</a>                 types::typed_list out;</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2250" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2250" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2250</a>                 types::optional_list opt;</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2251" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2251" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2251</a> </div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2252" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2252" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2252</a>                 in.push_back(pH);</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2253" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2253" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2253</a>                 in.push_back(pS);</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2254" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2254" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2254</a>                 in.push_back(_pInsert);</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2255" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2255" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2255</a> </div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; color: rgb(0, 0, 0);"><a id="l2256" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2256" class="linenr" style="text-decoration: none; color: rgb(153, 153, 153);" moz-do-not-send="true">2256</a>                 types::Function* pCall = (types::Function*)symbol::Context::getInstance()->get(symbol::Symbol(L"set"));</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2257" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2257" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2257</a>                 if (pCall)</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2258" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2258" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2258</a>                 {</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2259" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2259" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2259</a>                     types::Callable::ReturnValue ret = pCall->call(in, opt, 1, out);</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2260" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2260" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2260</a>                     if (ret == types::Callable::OK)</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2261" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2261" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2261</a>                     {</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2262" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2262" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2262</a>                         pRet = _pVar;</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2263" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2263" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2263</a>                     }</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2264" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2264" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2264</a>                     else</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2265" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2265" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2265</a>                     {</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2266" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2266" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2266</a>                         throw ast::InternalError(ConfigVariable::getLastErrorMessage(), ConfigVariable::getLastErrorNumber(), e.getLocation());</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2267" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2267" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2267</a>                     }</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2268" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2268" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2268</a>                 }</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2269" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2269" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2269</a>             }</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2270" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2270" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2270</a>             else</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2271" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2271" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2271</a>             {</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2272" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2272" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2272</a>                 pRet = _pVar->getAs<types::GraphicHandle>()->insert(_pArgs, _pInsert);</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2273" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2273" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2273</a>             }</div>
      <div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;"><a id="l2274" href="http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/ast/src/cpp/ast/visitor_common.cpp;h=6379d14e630d747599fd48e0e9cfa907cab214cd;hb=b5bcf45d3328c87b56ed5d8f9dbec623504f7c9b#l2274" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none;" moz-do-not-send="true">2274</a>         }</div>
      <br>
      here one can see the delegation to "set" at line 2256...2259.
      However, the internal overload mechanism is still very obscure to
      me. Now that I can build scilab_master on my Linux machine, I have
      played a little bit and replaced lines 2246..2268 by the sole
      lines<br>
      <br>
      <span style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">pRet = callOverload(e, L"i", _pArgs, _pInsert, _pVar);
sciprint("after </span><span style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><span style="color: rgb(0, 0, 0); font-family: monospace; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">callOverload</span>\n")
</span>
      <p>then recompiled the ast module. The result is a scilab with a
        fully working graphics, e.g. typing "plot" without arguments
        works as usual and triggers a lot of handle insertions (a bunch
        of "after callOverload" are printed). However, there is no %h_i
        macro, so I don't understand by which miracle it could work.</p>
      <p>Antoine it think that you are the author of this file
        (/ast/src/cpp/ast/visitor_common.cpp) can you explain how it
        works ? <br>
      </p>
      <p>Thanks in advance,</p>
      <p>S.<br>
      </p>
    </blockquote>
    Ok, no miracle... in fact, if the callOverload is forced as
    explained above, then generic_i_h is called (thanks Samuel for your
    hint), and generic_i_h itself calls "set". So this is almost
    equivalent, besides the fact that "set" is called from a Scilab
    macro and not from visitor_common.cpp above. With this solution the
    hijacking I had proposed does not crash anymore. <br>
    <br>
    But after all these complications, I guess that there may be a more
    straightforward way of implementing new handle properties at the
    user level...<br>
    <br>
    S.<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a></pre>
  </body>
</html>