Re: Problem with one callback

"Germán Arias [email protected] [gobo-eiffel]" <[email protected]> Tue, 22 Oct 2019 13:18:02 -0600
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
--------------E264E4B475ADA5B232FDAC9B
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi Eric,

Don't worry, I was wrong in my assumption. I run my test application
with GOBO and Liberty Eiffel. And I notice the callback is called two
times when the panel is launched, receiving negative integer parameter.
Reading carefully the IUP documentation, it say this is the case, one
call occurs before the launch and other after the launch of the panel. I
don't notice this because this is not a problem with Liberty Eiffel.
This index is the position of the parameter changed by the user at the
panel (>=3D 0). It seems that even when the index is negative you are able
to retrieve a value (a pointer to a string). In Liberrty Eiffel I have:


if p.is_not_null then

 =C2=A0=C2=A0=C2=A0 create my_string.from_external_copy(a_pointer)


In GOBO I have:


if attached int_get_attribute (handle, $(name.to_c)) as p then

 =C2=A0=C2=A0=C2=A0 create my_string.make_from_c(a_pointer)


In Liberty Eiffel the pointer is copied, but in GOBO I don't found a
similar routine (at least in ISE Eiffel documentation). It seems that
this difference is causing the segmentation fault.

Germ=C3=A1n


On 10/22/19 12:34 AM, Eric Bezault ericb-D6Qt/9opevxWk0Htik3J/[email protected] [gobo-eiffel] wrote:
>
> On 22/10/2019 7:54, Germ=C3=A1n Arias [email protected] [gobo-eiffel] wr=
ote:
> >
> > When you pass a routine as a parameter, this is
> > executed (I did not know this).
>
> Do you mean in the Eiffel code, as in:
>
> f ($g)
>
> or in the C code? You said that it did not happen with
> LibertyEiffel, so I guess that it's in the Eiffel code.
> If so, I did not know that gec would do that. Did
> you commit some code in Github that I could look at?
>
> --
> Eric Bezault
> mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected]
> http://www.gobosoft.com
>
>=20

--------------E264E4B475ADA5B232FDAC9B
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable





<head>

<style type=3D"text/css">
<!--

/* start of attachment style */
       .ygrp-photo-title{
         clear: both;
         font-size: smaller;
         height: 15px;
         overflow: hidden;
         text-align: center;
         width: 75px;
       }
       div.ygrp-photo{
         background-position: center;
         background-repeat: no-repeat;
         background-color: white;
         border: 1px solid black;
         height: 62px;
         width: 62px;
       }

       div.photo-title=20
         a,
         div.photo-title a:active,
         div.photo-title a:hover,
         div.photo-title a:visited {
           text-decoration: none;=20
       }

       div.attach-table div.attach-row {
         clear: both;
       }

       div.attach-table div.attach-row div {
         float: left;
         /* margin: 2px;*/
       }

       p {
         clear: both;
         padding: 15px 0 3px 0;
	 overflow: hidden;
       }

       div.ygrp-file {
         width: 30px;
         valign: middle;
       }
       div.attach-table div.attach-row div div a {
         text-decoration: none;
       }

       div.attach-table div.attach-row div div span {
         font-weight: normal;
       }

       div.ygrp-file-title {
         font-weight: bold;
       }
 /* end of attachment style */
        -->
        </style>
        </head>
<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8=
">
  </head>
  <body>


<!-- |**|begin egp html banner|**| -->

<br><br>

<!-- |**|end egp html banner|**| -->



    <p>Hi Eric,<br>
    </p>
    <p>Don't worry, I was wrong in my assumption. I run my test
      application with GOBO and Liberty Eiffel. And I notice the
      callback is called two times when the panel is launched, receiving
      negative integer parameter. Reading carefully the IUP
      documentation, it say this is the case, one call occurs before the
      launch and other after the launch of the panel. I don't notice
      this because this is not a problem with Liberty Eiffel. This index
      is the position of the parameter changed by the user at the panel
      (&gt;=3D 0). It seems that even when the index is negative you are
      able to retrieve a value (a pointer to a string). In Liberrty
      Eiffel I have:</p>
    <p><br>
    </p>
    <p>if p.is_not_null then<br>
    </p>
    <p>=C2=A0=C2=A0=C2=A0 create my_string.from_external_copy(a_pointer)</p=
>
    <p><br>
    </p>
    <p>In GOBO I have:</p>
    <p><br>
    </p>
    <p>if attached int_get_attribute (handle, $(name.to_c)) as p then<br>
    </p>
    <p>=C2=A0=C2=A0=C2=A0 create my_string.make_from_c(a_pointer)</p>
    <p><br>
    </p>
    <p>In Liberty Eiffel the pointer is copied, but in GOBO I don't
      found a similar routine (at least in ISE Eiffel documentation). It
      seems that this difference is causing the segmentation fault.</p>
    <p>Germ=C3=A1n</p>
    <p><br>
    </p>
    <div class=3D"moz-cite-prefix">On 10/22/19 12:34 AM, Eric Bezault
      <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:[email protected]=
om">ericb-D6Qt/9opevxWk0Htik3J/[email protected]</a> [gobo-eiffel] wrote:<br>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:ef3c1935-f94a-4612-3197-fb26bbbb0c84-D6Qt/9opevxWk0Htik3J/[email protected]">
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF=
-8">
      <span style=3D"display:none">=C2=A0</span>
=20=20=20=20=20=20
          <div id=3D"ygrp-text">
            <p>On 22/10/2019 7:54, Germ=C3=A1n Arias <a class=3D"moz-txt-li=
nk-abbreviated" href=3D"mailto:[email protected]">[email protected]</a>
              [gobo-eiffel] wrote:<br>
              &gt; <br>
              &gt; When you pass a routine as a parameter, this is <br>
              &gt; executed (I did not know this).<br>
              <br>
              Do you mean in the Eiffel code, as in:<br>
              <br>
              f ($g)<br>
              <br>
              or in the C code? You said that it did not happen with<br>
              LibertyEiffel, so I guess that it's in the Eiffel code.<br>
              If so, I did not know that gec would do that. Did<br>
              you commit some code in Github that I could look at?<br>
              <br>
              -- <br>
              Eric Bezault<br>
              <a class=3D"moz-txt-link-freetext" href=3D"mailto:ericb@gobos=
oft.com">mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected]</a><br>
              <a class=3D"moz-txt-link-freetext" href=3D"http://www.gobosof=
t.com">http://www.gobosoft.com</a><br>
            </p>
          </div>
=20=20=20=20=20=20=20=20=20=20
      <style type=3D"text/css">
  <!--
  #ygrp-mkp {
  border: 1px solid #d8d8d8;
  font-family: Arial;
  margin: 10px 0;
  padding: 0 10px;
}

#ygrp-mkp hr {
  border: 1px solid #d8d8d8;
}

#ygrp-mkp #hd {
  color: #628c2a;
  font-size: 85%;
  font-weight: 700;
  line-height: 122%;
  margin: 10px 0;
}

#ygrp-mkp #ads {
  margin-bottom: 10px;
}

#ygrp-mkp .ad {
  padding: 0 0;
}

#ygrp-mkp .ad p {
  margin: 0;
}

#ygrp-mkp .ad a {
  color: #0000ff;
  text-decoration: none;
}
  #ygrp-sponsor #ygrp-lc {
  font-family: Arial;
}

#ygrp-sponsor #ygrp-lc #hd {
  margin: 10px 0px;
  font-weight: 700;
  font-size: 78%;
  line-height: 122%;
}

#ygrp-sponsor #ygrp-lc .ad {
  margin-bottom: 10px;
  padding: 0 0;
}

  #actions {
    font-family: Verdana;
    font-size: 11px;
    padding: 10px 0;
  }

  #activity {
    background-color: #e0ecee;
    float: left;
    font-family: Verdana;
    font-size: 10px;
    padding: 10px;
  }

  #activity span {
    font-weight: 700;
  }

  #activity span:first-child {
    text-transform: uppercase;
  }

  #activity span a {
    color: #5085b6;
    text-decoration: none;
  }

  #activity span span {
    color: #ff7900;
  }

  #activity span .underline {
    text-decoration: underline;
  }

  .attach {
    clear: both;
    display: table;
    font-family: Arial;
    font-size: 12px;
    padding: 10px 0;
    width: 400px;
  }

  .attach div a {
    text-decoration: none;
  }

  .attach img {
    border: none;
    padding-right: 5px;
  }

  .attach label {
    display: block;
    margin-bottom: 5px;
  }

  .attach label a {
    text-decoration: none;
  }

  blockquote {
    margin: 0 0 0 4px;
  }

  .bold {
    font-family: Arial;
    font-size: 13px;
    font-weight: 700;
  }

  .bold a {
    text-decoration: none;
  }

  dd.last p a {
    font-family: Verdana;
    font-weight: 700;
  }

  dd.last p span {
    margin-right: 10px;
    font-family: Verdana;
    font-weight: 700;
  }

  dd.last p span.yshortcuts {
    margin-right: 0;
  }

  div.attach-table div div a {
    text-decoration: none;
  }

  div.attach-table {
    width: 400px;
  }

  div.file-title a, div.file-title a:active, div.file-title a:hover, div.fi=
le-title a:visited {
    text-decoration: none;
  }

  div.photo-title a, div.photo-title a:active, div.photo-title a:hover, div=
...photo-title a:visited {
    text-decoration: none;
  }

  div#ygrp-mlmsg #ygrp-msg p a span.yshortcuts {
    font-family: Verdana;
    font-size: 10px;
    font-weight: normal;
  }

  .green {
    color: #628c2a;
  }

  .MsoNormal {
    margin: 0 0 0 0;
  }

  o {
    font-size: 0;
  }

  #photos div {
    float: left;
    width: 72px;
  }

  #photos div div {
    border: 1px solid #666666;
    height: 62px;
    overflow: hidden;
    width: 62px;
  }

  #photos div label {
    color: #666666;
    font-size: 10px;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
    width: 64px;
  }

  #reco-category {
    font-size: 77%;
  }

  #reco-desc {
    font-size: 77%;
  }

  .replbq {
    margin: 4px;
  }

  #ygrp-actbar div a:first-child {
   /* border-right: 0px solid #000;*/
    margin-right: 2px;
    padding-right: 5px;
  }

  #ygrp-mlmsg {
    font-size: 13px;
    font-family: Arial, helvetica,clean, sans-serif;
    *font-size: small;
    *font: x-small;
  }

  #ygrp-mlmsg table {
    font-size: inherit;
    font: 100%;
  }

  #ygrp-mlmsg select, input, textarea {
    font: 99% Arial, Helvetica, clean, sans-serif;
  }

  #ygrp-mlmsg pre, code {
    font:115% monospace;
    *font-size:100%;
  }

  #ygrp-mlmsg * {
    line-height: 1.22em;
  }

  #ygrp-mlmsg #logo {
    padding-bottom: 10px;
  }


  #ygrp-msg p a {
    font-family: Verdana;
  }

  #ygrp-msg p#attach-count span {
    color: #1E66AE;
    font-weight: 700;
  }

  #ygrp-reco #reco-head {
    color: #ff7900;
    font-weight: 700;
  }

  #ygrp-reco {
    margin-bottom: 20px;
    padding: 0px;
  }

  #ygrp-sponsor #ov li a {
    font-size: 130%;
    text-decoration: none;
  }

  #ygrp-sponsor #ov li {
    font-size: 77%;
    list-style-type: square;
    padding: 6px 0;
  }

  #ygrp-sponsor #ov ul {
    margin: 0;
    padding: 0 0 0 8px;
  }

  #ygrp-text {
    font-family: Georgia;
  }

  #ygrp-text p {
    margin: 0 0 1em 0;
  }

  #ygrp-text tt {
    font-size: 120%;
  }

  #ygrp-vital ul li:last-child {
    border-right: none !important;
  }
  -->
  </style>
=20=20=20=20=20=20
=20=20=20=20=20=20
      <!-- end group email -->
    </blockquote>
=20=20



<!-- |**|begin egp html banner|**| -->

<br>


<br>

<!-- |**|end egp html banner|**| -->


<div width=3D"1" style=3D"color: white; clear: both;"/>__._,_.___</div>

=20=20=20=20=20=20
=20=20

=20=20=20=20
    <div id=3D"fromDMARC" style=3D"clear:both; margin-top: 10px;">
         <hr style=3D"height:2px ; border-width:0; color:#E3E3E3; backgroun=
d-color:#E3E3E3;">
         Posted by: =3D?UTF-8?Q?Germ=3Dc3=3Da1n_Arias?=3D &lt;germanandre@g=
mx.es&gt;         <hr style=3D"height:2px ; border-width:0; color:#E3E3E3; =
background-color:#E3E3E3;">
    </div>
<!-- Start Recommendations -->
<!-- End Recommendations -->


<!-- |**|begin egp html banner|**| -->

<br><br>
<tt>
To Post a message, send it to:&nbsp;&nbsp; [email protected]<BR>
To Unsubscribe, send a blank message to: gobo-eiffel-unsubscribe-B11MqFFcr06IwRZHo2/[email protected]=
m</tt>
<br><br>

<!-- |**|end egp html banner|**| -->



<!-- |**|begin egp html banner|**| -->

  <img src=3D"http://geo.yahoo.com/serv?s=3D97476590/grpId=3D1522270/grpspI=
d=3D1705006764/msgId=3D1885/stime=3D1571778477" width=3D"1" height=3D"1"> <=
br>

<!-- |**|end egp html banner|**| -->

=20=20=20=20
<!-- |**|begin egp html banner|**| -->

<br>



=20=20=20
=20=20=20=20=20
=20
        <!-- |**|begin egp html banner|**| -->
        <div id=3D"ygrp-vital" style=3D"background-color: #f2f2f2; font-fam=
ily: Verdana; font-size: 10px; margin-bottom: 10px; padding: 10px;">

        <span id=3D"vithd" style=3D"font-weight: bold; color: #333; text-tr=
ansform: uppercase; "><a href=3D"https://groups.yahoo.com/neo/groups/gobo-e=
iffel/info;_ylc=3DX3oDMTJlcXBwdDgxBF9TAzk3MzU5NzE0BGdycElkAzE1MjIyNzAEZ3Jwc=
3BJZAMxNzA1MDA2NzY0BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTU3MTc3ODQ3Nw--" style=
=3D"text-decoration: none;">Visit Your Group</a></span>

     <ul style=3D"list-style-type: none; margin: 0; padding: 0; display: in=
line;">
                                                    </ul>
  </div>


<div id=3D"ft" style=3D"font-family: Arial; font-size: 11px; margin-top: 5p=
x; padding: 0 2px 0 0; clear: both;">
  <a href=3D"https://groups.yahoo.com/neo;_ylc=3DX3oDMTJkOHBjdW80BF9TAzk3ND=
c2NTkwBGdycElkAzE1MjIyNzAEZ3Jwc3BJZAMxNzA1MDA2NzY0BHNlYwNmdHIEc2xrA2dmcARzd=
GltZQMxNTcxNzc4NDc3" style=3D"float: left;"><img src=3D"https://s.yimg.com/=
ru/0.9.12/min/css/yahoo_en-US_f_pw_101x21.png" height=3D"21" width=3D"101" =
alt=3D"Yahoo! Groups" style=3D"border: 0;"/></a>
  <div style=3D"color: #747575; float: right;"> &bull; <a href=3D"https://i=
nfo.yahoo.com/privacy/us/yahoo/groups/details.html" style=3D"text-decoratio=
n: none;">Privacy</a> &bull; <a href=3D"mailto:gobo-eiffel-unsubscribe@yaho=
ogroups.com?subject=3DUnsubscribe" style=3D"text-decoration: none;">Unsubsc=
ribe</a> &bull; <a href=3D"https://info.yahoo.com/legal/us/yahoo/utos/terms=
/" style=3D"text-decoration: none;">Terms of Use</a> </div>
</div>

<!-- |**|end egp html banner|**| -->

  </div> <!-- ygrp-msg -->

=20=20=20


  <br>

<!-- |**|end egp html banner|**| -->


<div style=3D"color: white; clear: both;"/>__,_._,___</div>
</body>
</html>

--------------E264E4B475ADA5B232FDAC9B--