Hi there,
I am seeking for the wisdom of yours to help me out with this.
I would like to pass a blessed object to MyApp ( the scenario is as in the
tutorial: http://wxperl.sourceforge.net/tutorial/tutorial3.html ).
In 'main' I try to say
my $app=myApp->new($obj)
Unfortunately, if I try this:
sub new {
my ($ref,$obj)=...@_;
my $self=$ref->SUPER::new($obj);
return $self;
}
I receive this error:
sub must be a CODE reference at .../Wx/App.pm line 36.
I would like to use this object from the frame I have created. Eg. I would
like to access the object from an event sub, like
sub OnClick {
my ($self,$even)=...@_;
$self->{myObject}->do_this()…
}
(simplified)
How can I pass an object either to the App, or the Frame itself?
Thanx for any hint.