develooper Front page | perl.perl5.changes.mac | Postings from July 2002

Change 17660: Fix long-standing bug with popup menus not workingin dialogs

From:
Chris Nandor
Date:
July 29, 2002 13:01
Subject:
Change 17660: Fix long-standing bug with popup menus not workingin dialogs
Message ID:
p05111b12b96b4e232ec7@[10.0.1.177]
Change 17660 by pudge@pudge-mobile on 2002/07/29 18:20:12

	Fix long-standing bug with popup menus not working in dialogs

Affected files ...

.... //depot/maint-5.6/macperl/macos/ext/Mac/Dialogs/Dialogs.pm#3 edit

Differences ...

==== //depot/maint-5.6/macperl/macos/ext/Mac/Dialogs/Dialogs.pm#3 (text) ====
Index: macperl/macos/ext/Mac/Dialogs/Dialogs.pm
--- macperl/macos/ext/Mac/Dialogs/Dialogs.pm#2~12323~	Wed Oct  3 11:42:37 2001
+++ macperl/macos/ext/Mac/Dialogs/Dialogs.pm	Mon Jul 29 11:20:12 2002
@@ -475,9 +475,16 @@
 
 =cut
 sub click {
-    my($handled);
-    defined($handled = $_[0]->callhook("click", @_)) and return 1;
-    _dialogselect(@_);
+	my($self, $pt) = @_;
+	for my $pane (@{$self->{panes}}) { 
+		if ($pane->click($self, $pt)) {
+			$self->advance_focus($pane);
+			return 1; 
+		}
+	};
+	my($handled);
+	defined($handled = $self->callhook("click", @_)) and return 1;
+	_dialogselect(@_);
 }
 
 =item modal [FILTER]
@@ -523,7 +530,7 @@
 	$CurrentEvent->what(0);
 	&_dialogselect;
 	$CurrentEvent->what($savedwhat);
-    &MacWindow::idle;
+	&MacWindow::idle;
 }
 
 =item KIND = item_kind ITEM
End of Patch.
-- 
Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Development Network    pudge@osdn.com     http://osdn.com/



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About