<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.eiffelroom.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>eiffelroom - Eiffel - Comments</title>
 <link>http://www.eiffelroom.org/tag/eiffel</link>
 <description>Comments for &quot;Eiffel&quot;</description>
 <language>en</language>
<item>
 <title>I&#039;m not sure how I missed</title>
 <link>http://www.eiffelroom.org/blog/paulbates/high_hopes_for_gtk_on_osx#comment-507</link>
 <description>&lt;p&gt;I&#039;m not sure how I missed this post.  This is great news.&lt;/p&gt;

</description>
 <pubDate>Fri, 10 Oct 2008 15:07:26 -0700</pubDate>
 <dc:creator>clemahieu</dc:creator>
 <guid isPermaLink="false">comment 507 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>It seemed my comment got</title>
 <link>http://www.eiffelroom.org/blog/paulbates/high_hopes_for_gtk_on_osx#comment-500</link>
 <description>&lt;p&gt;It seemed my comment got lost in the digital cosmos! Let me try again...&lt;/p&gt;

&lt;p&gt;What would be the point compiling a GTK application to run on Windows, unless it was for legacy purposes? Surely you&#039;d just be using EiffelVision2?&lt;/p&gt;

</description>
 <pubDate>Tue, 07 Oct 2008 13:24:22 -0700</pubDate>
 <dc:creator>paulbates</dc:creator>
 <guid isPermaLink="false">comment 500 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Great!</title>
 <link>http://www.eiffelroom.org/blog/paulbates/high_hopes_for_gtk_on_osx#comment-497</link>
 <description>&lt;p&gt;Great! I am looking forward to see everything working.&lt;/p&gt;

&lt;p&gt;Related question: has anybody tried to get GTK+ working on Windows? Compile GEL applications that run on all three platforms?&lt;/p&gt;

</description>
 <pubDate>Sun, 28 Sep 2008 09:46:55 -0700</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 497 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Ah ha, 99, very clever!</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/in_case_you_did_not_know_c_s#comment-469</link>
 <description>&lt;p&gt;It&#039;s the oldest trick in the book, 99: &lt;em&gt;deterministic finalization&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Deterministic finalization, Max?&lt;/p&gt;

&lt;p&gt;Yes, 99, they used to use it in the old days. People even used to like it back then; some people even complained when they took deterministic finalization away and gave everyone &lt;em&gt;garbage collection&lt;/em&gt; instead. Can you believe it?&lt;/p&gt;

</description>
 <pubDate>Wed, 25 Jun 2008 05:42:46 -0700</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 469 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Yes, that&#039;s exactly what it</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/in_case_you_did_not_know_c_s#comment-468</link>
 <description>&lt;p&gt;Yes, that&#039;s exactly what it is. I wonder how many C++ programmer knows about such a subtle semantics.&lt;/p&gt;

&lt;p&gt;Surprisingly, today someone else posted another C++ odity &lt;a href=&quot;http://blogs.msdn.com/oldnewthing/archive/2008/06/23/8640472.aspx&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
 <pubDate>Mon, 23 Jun 2008 22:39:00 -0700</pubDate>
 <dc:creator>manus_eiffel</dc:creator>
 <guid isPermaLink="false">comment 468 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>It seems like getName</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/in_case_you_did_not_know_c_s#comment-467</link>
 <description>&lt;p&gt;It seems like getName creates a new string object and returns it by value.  It is copied on the stack of my_routine for the sole purpose of evaluating the expression my_obj-&amp;gt;getName().c_str().&lt;/p&gt;

&lt;p&gt;After the evaluation, the object goes out of scope and is therefore destroyed.  As I recall, c_str returns a pointer to the inner representation of the string object (probably for efficiency reasons, as most rationales in C/C++).&lt;/p&gt;

&lt;p&gt;When the string object is destroyed, its inner representation is freed.  The pointer fed to memcpy is therefore nothing but a dangling pointer which explains the erratic behavior you&#039;re talking of.&lt;/p&gt;

&lt;p&gt;The fact that you store it in a local variable delays the freeing of the inner representation of the string so memcpy can do its work properly.&lt;/p&gt;

&lt;p&gt;Am I close?&lt;/p&gt;

&lt;p&gt;Simon&lt;/p&gt;

</description>
 <pubDate>Mon, 23 Jun 2008 18:45:09 -0700</pubDate>
 <dc:creator>maverick</dc:creator>
 <guid isPermaLink="false">comment 467 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Not yet the answer but the</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/in_case_you_did_not_know_c_s#comment-466</link>
 <description>&lt;p&gt;Not yet the answer but the code that works:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;geshifilter c&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #993333;&quot;&gt;void&lt;/span&gt; my_routine &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;CppClass my_obj, &lt;span style=&quot;color: #993333;&quot;&gt;int&lt;/span&gt; buffer_count, &lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt; * buffer&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; std::&lt;span style=&quot;color: #993333;&quot;&gt;string&lt;/span&gt; l_str = my_obj-&amp;gt;getName&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #993333;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;char&lt;/span&gt; * l_cstr = l_str.&lt;span style=&quot;color: #202020;&quot;&gt;c_str&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; memcpy&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;buffer, l_cstr, buffer_count&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Go figure!&lt;/p&gt;

</description>
 <pubDate>Mon, 23 Jun 2008 16:32:18 -0700</pubDate>
 <dc:creator>manus_eiffel</dc:creator>
 <guid isPermaLink="false">comment 466 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Well, aside from Peter&#039;s</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/in_case_you_did_not_know_c_s#comment-465</link>
 <description>&lt;p&gt;Well, aside from Peter&#039;s comment about the actual size of the buffer, there is also the issue of not terminating the buffer.  The platform may assign more space to the buffer than was allocated (for alignment purposes), and the contents of that extra space are undefined.  If you do not terminate the buffer at location buffer_count then the contents of that space could be interpreted (most likely incorrectly) by the caller or whomever.  Also don&#039;t forget that buffer_count within the routine should be one larger than the result of my_obj-&amp;gt;getName().size(), and of course that&#039;s how large the buffer should be.  You need the room for the termination.  I&#039;m also assuming that you are just working with char-based strings here, and not wide characters.  You could be trying to copy a wide string into a char* for all I know, which means the size of the buffer needs to be even larger than I noted above.&lt;/p&gt;

&lt;p&gt;On a side note, if all you want to do is copy the contents of a std::string, please put it into another std::string.  Don&#039;t use char* if you don&#039;t have to.  If you&#039;re working with an API that requires the use of const char*, then just pass the result of the c_str() function to that API.  Don&#039;t bother with the annoyances of C-based memory management and C-based arrays if you can avoid it.&lt;/p&gt;

</description>
 <pubDate>Mon, 23 Jun 2008 06:37:26 -0700</pubDate>
 <dc:creator>steven.m.wurster</dc:creator>
 <guid isPermaLink="false">comment 465 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>You&#039;ve got me</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/in_case_you_did_not_know_c_s#comment-464</link>
 <description>&lt;p&gt;You&#039;ve got me, Manu. I can&#039;t see anything wrong, other than the obvious, typical memcpy() problem that we have no way of knowing whether buffer really does have buffer_count bytes in order to avoid a buffer overflow.&lt;/p&gt;

&lt;p&gt;Maybe some byte-alignment problem on certain platforms?&lt;/p&gt;

&lt;p&gt;I look forward to seeing the answer to this mind-twister! Who needs Sudoku when we have C++?&lt;/p&gt;

</description>
 <pubDate>Mon, 23 Jun 2008 02:58:53 -0700</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 464 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Oh yes, the BeBox</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/eiffel_on_haiku#comment-439</link>
 <description>&lt;p&gt;My BeBox 2x133 is taking on dust. Perhaps I should reactivate it to see if I can get Eiffel to work on it ;-)&lt;/p&gt;

&lt;p&gt;Nice job Manu, if I find some time I will have a look at your build - but it looks like the latest family extension is not keeping you sufficiently busy :D&lt;/p&gt;

</description>
 <pubDate>Sat, 10 May 2008 07:10:30 -0700</pubDate>
 <dc:creator>schoelle</dc:creator>
 <guid isPermaLink="false">comment 439 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>The contract viewer&#039;s right-click issue</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/inheriting_comments#comment-431</link>
 <description>&lt;p&gt;Paul, you mention three possible fixes for the right-click issue seen in the sneak preview of the contract viewer.&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt; The last would be sad, so let&#039;s not think about that.&lt;/li&gt;
    &lt;li&gt; The second would be disappointing: it&#039;s so neat that it pops up simply by hovering the mouse there.&lt;/li&gt;
    &lt;li&gt; The first is intriguing. You say that hovering the mouse over a feature would display a small beam. What would the user have to do, then, to open the contract viewer? Click on the beam? Move the mouse down a bit to hover over the beam? This sounds a bit disappointing too.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A fourth option would be to leave it as it is, but make sure that right-clicking works. Isn&#039;t this possible? If I try to right-click on a feature but the contract viewer has popped up unexpectedly, is there any reason why the right-click can&#039;t be forwarded to the feature stone underneath? (Not sure if I&#039;ve got my pebble-drop metaphors mixed up there, but you know what I mean.)&lt;/p&gt;

&lt;p&gt;Me, I&#039;d want to activate it via a keyboard shortcut rather than a mouse-hover, of course ;-)&lt;/p&gt;

</description>
 <pubDate>Thu, 28 Feb 2008 04:12:39 -0800</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 431 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>A few Notes</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/inheriting_comments#comment-430</link>
 <description>&lt;p&gt;We are aware of the right click issue and it will be addressed.&lt;/p&gt;

&lt;p&gt;I put a preview of the contract viewer in the editor to ensure any annoyances are worked out before the release. I mentioned this in one of the &lt;a href=&quot;http://dev.eiffel.com/EiffelStudio_6.2_Releases&quot;&gt;6.2 release notes&lt;/a&gt;, release 6.2.7.2075.&lt;/p&gt;

&lt;p&gt;There are a few things that might happen with this: &lt;ul&gt;
    &lt;li&gt; The drop down is shrunk to a small beam under the feature name text, so it does not pop up accidentally or get in the way.&lt;/li&gt;
    &lt;li&gt; The pop up time out will be longer so it does not pop up too soon, with a key modifier to show it immediately.&lt;/li&gt;
    &lt;li&gt; It will be removed.&lt;/li&gt;
&lt;/ul&gt;

&lt;/p&gt;

&lt;p&gt;We need to get this right because in the future the mechanism will be used in various forms throughout EiffelStudio. As it stands, what you see probably wont be what is released. There is quite a bit of logic already there to determine when to show the token options. Any feedback is welcome, we want to get this right without being annoying.&lt;/p&gt;

&lt;p&gt;In reference to Greg&#039;s remarks, it&#039;s not a tool tip. In the future you&#039;ll be editing contracts directly on the &amp;quot;assistance window&amp;quot;. As I&#039;ve said these types of windows will be placed through EiffelStudio in future releases, not just in the editor.&lt;/p&gt;

</description>
 <pubDate>Wed, 27 Feb 2008 16:47:14 -0800</pubDate>
 <dc:creator>paulbates</dc:creator>
 <guid isPermaLink="false">comment 430 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>I like it if it works</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/inheriting_comments#comment-429</link>
 <description>&lt;p&gt;I have no problem with this innovation. Where I get annoyed as a user is when an innovation gets in the way of standard user interface conventions. (Pick and drop is the classic example of that. Until recently, it impeded the use of context menus, and even today there is no drag and drop.) In 6.2.7.2437, we have this nice preview of the contracts tooltip, and I like it, but a couple of times already it has popped up when I was attempting to right-click a feature.&lt;/p&gt;

&lt;p&gt;The trouble with this sort of thing is that it&#039;s easy to prototype and get people saying &amp;quot;Wow!&amp;quot;, but it&#039;s very difficult to get it right. So I&#039;d be glad to see this in 6.2, as long as it&#039;s very thoroughly tested! I would expect to see an option in Preferences for turning it off.&lt;/p&gt;

</description>
 <pubDate>Wed, 27 Feb 2008 14:30:57 -0800</pubDate>
 <dc:creator>peter_gummer</dc:creator>
 <guid isPermaLink="false">comment 429 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>I&#039;m not sure if there is any</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/inheriting_comments#comment-428</link>
 <description>&lt;p&gt;I&#039;m not sure if there is any standard for tooltips, but if you look at Visual Studio they have something very similar. They do not have a button, but they have expandable tree views in the tool tip. Not exactly the same, but it looks like tooltips are not just messages anymore, you can interact with them.&lt;/p&gt;

</description>
 <pubDate>Mon, 25 Feb 2008 20:59:45 -0800</pubDate>
 <dc:creator>manus_eiffel</dc:creator>
 <guid isPermaLink="false">comment 428 at http://www.eiffelroom.org</guid>
</item>
<item>
 <title>Nice, but..</title>
 <link>http://www.eiffelroom.org/blog/manus_eiffel/inheriting_comments#comment-427</link>
 <description>&lt;p&gt;Shouldn&#039;t the &amp;quot;Edit Contracts...&amp;quot; button be in a popup menu instead of a tooltip?&lt;/p&gt;

&lt;p&gt;This seems like a very non-standard add-on to tooltip functionality. I do think the tooltip is a good idea, and I also believe strongly that Eiffel Vision should be migrating closer to supporting standard behavior rather than adding more departures from it.&lt;/p&gt;

&lt;p&gt;If it is documented as a standard for Windows or some other common user interface, could you please refer me to the document?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Greg&lt;/p&gt;

</description>
 <pubDate>Mon, 25 Feb 2008 12:40:53 -0800</pubDate>
 <dc:creator>gcompestine</dc:creator>
 <guid isPermaLink="false">comment 427 at http://www.eiffelroom.org</guid>
</item>
</channel>
</rss>
