Problem with TCL Plugin

Ethan Blanton elb at pidgin.im
Wed Sep 16 18:16:33 EDT 2009


Daniel spake unto us the following wisdom:
> Hello, My name is Daniel, I'm from Brazil, Sorry my wrong english, or if I
> expressed badly, but I'm learning... :|
> 
> I don't know if a send mail to correct destination, but... I want do plugins
> for Pidgin using Tcl language, but when I try connect with signals, a don't
> have success. Flow code:
> 
> proc plugin_init {} {
>   return [ list "Teste" \
>                   "0.1" \
>                   "Teste de um plugin tcl" \
>                   "Teste de desenvolvimento de um plugin em tcl" \
>                   "Daniel Lira <danielflira at gmail.com>" \
>                   "http://www.google.com"
>   ]
> }
> 
> ::purple::signal connect [::purple::account handle] account-enabled metodo
> proc metodo { } {
>     ::purple::notify [lindex [plugin_init] 0] "Notify" "Test"
> }
> 
> The error is args parameter lack, but i don't know what args is, and on the
> sample in http://developer.pidgin.im/doxygen/2.5.2/html/tcl-howto.html he is
> not clean.

You should be calling something like this:

::purple::signal connect [::purple::account handle] \
                         account-enabled { account } {
    # body
}

(that is to say, you don't use 'proc <procname> { args } { }')

Ethan

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
		-- Cesare Beccaria, "On Crimes and Punishments", 1764
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 481 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20090916/531dcd33/attachment.sig>


More information about the Devel mailing list