I&#39;m also relatively new, but I understand it as follows:<br>All the widgets in the hierarchy define (or inherit) the create method that is used to setup widget. When you call the create method on FXApp object it recursively calls this method on all the child widgets and because of this all the widgets have a chance to execute their initialization/setup logic.<br>
<br><div class="gmail_quote">On Mon, Oct 27, 2008 at 9:53 PM, chen li <span dir="ltr">&lt;<a href="mailto:chen_li3@yahoo.com">chen_li3@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I am new to FxRuby. I am learning it by studying some code samples. Now I am confused about a method call in the following script:&nbsp; which class&nbsp; defines method&nbsp; create,&nbsp;class FXApp or HelloWindow/FXMainWindow? Based on the code, class HelloWindow/FXMainWindow defines method &#39;create&#39;. If this is true , the object from this class can response to the message. But here&nbsp;why does an object created by a different class FXApp response to method &#39;create&#39;?<br>

<br>
Thanks,<br>
<br>
Li<br>
<br>
<br>
<br>
<br>
<br>
<br>
require &#39;fox16&#39;<br>
<br>
include Fox<br>
<br>
class HelloWindow &lt; FXMainWindow<br>
&nbsp; def initialize(app)<br>
&nbsp;&nbsp;&nbsp; super(app, &quot;Hello, World!&quot;, :width =&gt; 200, :height =&gt; 100)<br>
&nbsp; end<br>
<br>
&nbsp; def create<br>
&nbsp;&nbsp;&nbsp; super<br>
&nbsp;&nbsp;&nbsp; show(PLACEMENT_SCREEN)<br>
&nbsp; end<br>
end<br>
<br>
app = FXApp.new<br>
HelloWindow.new(app)<br>
app.create<br>
app.run<br>
<br>
<br>
<br>
_______________________________________________<br>
fxruby-users mailing list<br>
<a href="mailto:fxruby-users@rubyforge.org">fxruby-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/fxruby-users" target="_blank">http://rubyforge.org/mailman/listinfo/fxruby-users</a><br>
</blockquote></div><br>