Re: Basic OOP style app driving me crazy
| From: | Michael Crowl | Date: | Tue, 24 Jan 2006 09:18:07 +0000 |
| Subject: | Re: Basic OOP style app driving me crazy | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6560@lists.php.net to get a copy of this message | ||
Oh. My. God. Can't believe I missed that. Works.
Thank you, Malko, and thanks Christian for the help.
-- m
Malk0 wrote:
> Hi Michael,
>
> Doing things like Chirstian just said are good habits to take when
> working with pgp-gtk1, but
> at least your code work as is for me with this only change:
>
> class myApp() {
> become
> class myApp{
> and that's work!
>
> regards,
> nathan
>
> 2006/1/24, Christian Weiske <cweiske@cweiske.de>:
>
>>Michael,
>>
>>
>>>Well, I had fleshed out my app into a class, but it would never actually
>>>run, no errors, no shell window, nothing, on W2K.
>>>
>>>I've removed just about everything, and I can't even get a blank window
>>>to pop up... Halp!?
>>
>>>$app = new myApp();
>>>$app->run();
>>> function myApp() {
>>> $oWin = &$this->oWin;
>>> $oWin = &new GtkWindow();
>>
>>- use "&" when instantiating your own classes that have widgets, too
>>- switch the two $oWin lines
>>- move all the things from the constructor into a new funciton, then do
>>the following:
>>$app = new myApp();
>>$app->loadAllTheThings();
>>$app->run();
>>
>>Unfortunately I can't test the script myself as I have php-gtk2 only
>>installed.
>>
>>--
>>Regards/MfG,
>>Christian Weiske
>>
>>
>>
>
>
--
| Michael Crowl
| Web Developer
| octopus@serv.net