Problem with TCL Plugin

View: New views
3 Messages — Rating Filter:   Alert me  

Problem with TCL Plugin

by Daniel-28 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

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@...>" \
                  "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.

Thanks

--
Daniel Fonseca Lira
Cel: 8421-5382

_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel

Re: Problem with TCL Plugin

by Ethan Blanton-3 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

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@...>" \
>                   "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


_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel

signature.asc (492 bytes) Download Attachment

Re: Problem with TCL Plugin

by Daniel-28 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hello, Ethan Blanton, work perfectly!

Thank you

2009/9/16 Ethan Blanton <elb@...>
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@...>" \
>                   "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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBSrFjwP8fixZ3H8crAQhSuwgAkL+8mXi1qzFcvFT+9IZP21Ie1JrhKXPf
qyoIBAE/SswLfnh8MzXlpHGeKehj344igJp8+eDXTK9+CACoWMIsQmVDSzVRlTfA
xRSfMJ9hflJmLRq2KOHGeffGnqALfodW8EzsKdPd4ScOsmeR2VgZ3pPAO/fSOZjg
gvQ1vcI6lvHgyELmgMCRf1w91d0DRSRYajuL3xVQZ1Q9zTJymzl7PDRd3RcfcDkl
i4PUeF1/7Ak/70SzJPTCLOxKCl9c1pLXRMbcEXK7J6RxWW4yptdqPKg2w21mWiuI
jzf+TDdMz1RXqriZX2GNLaNU8p+o/XommY5rtuJloKjCnpqPzFUXBw==
=Lg3u
-----END PGP SIGNATURE-----




--
Daniel Fonseca Lira
Cel: 8421-5382

_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel