[Catalyst-commits] r7114 -
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx
eriam at dev.catalyst.perl.org
eriam at dev.catalyst.perl.org
Fri Nov 9 17:50:53 GMT 2007
Author: eriam
Date: 2007-11-09 17:50:52 +0000 (Fri, 09 Nov 2007)
New Revision: 7114
Modified:
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx/Event.pm
Log:
Test if parent control is defined.
Modified: trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx/Event.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx/Event.pm 2007-11-09 17:39:38 UTC (rev 7113)
+++ trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx/Event.pm 2007-11-09 17:50:52 UTC (rev 7114)
@@ -22,16 +22,18 @@
s u b _ p o s t _ e v e n t {
m y ( $ o p t ) = @ _ ;
- f o r e a c h ( $ o p t - > { p a r e n t } - > G e t C h i l d r e n ) {
- i f ( $ _ - > c a n ( ' G e t V a l u e ' ) ) {
- $ o p t - > { $ _ - > G e t N a m e } = $ _ - > G e t V a l u e ;
+ i f ( d e f i n e d $ o p t - > { p a r e n t } ) {
+ f o r e a c h ( $ o p t - > { p a r e n t } - > G e t C h i l d r e n ) {
+ i f ( $ _ - > c a n ( ' G e t V a l u e ' ) ) {
+ $ o p t - > { $ _ - > G e t N a m e } = $ _ - > G e t V a l u e ;
+ }
+ e l s i f ( $ _ - > c a n ( ' G e t S t r i n g S e l e c t i o n ' ) ) {
+ $ o p t - > { $ _ - > G e t N a m e } = $ _ - > G e t S t r i n g S e l e c t i o n ;
+ }
+ e l s i f ( $ g e t V a l u e - > { r e f ( $ _ ) } ) {
+ $ o p t - > { $ _ - > G e t N a m e } = $ g e t V a l u e - > { r e f ( $ _ ) } ( $ _ ) ;
+ }
}
- e l s i f ( $ _ - > c a n ( ' G e t S t r i n g S e l e c t i o n ' ) ) {
- $ o p t - > { $ _ - > G e t N a m e } = $ _ - > G e t S t r i n g S e l e c t i o n ;
- }
- e l s i f ( $ g e t V a l u e - > { r e f ( $ _ ) } ) {
- $ o p t - > { $ _ - > G e t N a m e } = $ g e t V a l u e - > { r e f ( $ _ ) } ( $ _ ) ;
- }
}
P O E : : K e r n e l - > p o s t ( ' c a t a l y s t - w x p e r l ' , ' E V E N T _ R E Q U E S T ' , $ o p t ) ;
More information about the Catalyst-commits
mailing list