Issue 28 in project dongle

1 view
Skip to first unread message

codesite...@google.com

unread,
May 11, 2007, 4:38:59 PM5/11/07
to dongle...@googlegroups.com
Issue 28: #1284 UnregisterAllEvents error
http://code.google.com/p/dongle/issues/detail?id=28

New issue report by zach.anker:
When a Dongle instance is deactivated it's passing the old instance as
self which isn't registered with lookup, so when we try to
call :UnregisterAllEvents() it's throwing the "must call from Dongle obj".

I'm not exactly sure how everything works so it's a bit of guesswork by
looking at the code, but if you change Deactivate to

local function Deactivate(self, new)
for key, val in pairs( lookup ) do
if( type( key ) == "string" ) then
self.UnregisterAllEvents( key );
lookup[ key ] = nil
end
end
end

It'll unregister all of the events of the registered modules, which is
what the goal is I think?


Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
May 11, 2007, 4:39:44 PM5/11/07
to dongle...@googlegroups.com
Issue 28: #1284 UnregisterAllEvents error
http://code.google.com/p/dongle/issues/detail?id=28

Comment #1 by zach.anker:
Of the registered modules of that Dongle instance, typo'ed

codesite...@google.com

unread,
May 11, 2007, 6:38:03 PM5/11/07
to dongle...@googlegroups.com
Issue 28: #1284 UnregisterAllEvents error
http://code.google.com/p/dongle/issues/detail?id=28

Comment #2 by jnwhiteh:
The thing is, the old instance should still be in the lookup table at that point,
which is why the logic is written as is. I'll continue to invertigate.

Reply all
Reply to author
Forward
0 new messages