This server's WikiTalk has 46 different types built in. These include simple types like String and Number, fancy types like DateTime and TimeSpan, and wiki specific types like Topic and TopicChange. Each server installation can add to the list of types, but is not possible to add new types from WikiTalk programs. See WikiTalkTypeHierarchy for the complete list of types.
Each type defines a set of properties and methods collectively called members. See WikiTalkMembers.
It is possible to ask an object what type it is using the Type property. For example:
DateTime.Now.Type
will answer back the type of the Now DateTime object (obviously a DateTime). For another example:
"hello world".Length.Type
will answer back the type of the length of the string "hello world". The length is 11 and the type of 11 is Integer.
What good is a type, anyway?
Types are typically used to perform Reflection operations (see WikiTalkReflection). For example, once you have the DateTime type, you can ask it questions -- e.g., what properties and methods to you have. In fact that is exactly how the list above is generated. Specifically, a Type has a property called Members which answers a collection of WikiTalkMember objects, each of which define a property or method of the associated type.
Getting your hands on a Type
There are two way to get to a type. The first is by asking an object for its type:
DateTime.Now.Type
100.Type
topic.Type
These will all answer back an appropriate Type object.
All of the WikiTalk types also are simply accessible by name in WikiTalk:
DateTime.Now
In the above expression, DateTime is the DateTime type.
The other useful thing about Types
As you can see in the above example, Types have not only general things you can ask them that apply to all types (e.g., what are the properties that instances of you have?). Many Types also have specific properties or methods that are only applicable to that type. Now is an example of such a property; it only makes sense for DateTime.
If every object has a type, what happens when you ask a Type for its Type?
Well, it turns out you get another kind of object called a MetaType. Each Type has a corresponding MetaType. This MetaType object can answer back information about the Type (as opposed to the Type which generally answers back information about its instances).
This can be pretty confusing, so I'll give an example:
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
So, when I say DateTime.Now, what is Now a property of? It's clearly not a property of DateTime (see the above list ). Instead, it is part of the DateTypeMetaType (designated DateTimeType). if I ask this object (DateTimeType) for its members, I'll get something very different:
topic.LastModified.Type.Type.Members.Collect
{ e | [" *", e.Signature, Newline]}
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk is a language for including dynamic content in FlexWiki topics.
9/12/2007 3:15:49 PM - -10.10.192.22
WikiTalk is a language for including dynamic content in FlexWiki topics.
9/12/2007 3:15:49 PM - -10.10.192.22
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk is a language for including dynamic content in FlexWiki topics.
9/12/2007 3:15:49 PM - -10.10.192.22
Listing of WikiTalk types generated by reflection with drill-down to properties, functions and selected examples.
9/12/2007 3:08:17 PM - -10.10.192.22
A WikiTalk member is either a property or a method of an object
9/12/2007 3:23:21 PM - -10.10.192.22
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
Reflection is the ability, in WikiTalk, to inspect the WikiTalk language system itself. For example, to walk through all of the types of WikiTalk objects and ask them what properties they have...
9/12/2007 3:14:51 PM - -10.10.192.22
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
A WikiTalk member is either a property or a method of an object
9/12/2007 3:23:21 PM - -10.10.192.22
WikiTalk is a language for including dynamic content in FlexWiki topics.
9/12/2007 3:15:49 PM - -10.10.192.22
WikiTalk is a language for including dynamic content in FlexWiki topics.
9/12/2007 3:15:49 PM - -10.10.192.22
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary
7/20/2007 10:09:42 PM - -10.10.192.236
WikiTalk DateTime information from ReflectionLibrary