ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.132 by root, Tue Apr 18 02:07:37 2006 UTC vs.
Revision 1.133 by root, Tue Apr 18 21:39:31 2006 UTC

288} 288}
289 289
290sub connect { 290sub connect {
291 my ($self, $signal, $cb) = @_; 291 my ($self, $signal, $cb) = @_;
292 292
293 push @{ $self->{cb}{$signal} }, $cb; 293 push @{ $self->{signal_cb}{$signal} }, $cb;
294} 294}
295 295
296sub emit { 296sub emit {
297 my ($self, $signal, @args) = @_; 297 my ($self, $signal, @args) = @_;
298 298
299 for my $cb (@{$self->{signal_cb}{$signal} || []}) {
299 $_->($self, @args) 300 $cb->($self, @args);
300 for @{$self->{cb}{$signal} || []}; 301 }
301} 302}
302 303
303sub DESTROY { 304sub DESTROY {
304 my ($self) = @_; 305 my ($self) = @_;
305 306

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines