Re: Another silly newbie question



-- Fred. Oger <oger sia ucl ac be> wrote
(on Thursday, 14 August 2003, 08:40 PM +0200):
Could someone tell me how I could pass several args to my callback
function ?

$okbutton->signal_connect('clicked',\&ValidateLogin,$fieldUid,$fieldPwd);

One way I do this is with anonymous subs:

    $okbutton->signal_connect( clicked => sub {
            ValidateLogin($filedUid, $fieldPwd);
        },
    );

Note, too, that the proper format in gtk2-perl is to use:

    signal => coderef

instead of 

    signal, coderef

-- 
Matthew Weier O'Phinney
http://weierophinney.net/matthew/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]