Prima::ObjectPrima::Object is a Perl module with Prima toolkit base classes. | |
Download |
Prima::Object Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Dmitry Karasik
- Publisher web site:
- http://search.cpan.org/~karasik/Prima-1.26/pod/Prima/Widget.pod
Prima::Object Tags
Prima::Object Description
Prima::Object is a Perl module with Prima toolkit base classes. Prima::Object is a Perl module with Prima toolkit base classes.SYNOPSIS if ( $obj-> isa('Prima::Component')) { # set and get a property my $name = $obj-> name; $obj->name( 'an object' ); # set a notification callback $obj-> onPostMessage( sub { shift; print "hey! I've received this: @_n"; }); # can set multiple properties. note, that 'name' and 'owner', # replace the old values, while onPostMessage are aggregated. $obj-> set( name => 'AnObject', owner => $new_owner, onPostMessage => sub { shift; print "hey! me too!n"; }, ); # de-reference by name $new_owner-> AnObject-> post_message(1,2); }Prima::Object and Prima::Component are the root objects of the Prima toolkit hierarchy. All the other objects are derived from the Component class, which in turn is the only descendant of Object class. Both of these classes are never used for spawning their instances, although this is possible using Prima::Component-> create( .. parameters ... );call. This document describes the basic concepts of the OO programming with Prima toolkit. Although Component has wider functionality than Object, all examples will be explained on Component, since Object has no descendant classes and all the functionality of Object is present in Component. Some of the information here can be found in Prima::internals as well, the difference is that Prima::internals considers the coding tasks from a C programmer's view, whereas this document is wholly about perl programming. Requirements: · Perl
Prima::Object Related Software