Constructor in PHP
いくらかのモジュールは、 Cube Legacy 2.1 上で動作することができないでしょう。原因のうちの 1 つは、継承クラスのコンストラクタがその基底クラスのコンストラクタを隠蔽することです。 Marijuana 氏は、この問題を指摘しました。しかし、私が思うに、そのようなコードを書いた開発者は、それを隠蔽することを意図していなかったでしょう。つまり、彼らは、 PHP の、ある仕様を知らなかったのではないかと思います。


class A {
var $mFuncB;

function A() {
$this->mFuncB =& new XCube_Delegate();
}

function funcB() {
$this->mFuncB->call();
}
}

class B extends A {
var $mFlag;

function B() {
$this->mFlag =& new Flag();
}
}

$instance =& new B();
$instance->funcB();


多くの開発者は、上記プログラムにおいて全く問題を感じないでしょう。しかし、 funcB() が呼ばれるとき、そのプログラムは、致命的エラーを上げます。mFuncB が初期化されないことが、その原因です。実は、他の一般のプログラミング言語と異なり、 PHP 言語では基底クラスのコンストラクタは自動的に実行されません。私は何度もこの問題にはまりました。

あなたがコンスラクタを書くとき、あなたは、規定クラスのコンストラクタを
parent キーワードを使って明示的に呼ばなければなりません。


class B extends A {
function B() {
parent::A();
}
}


それは、奇妙なコードです ! しかし、あなたが継承クラスに特定の初期化コードを持っていないならば、あなたは、コンストラクタを省略することができます。空のコンストラクタは必ず parent を呼ばなくてはいけないので、この仕様は、非常に有益です。私は、コンストラクタをしばしば省略します。

XOOPS Cube Legacy 2.1 において、いくらかのクラスは、それらのコンストラクタに追加の初期化コードを持ち始めました。従って、サブクラスが基底クラスのコンストラクタを隠す場合、それは、不互換性問題の原因であるかもしれません。開発者は、 PHP の仕様、及び、他の一般の言語の間の差異に注意する必要があります。

基底クラスのコンストラクタは、隠蔽されるべきでありません(たとえ
PHP でそれをすることが可能であるとしても)。従って、 XOOPS Cube のコーディング規則は、モジュール開発者のために、この問題に言及するでしょう。

  • PHP において、あなたは、必ずしも C++ 等々のようにコンストラクタをを書く必要がありません。
  • あなたがコンストラクタを書かなければならない場合は、他の言語との融和性のために、コンストラクタの先頭部分へ parentコールを挿入してください。

私は、プロフェッショナルのウェブプログラミングを知りません。しかし、コンストラクタを隠蔽することは、
PHP プログラマのための一般のチップではないでしょう。継承クラスのコンストラクタがその基底クラスのコンストラクタを隠蔽することは、継承の否定です。
|
Japanese community started to remove 'official' title
I and Mr. nobunobu take a business trip nearly every week this month. That's tough schedule. And it's the cause which makes development stop. After we will return from our business trip, we will release Beta 4 as the last release of this year. We already posted the change log and Mr. ayumi prepared the release news.

RC will be released next month. But, I have to go to the development camp of my company from Dec 30th to Jan 10th. Therefore, I can not touch XCube RC while I'm in the camp. The dev team will clear incomplete tasks as 'known issue'.

I don't have been able to develop XCube enough this month. I had few hours to do it as well as all other members. These days are final big test for the first dev team. In this final process, we will do the following:

  • We will move the official project page to sourceforge.net.
  • We will make the dev team open under some international conventions.
  • We will delegate the community management to hot users. Our opinion is that developers don't need to be leader of the community.

Until now, we have needed Japanese closed dev team for rapid development. But, we will be able to explain Cube's concept through source code in the near future. And, we will not need to discuss complex subjects in English. In other words, we will become able to finish closed team and Japanese team in the same time.

Because many Japanese like better the power game than open source development, our way will be discussed. I think Japanese people have freedom to do the power game. But, developers don't have any impositions to join it. In other words, developers have freedom to wish not to do the power game. Each freedom should be respected.

And, they who love the power game should not get the authority of the international project, just because they are Japanese people. XOOPS Cube is not for Japanese only. And, Japanese users are not special in XOOPS Cube. But, I think this concept brings true freedom to Japanese users at the last time.

xoopscube.org doesn't intervene in the administration of each community. We want to be friend of French and others, but we are not administrators in them. xoopscube.org is not the centralism to control others. Also Japanese community will get freedom.

If there are not hot users enough in Japan, XOOPS Cube community in Japan will be death. If there are hot users enough in Japan, XOOPS Cube community in Japan will evolve under free sky.

All results will be guided by not developers' impositions but users' zeal. I will receive any results Japanese users will choose, even if it is destruction.
|
BitmapFont on Content-Pipeline
An old XNA Extras had used System.XML, but it becomes unable to use because XNA Framework doesn't allow to reference System.XML. But, we can use great solution using Content-Pipeline. I found it in this thread.

In this thread, new XNAExtras Aaron Leiby have posted is a very good solution. This may be the quickest bitmap font solution I have seen. This converted XNAExtras makes it possible to load XML files generated by bmfontgen with content-pipeline.

  1. Build XNABaseWin or Xbox.
  2. Modify the reference of XNAImport and build it.
  3. Double-click the property of your game project and add XNAImport.dll to your content-pipeline.
  4. Add XNABase.dll as the reference of your project.
  5. Change properties of your XML files generated by bmfontgen. XNA Content Pipeline is true, Content Importer is BitmapFontImporter, Content Font Processor is BitmapFontProcessor.

Now, you can load your bitmap font as the following:

BitmapFont bitmapFont = content.Load<BitmapFont>(asset_name);
|
5 minutes episode
あるところに、ビギンズという男がいた。彼はスーパーマーケットへ出掛けて、カップヌードルを見つけた。その製品のラベルには「あなたは5分間でこれを料理できます」と書いてあり、そして値札には「たったの100円」と書かれていた。ビギンズはこの食料品を購入し、帰宅してその調理にとりかかった。

しかし、ビギンズは、カップヌードルの調理に必要なお湯を準備していなかった。そのうえ、そもそも湯を沸かすためのケトルを持っていなかった。彼は、店に戻り、そして、さらに
30分と2,000円を支払ってケトルを購入した。

こうして、カップヌードルはできあがったが、ビギンズが箸を持っていなかったために、食べることができなかった。彼はついに激怒し、店に戻ると、店員にこの食料品の不当表示について抗議を始めた。


ビギンズ: このラベルには5分間でこれを調理できると書いてある。しかし、湯がなかったら、5分間で調理することはできないじゃないか!

店員: お客様、ラベルをよくお読みになっていただければ分かるのですが……「お湯を加えて5分間」とあります。

ビギンズ: でも5分だよ、5分! 5は赤い色で強調されている。誰がそんな必要条件まで目をやるというんだ! それにレジ係が箸をくれなかったから結局食えなかったんだぞ!

店員:は、箸? お客様、なんのことでしょうか?

ビギンズ:このラベルは、「5分間で調理可能」と書いてある。言い換えれば、誰でも、簡単になんでもできるってことだろ! しかし、レジ係は箸をくれず、私は食えなかった! これは不当表示だ!

店員: ちょ……お待ちください、お客様。このラベルは「なんでも簡単にできる」なんて書いていません。このラベルはお湯が準備済みの場合の調理時間について言及しているだけです。

ビギンズ:でも5分だよ、5分! 5は赤い色で強調されている。この文面だと、初心の料理人なら「俺は何でも簡単にできるんだ」って期待するだろ!

店員:私はお客様が小学校から人生やり直すことを期待しますが。。。

ビギンズ:さらに、この値札は「たった100円」と書いてある。でも、私はケトルと箸を買うのにさらに2,100円使ったんだぞ! 私はこれが不当表示であると言わざるを得ない。

店員:。。。

ビギンズ:私はこの不当表示を警察に申告するつもりだ。

店員:私も警察呼んでいいでしょうか?


日本のコミュニティは「
PHPおよびMySQLが利用可能なサーバであれば、約 5 分でインストールでき、直ちに当サイトのようなユーザ登録型コミュニティサイトを立ち上げることが可能です」と書かれているウェルカムメッセージを取り除きます。ユーザーが「なんでもできる」と誤解してしまうためです。

このメッセージは
Cube以前の別の人々によって作られたものですが、私はこのメッセージをCubeのリリースまで保持すべきだと提案しました。なぜなら……私は日本が高い識字率を持つ先進国の一員であると思いこんでいたかったからです。(^^;
|
XNA Framework doesn't support drawing text
I had heard that XNA Framework RTM tries to enable to use fonts for drawing text on the screen. I have expected it, because most of game frameworks doesn't have such feature. But, according to this thread, it seems impossible to use fonts for drawing text. We will have to keep the solution using bitmap font textures.
|
XNA Express and Framework have been released
XNA Game Studio and XNA Framework have been released. We can build the game for Xbox 360. It's just cross-compile. But, it's impossible to share one project for PC and Xbox. That's a barrier for all developers.
|
Can't touch source code...
私が限定的なネットワーク環境の下であまりに忙しいので、私は現在ソースコードにさわることができません。XOOPS Cubeを開発するために、私は私の家に戻らなければなりません。しかし、私が毎晩私の家に戻ることは、不可能です。それに加えて、私が家に戻って来るとき、私には新しい服を準備するためのわずかな時間がありますが、他の仕事を行うことはできません。

現在、のぶのぶさんがフィックスとパッチをしています。しかし、彼も非常に忙しいです。

12月は、日本で最も忙しい月です。日本人は12月のことを「師走」と呼びます。「師走」は偉大な師匠も若者と同じように仕事を終えるためにあちこち走り回らなければならないことを意味している古語です。

ディベロッパー・チームのメンバーは、彼らの会社で彼らの仕事をしなければなりません。しかし、彼らはコミュニティにチェックすることをリクエストしました、そして、コミュニティはそれをするためにその最善を尽くします。我々は、RCの代わりに新たなベータを得るでしょう。

ところで、日本のサイトは、XOOPS Cubeの無政府主義において特別な公式サイトです。しかし、サイトは無政府主義に従い、そのサイト名からタイトルを取り除くでしょう。そして、ディベロッパー・チームはsourceforgeへ移動するでしょう。彼らはRCと同タイミングでそれをすることを望みました。しかし、彼らは独立した計画として計画を取り扱うかもしれません。少なくとも、日本のサイトは、他の国のサイトと同様にサイトのうちの1つであるというその更新計画を発表します。

私がクリスマスに家に帰ることがありえるように、ちょっとあなたの指を横切っておいてください。
|