Re: OOP Help, Accessing variable from within same class.





This is more basic perl than Gtk related, but I assume you use this class like:

Yeah sorry to pollute the Gtk list with this stuff.


my $dlg = ClassificationDialog->new;
$dlg->show;

If that's the case, at the start of the show function add:

my $self = shift;

and then access the title with:

$title = $self->{TITLE};

Thanks very much for this.  A lot tidier than my crack at it.


Object oriented perl stuff can be found in the perlobj, perlboot,
perltoot, perltooc, and perlbot sections of the perldoc.

Thanks for the reference to the documentation.  Have been reading through a few tutorials on the web but 
really just enough to get me into trouble.


      __________________________________________________________________________________
See what's on at the movies in your area. Find out now: http://au.movies.yahoo.com/session-times/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]