Skip Menu |

This queue is for tickets about the Curses-UI CPAN distribution.

Report information
The Basics
Id: 7424
Status: resolved
Priority: 0/
Queue: Curses-UI

People
Owner: Nobody in particular
Requestors: rafl [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: allow to pass user-data to callbacks and timers
A possibility to add a user-definable user-data reference that will be passed to the callback or timer functions beside the ui object would be nice. This could be look like that: $ui->add_timer( 'update', \&update, 5, $foo ); where foo is the user-data that'll be passed to update() every time it's called. Regards, Florian
[FLORA - Fri Aug 20 08:07:31 2004]: Show quoted text
> A possibility to add a user-definable user-data reference that will be > passed to the callback or timer functions beside the ui object would > be nice. > This could be look like that: > > $ui->add_timer( 'update', \&update, 5, $foo ); > > where foo is the user-data that'll be passed to update() every time > it's called.
The Idea sounds interesting, but isn't that mostly what Event.pm would do. I don't know enough about the internals of Event, but if it works parallel to Curses::UI this should be no problem. If it is not, it would be a nice feature for Curses::UI