MillionMunkeys.net

 

PiMunkey Documentation ->

What's New

Version 1.5

  • Pi Programming now has chaining, like jQuery! Set operations return either the value being set, or a reference to the object, so that you can execute multiple actions in a single line of code.
    • When setting only a single property, the set functions return a reference to the value just set.
      • Example: parent.set("child", child).set("name", "Child's Name") // The first rest returns the child, so that you can set properties on it.
    • When setting multiple properties, or adding listeners and filters, the functions return a reference to the object.
      • Example: object.set({name:"My Name",phone:"555-1212"}).addListener("phone", findAreaCode);
  • Added a move(oldIndex,newIndex) function for reordering items within a Pi Object. (NOTE: The move() function does not call any listeners or filters.)
  • Added a removeAll() function that clears out the object of all data. (CAUTION: This action can not be reversed by any listeners or filters!)
  • [Javascript only] Added a destroy() function to clean up pi objects from Javascript memory.
  • [Javascript only] Added an extend() function to more easily create child objects that inherit from the basic PiObject using javascript's prototypical inheritance.
  • [Javascript only] Added an each() function that will execute a filter function for every item in the Pi object.
  • Exposed the internal variables as properties to make it easier to debug your applications. (Please don't modify them! Things will probably break.)

 

 

 

Follow Pete on Twitter

Copyright ©2010, MillionMunkeys® LLC, All Rights Reserved