aMSN Forums
May 23, 2013, 09:35:04 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: new_conversation question  (Read 2412 times)
number-g
Newbie

Offline Offline

Posts: 17


View Profile
« on: July 24, 2009, 06:58:18 am »

hi,

found some time to continue with my plugin lately but i have a problem whereby if i open a chat to another user, my code works, but if the other user opens the window to me, it doesn't.

it seems that the $chatid variable is 0 when the other user initiates the chat to me, so i can't get the right window number using [::ChatWindow::For $chatid]

here's what i have:
Code:

        proc populate_chatwindow {event evpar} {

           upvar 2 $evpar args

                set chatid $args(chatid)
                set window [::ChatWindow::For $chatid]

                set placement $window.top.padding
                pack [create_ui $window $placement $chatid] -fill x
        }



cheers
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: July 24, 2009, 09:40:12 am »

try registering for "new_conversation" rather than "new_chatwindow" the new_chatwindow event does not have a chatid parameter in evpar...
Logged

KaKaRoTo
number-g
Newbie

Offline Offline

Posts: 17


View Profile
« Reply #2 on: July 24, 2009, 10:37:16 am »

hi, this proc is called from a new_conversation event:

Code:

 ::plugins::RegisterEvent "myplugin" new_conversation populate_chatwindow


any ideas?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!