[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] major `view.pike' revision
From: |
Gunnar Farnebäck |
Subject: |
Re: [gnugo-devel] major `view.pike' revision |
Date: |
Sat, 05 Jun 2004 01:27:14 +0200 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI) |
> First one question: there are lots of `static' modifiers across
> the script and many of them seem to be out of place (like the
> first: `static object engine'). As far as I know, `static' in
> Pike is the same as in C, in the engine case this means that all
> instances of `SimpleGtp' will share a single engine, which is
> not what we want, right?
I assume you mean C++ rather than C. But no, static in Pike does not
mean the same thing. It's closer to protected in C++. In this specific
case it means that the engine variable can only be reached from
methods in the class, not by direct indexing of an object. See
http://pike.ida.liu.se/docs/tutorial/oop/access_control.xml
for more information.
> So, are you (Gunnar? Arend?) sure that those `static' modifiers are
> there for good?
Yes, if anything there should be more of them.
> I also fixed some bugs in the script. For instance, some labels
> were aligned incorrectly (one should have used `set_alignment'
> instead of `set_justify').
That's great. I basically had no idea what I was doing when I wrote
the GTK code, so it was mostly hit and miss in the manual.
/Gunnar