Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Template:Nasal Constructor inline

From FlightGear wiki
Jump to: navigation, search
 # constructor, for making new objects
 new: func( arg... ) {
  # creates a temporary object that inherits from myClass
  # what is obj here, will later on be 'me' in the actual object
  var obj = { parents:[  myClass   ] };

  # do any other object setup here, such as for example
  obj.message = "Hello World";
 
  print("Creating new object/instance of type/template:myClass");    

  # return the object to the caller
  return obj;
 },