<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!-- body{padding:1ex;margin:0;font-family:sans-serif;font-size:small}a[href]{color:-moz-hyperlinktext!important;text-decoration:-moz-anchor-decoration}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em}blockquote blockquote{border-color:#006312}blockquote blockquote blockquote{border-color:#540000} --></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>
        Hi,</div>
<div>
         </div>
<div>
        I am trying to lean wx, so far IMHO the wxPerl code is easier to understand than wxPython in this case. What I'm going for is simplicity here. I'm going to ask some possibly newbie questions, I've search the web for answers but haven't come up with anything clear so I'm asking.</div>
<div>
         </div>
<div>
         </div>
<div>
        From a wxPerl program:</div>
<div>
         </div>
<div>
        use Wx;</div>
<div>
        package MyApp;</div>
<div>
        use base 'Wx::App';</div>
<div>
         </div>
<div>
         </div>
<div>
        What is difference between a module and a package?</div>
<div>
         </div>
<div>
        What exactly is MyApp? It's a package but I can't find any documentation on it. There's no "MyApp" in my C:\Perl folder...</div>
<div>
         </div>
<div>
        Tried to find info in "use base" keywords but no simple explainations. What does "use base" do?</div>
<div>
         </div>
<div>
         </div>
<div>
         </div>
<div>
        Here's the script:</div>
<div>
         </div>
<div>
        # load wxPerl main module<br />
        use Wx;<br />
        <br />
        # every application must create an application object<br />
        package MyApp;<br />
        use base 'Wx::App';<br />
        <br />
        sub OnInit {<br />
            <br />
            # parent window,  Window ID -1 means any,  # title,  # default position, # size<br />
            my $frame = Wx::Frame->new(  undef,  -1, 'wxPerl rules', [-1, -1], [250, 150]);<br />
            <br />
            $frame->Show( 1 );<br />
        }<br />
        <br />
        package main;<br />
        <br />
        # create the application object, this will call OnInit<br />
        my $app = MyApp->new;<br />
        # process GUI events from the application this function will not<br />
        # return until the last frame is closed<br />
        $app->MainLoop;</div>
<div>
         </div>
<div>
        Thanks</div>
</div></body></html>