VMWare Fusion入れてみた
メモリ4GBに増設したので、いよいよVMWare FusionとVistaの登場。
VMWare Fusionのインストール
CDを入れてインストールスタート。Macのインストーラにもやっとなれてきた。
とくにカスタマイズ項目もなくすんなりインストール完了。
バージョンが1.1.1と古かったので、最新版を落としてくる。
- http://www.act2.com/products/fusion/
- 右側のダウンロード「アップデータ」からシリアルナンバーを入力してダウンロード
仮想マシンにWindows Vista
- VMWare Fusionを起動
- 仮想マシンの「新規作成」
- はじめに
- きたな
- オペレーティング システムの選択
- OS:「Microsoft Windows」
- Version:「Windows Vista」
- 名前
- 別名で保存: 「Windows Vista」(変更なし)
- 保存先: 「仮想マシン」(変更なし)
- 別名?まあいいか
- 仮想ハード ディスク
- ディスクサイズ: 20GB(変更なし)
- 詳細オプション変更せず
- Windows 簡易インストール
- プロダクトキーを入力して進む
- 小文字で打っても自動で大文字に!
- 5文字ごとに自動的にハイフンが!
- 便利な世の中ですわね
- プロダクトキーを入力して進む
- 終了
- Windows Vistaのディスクを入れるとOSのインストールが自動でスタート
Mac OS X 再インストール
iMac 買って OS 再インストールしてみている記録。Mac はじめてなのでよくわからんです、ハイ。
id:amachang:20080318:1205824212 が大変参考になりました。ありがとうございます!
インストール準備
インストール開始
設定アシスタント
- Welcomeムービー
- ちょっと長くね?
- Command + Q! Q! Q!
- 無駄だった(´・ω・`)
- ようこそ
- まいど。
- 「続ける」クリック
- キーボード入力環境
- 「ことえり」選択
- 「続ける」クリック
- すでに Mac をお持ちですか?
- いいえ
- 「情報を今すぐ転送しない」選択(デフォルトでされてた)
- 「続ける」クリック
- Apple ID を入力
- 入力
- 「続ける」クリック
- ユーザ登録の情報
- 埋まってる!こわっ
- 「続ける」クリック
- 適当に質問に答える
- 「続ける」クリック
- ローカルアカウントの作成
- 適当に入力する
- 「続ける」クリック
- 写真
- カメラはいやん
- 適当に選ぶ
- Macの楽しさをインターネットにも
- いらなーい
- .Macのフリートライアル
- いらなーい
- ご登録ありがとうございました
- 長かったよ(100質の最後みたいな気分)
- 「Go」クリック
ということで再インストール完了。
疲れたので、ソフトウェア・アップデートだけやって寝るー。
recursiveIteratorIteratorでinner iteratorのメソッドが呼べるのはなぜ?
以前のエントリ id:balibali:20080518:1211129576 でオーバーライドがどうとか言っていた件ですが、いまだよくわからず、もうちょっとシンプルなサンプルコードを書いてみました。
<?php class Sample extends recursiveArrayIterator { function test() { echo 'This is a test.' . "\n"; } } $iterator = new recursiveIteratorIterator(new Sample()); $iterator->test();
で実行結果が、
$ php -f sample.php
This is a test.
Sample::test() はどうやって呼ばれているのでしょう??
リフレクション使って中身確認。
<?php ... ReflectionObject::export($iterator);
Object of class [ <internal:SPL> <iterateable> class RecursiveIteratorIterator implements Iterator, Traversable, OuterIterator ] { - Constants [4] { Constant [ integer LEAVES_ONLY ] { 0 } Constant [ integer SELF_FIRST ] { 1 } Constant [ integer CHILD_FIRST ] { 2 } Constant [ integer CATCH_GET_CHILD ] { 16 } } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Dynamic properties [0] { } - Methods [18] { Method [ <internal:SPL, ctor> public method __construct ] { - Parameters [3] { Parameter #0 [ <required> Traversable $iterator ] Parameter #1 [ <optional> $mode ] Parameter #2 [ <optional> $flags ] } } Method [ <internal:SPL, prototype Iterator> public method rewind ] { } Method [ <internal:SPL, prototype Iterator> public method valid ] { } Method [ <internal:SPL, prototype Iterator> public method key ] { } Method [ <internal:SPL, prototype Iterator> public method current ] { } Method [ <internal:SPL, prototype Iterator> public method next ] { } Method [ <internal:SPL> public method getDepth ] { } Method [ <internal:SPL> public method getSubIterator ] { - Parameters [1] { Parameter #0 [ <optional> $level ] } } Method [ <internal:SPL, prototype OuterIterator> public method getInnerIterator ] { } Method [ <internal:SPL> public method beginIteration ] { } Method [ <internal:SPL> public method endIteration ] { } Method [ <internal:SPL> public method callHasChildren ] { } Method [ <internal:SPL> public method callGetChildren ] { } Method [ <internal:SPL> public method beginChildren ] { } Method [ <internal:SPL> public method endChildren ] { } Method [ <internal:SPL> public method nextElement ] { } Method [ <internal:SPL> public method setMaxDepth ] { - Parameters [1] { Parameter #0 [ <optional> $max_depth ] } } Method [ <internal:SPL> public method getMaxDepth ] { } } }
このリストには、test() というメソッドはない。
マジックメソッドの __call()*1 とか定義してあるなら話は早いのですが、それもなさげ。
んーんーーんーーーということで悩み中です。