CPAINT :: Cross-Platform Asynchronous INterface Toolkit

Please note: CPAINT nor this website is under active development.

Frontend: cpaint_result_object.find_item_by_type()

cpaint_result_object
Method Summary

object find_item_by_type()
void set_attribute()
mixed get_attribute()

cpaint_result_object
Property Summary

mixed data

object find_item_by_type ( string type, string id )

Returns a subnode with the given type and id.

Class

cpaint_result_object

Parameters

» string typeThe type of the subnode. Equivalent to the XML tag name.
» string idThe id of the subnode. Equivalent to the XML tag names id attribute.

Return Value

» object cpaint_result_object

API Tags

» Access: public

Description

This method exists to be able to retrieve a single well-known item with a given id directly.

Subnodes of identical type are always available as array object.type but we would have to iterate through this array and test subnode.get_attribute('id') until we find the correct subnode without this method.