Re: Newbie questions
| From: | Madeleine D. | Date: | Tue, 18 Mar 2003 04:33:59 +0000 |
| Subject: | Re: Newbie questions | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3105@lists.php.net to get a copy of this message | ||
Alan -
Thanks for getting back to me.
1. My confusion with '$this' is that it appears to be an actual entity,
rather than just a variable. When I tried to setup a screen using,
say'$main_win' in place of the '$this' I'd seen in a tutorial, it
wouldn't
work.
2. If I don't add a second function inside my screen code, I get the
following error in the gtk error file:
'unable to call item factory callback mb_win::date_display....'
I only get my screen to work with the additional function.
3. This is good to know, as this is make or break for our project.
thanks again,
Madeleine D.
At 09:31 AM 3/18/2003 +0800, Alan Knowles wrote:
>Madeleine D. wrote:
>
>>Hi!
>>
>>Apologies in advance for very basic questions.
>>
>>We have decided to do a major new project in PHP/GTK in order to get the
>>cross-platform, Web-based future aspects that we need. I've spent some
>>time with the tutorials and some code snippets, so I have a rough idea of
>>the pieces and parts.
>>
>>But....
>>
>>1. Can anybody give me the idea behind the '$this' aspect? It appears
>>that this will matter to us because we want to have use ItemFactory calling
>>other screens off the main one.
>>
>
>$this is a self object pointer? - could you explain what you where asking.
>
>>
>>2. Is there anything written down about the general flow of processing?
>>For instance: I discovered today that, while I can include a function file
>>in my main php file (which then sets up the main window), I can't get to
>>the functions directly via the ItemFactory items. I have to setup another
>>function in the main window that calls the actual function in the external
>>function file. Why can't it get there, when the file has already been
>>included above?
>>
>when PHP includes a file, it
>a) loads all the function/class definitions and makes them available.
>b) runs any 'raw code in the file'
>
>so as long as you have included all the function/class files at the
>beginning you can use them at any point in the program there after.
>
>>
>>Example: mb.php includes functions.inc which has a date function
>> mb.php includes window.php which sets up the ItemFactory menu
>> one of the IF's calls the date function
>> window.php requires a function that calls the date function again
>>
>>3. Is there any problem with field edits? I.e., we need to check data and
>>entry as the user leaves the field.
>>
>Not as far as I'm aware - it's just a matter of tracking down the right
>event to use.
>
>Regards
>Alan
>
>>
>>Appreciate the help.
>>
>>Madeleine D.
>>
>>
>>
>>
>
>
>--
>Can you help out?
>Need Consulting Services or Know of a Job?
>http://www.akbkhome.com
>
>
>