[Catalyst-commits] r6500 - in trunk/Catalyst-Engine-Wx/demo/lib:
SampleApp/Controller SampleApp/Controller/Test SampleAppWx
eriam at dev.catalyst.perl.org
eriam at dev.catalyst.perl.org
Tue Jul 3 16:15:43 GMT 2007
Author: eriam
Date: 2007-07-03 16:15:42 +0100 (Tue, 03 Jul 2007)
New Revision: 6500
Added:
trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Test/
trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Test/And.pm
trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/display.pm
Modified:
trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Root.pm
trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/default.pm
Log:
The demo now deals with events and requests for controllers and methods
Modified: trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Root.pm 2007-07-03 15:14:59 UTC (rev 6499)
+++ trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Root.pm 2007-07-03 15:15:42 UTC (rev 6500)
@@ -8,14 +8,11 @@
__PACKAGE__->config->{namespace} = '';
sub default : Private {
- my ( $self, $c ) = @_;
-
- $c->stash->{books} = [$c->model('SampleAppDB::Book')->all];
-
- $c->forward('SampleApp::View::Wx');
- print $ENV{CATALYST_ENGINE}."\n";
- #$c->forward('SampleApp::View::TT');
-
+ my ( $self, $c ) = @_;
+
+ $c->stash->{books} = [$c->model('SampleAppDB::Book')->all];
+
+ $c->forward('SampleApp::View::Wx');
}
1;
Added: trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Test/And.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Test/And.pm (rev 0)
+++ trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Test/And.pm 2007-07-03 15:15:42 UTC (rev 6500)
@@ -0,0 +1,14 @@
+package SampleApp::Controller::Test::And;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use Test::More;
+
+sub display : Local {
+ my ( $self, $c ) = @_;
+
+ $c->stash->{class} = 'display';
+ $c->forward('SampleApp::View::Wx');
+}
+1;
Property changes on: trunk/Catalyst-Engine-Wx/demo/lib/SampleApp/Controller/Test/And.pm
___________________________________________________________________
Name: svn:keywords
+ "Id Date Revision Author LastChangedDate LastChangedRevision URL HeadURL"
Name: svn:eol-style
+ native
Modified: trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/default.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/default.pm 2007-07-03 15:14:59 UTC (rev 6499)
+++ trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/default.pm 2007-07-03 15:15:42 UTC (rev 6500)
@@ -4,7 +4,7 @@
use warnings;
use Wx ':everything';
-use Catalyst::Engine::Wx::Event qw(EVT EVT_QUIT EVT_CLOSE);
+use Catalyst::Engine::Wx::Event qw(EVT EVT_QUIT EVT_CLOSE EVT_LIST_ITEM_ACTIVATED);
use base 'Wx::Frame';
@@ -42,9 +42,13 @@
$list_ctrl->SetColumnWidth(0, -1);
$list_ctrl->SetColumnWidth(2, -1);
+# EVT_LIST_ITEM_ACTIVATED( $self, $list_ctrl, '/display' );
+ EVT_LIST_ITEM_ACTIVATED( $list_ctrl, $list_ctrl, 'Test::And->display' );
EVT_CLOSE( $self, sub { EVT_QUIT; } );
return 1;
}
+
+
1;
Added: trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/display.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/display.pm (rev 0)
+++ trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/display.pm 2007-07-03 15:15:42 UTC (rev 6500)
@@ -0,0 +1,31 @@
+package SampleAppWx::display;
+
+use strict;
+use warnings;
+
+use Wx ':everything';
+use Catalyst::Engine::Wx::Event qw(EVT EVT_QUIT EVT_CLOSE EVT_LIST_ITEM_ACTIVATED);
+
+#use base 'Wx::Frame';
+
+sub new {
+ my ($class, $catalyst, $c ) = @_;
+
+ Wx::MessageBox('test1', 'test2');
+ use Data::Dumper;
+
+ my $event = $c->stash->{'_event'};
+
+ print "_event = ".$event." \n";
+# print "_event = ".$event->GetIndex." \n";
+# print "_event = ".$c->stash->{'_event'}->GetItem->GetText." \n";
+
+
+# $event->Skip;
+
+# return 1;
+}
+
+
+
+1;
Property changes on: trunk/Catalyst-Engine-Wx/demo/lib/SampleAppWx/display.pm
___________________________________________________________________
Name: svn:keywords
+ "Id Date Revision Author LastChangedDate LastChangedRevision URL HeadURL"
Name: svn:eol-style
+ native
More information about the Catalyst-commits
mailing list