Changeset 15479 for docs

Show
Ignore:
Timestamp:
07/08/08 14:42:15 (5 months ago)
Author:
nowelium
Message:
 
Location:
docs/nowelium
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • docs/nowelium/ioDocs/IoGuide_ja.html

    r15432 r15479  
    6666<div class=indexItem><a href="#Concurrency-Futures">Future</a></div> 
    6767<div class=indexItem><a href="#Concurrency-Yield">Yield</a></div> 
    68 <div class=indexItem><a href="#Concurrency-Pause and Resume">一時停止と再開</a></div> 
     68<div class=indexItem><a href="#Concurrency-Pause-and-Resume">一時停止と再開</a></div> 
    6969 
    7070<div class=indexSection><a href="#Exceptions">例外</a></div> 
     
    748748<h3>継承</h3> 
    749749 
    750 When an object receives a message it looks for a matching slot, if not found, the lookup continues depth first recursively in its protos. Lookup loops are detected (at runtime) and avoided. If the matching slot contains an activatable object, such as a Block or CFunction, it is activated, if it contains any other type of value it returns the value. Io has no globals and the root object in the Io namespace is called the Lobby. 
    751 <p> 
    752 Since there are no classes, there's no difference between a subclass and an instance. Here's an example of creating a the equivalent of a subclass:  
     750あるオブジェクトが該当するスロットを探すようなメッセージを受けた場合、見つからなければ、その1階層深い proto へ再帰的に検査を続けます。 検査のループが見つかった場合には、検査は中断されます。 マッチするスロットに実行可能なオブジェクトがあれば、例えば Block や CFunction などの場合、それが実行され、値があればその値を返します。 Io にはグローバルオブジェクトはなく、Lobby という Io 名前空間のルートオブジェクトがあります。 
     751<p> 
     752クラスがないため、サブクラスとインスタンスの違いはありません。 以下は、サブクラスに相当するものを作成する例です: 
    753753 
    754754<pre> 
     
    757757</pre> 
    758758 
    759 The above code sets the Lobby slot "Dog" to a clone of the Object object. Notice it only contains a protos list contains a reference to Object. Dog is now essentially a subclass of Object. Instance variables and methods are inherited from the proto. If a slot is set, it creates a new slot in our object instead of changing the proto:  
     759上記のコードでは、Lobby の &quot;Dog&quot; スロットに Object オブジェクトのクローンをセットしています。 そのクローンは Object への参照を含む protos リストのみを持っています。 これで、本質的に Dog は Object のサブクラスとなります。 インスタンスの変数やメソッドはその proto から継承されます。 スロットがセットされた場合、proto は変更されず、作成したオブジェクトに新しいスロットを作成します: 
    760760 
    761761<pre> 
     
    768768<h4>多重継承</h4> 
    769769 
    770 You can add any number of protos to an object's protos list. When responding to a message, the lookup mechanism does a depth first search of the proto chain. 
     770あるオブジェクトのprotosリストには、protoを幾つでも追加できます。 メッセージへの応答の際、検査構造は1層目の proto チェーンから検査します。 
    771771 
    772772<a name="Objects-Methods"></a> 
    773773<h3>メソッド</h3> 
    774774 
    775 A method is an anonymous function which, when called, creates an object to store its locals and sets the local's proto pointer and its self slot to the target of the message. The Object method method() can be used to create methods. 例: 
     775メソッドは、呼び出された際、生成された際のオブジェクトをローカルに保存し、そのローカルの proto ポインタとそれ自身のスロットをターゲットにメッセージをセットする匿名の関数です。 Object メソッド method() でメソッドを作成することができます。 例: 
    776776 
    777777<pre> 
     
    786786</pre> 
    787787 
    788 The above code creates a new "subclass" of object named Dog and adds a bark slot containing a block that prints "woof!". メソッドを呼び出す例: 
     788上記コードは、Dog と名の付けられたオブジェクトの &quot;サブクラス&quot; を新たに作成し、&quot;woof!&quot; を出力するブロックである bark スロットを含んでいます。 メソッドを呼び出す例: 
    789789 
    790790<pre> 
     
    792792</pre> 
    793793 
    794 The default return value of a block is the  result of the last expression. 
     794ブロックのデフォルトの戻り値は、最後の式の結果になります。 
    795795 
    796796<h4>引数</h4> 
     
    12881288An object will automatically yield between processing each of its asynchronous messages. The yield method only needs to be called if a yield is required during an asynchronous message execution.  
    12891289 
     1290<a name="Concurrency-Pause-and-Resume"></a> 
    12901291<h4>一時停止と再開</h4> 
    12911292