[bfprog] RE: BFProg Unregistering Handlers
Brandon
brandon at bf2cc.com
Sun Jul 24 12:43:26 PDT 2005
Just set a flag like AllowEventtoFire and set it to false when you need it
to be unregistered.
-----Original Message-----
From: bfprog-bounces at lists.matureasskickers.net
[mailto:bfprog-bounces at lists.matureasskickers.net] On Behalf Of
bfprog-request at lists.matureasskickers.net
Sent: Sunday, July 24, 2005 3:00 PM
To: bfprog at lists.matureasskickers.net
Subject: BFProg Digest, Vol 2, Issue 12
Send BFProg mailing list submissions to
bfprog at lists.matureasskickers.net
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.matureasskickers.net/mailman/listinfo/bfprog
or, via email, send a message with subject or body 'help' to
bfprog-request at lists.matureasskickers.net
You can reach the person managing the list at
bfprog-owner at lists.matureasskickers.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of BFProg digest..."
Today's Topics:
1. Unregistering Handlers (Forrest Thiessen)
2. Re: Unregistering Handlers (Steven Hartland)
3. Re: Unregistering Handlers (Einar S. Ids?)
----------------------------------------------------------------------
Message: 1
Date: Sat, 23 Jul 2005 14:10:07 -0600
From: Forrest Thiessen <thiessen at cyberscapearena.com>
Subject: [bfprog] Unregistering Handlers
To: Battlefield Programming <bfprog at lists.matureasskickers.net>
Message-ID: <42E2A41F.6050100 at cyberscapearena.com>
Content-Type: text/plain; charset=ISO-8859-1
I'm working on a fairly esoteric BF2 Python problem that requires me to
be able to UNregister a previously registered event handler. There's a
host.unregisterGameStatusHandler method that can be used to unregister
game status handlers, but I can't find anything equivalent for normal
handlers that were registered with host.registerHandler.
Anyone have any ideas?
--Forrest (aka "Woody")
------------------------------
Message: 2
Date: Sat, 23 Jul 2005 22:22:32 +0100
From: "Steven Hartland" <killing at multiplay.co.uk>
Subject: Re: [bfprog] Unregistering Handlers
To: "Battlefield Programming" <bfprog at lists.matureasskickers.net>
Message-ID: <036401c58fcc$a5f25670$b3db87d4 at multiplay.co.uk>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
They dont exist. We have raised this issue with EA / Dice.
I've coded the default ModManager modules to
workaround this for loading unloading but its not perfect :(
If your interested in looking / testing this see here:
http://forums.multiplay.co.uk/showthread.php?s=&threadid=34134
Hopefully we can get this fixed in 1.03.
Steve / K
----- Original Message -----
From: "Forrest Thiessen" <thiessen at cyberscapearena.com>
> I'm working on a fairly esoteric BF2 Python problem that requires me to
> be able to UNregister a previously registered event handler. There's a
> host.unregisterGameStatusHandler method that can be used to unregister
> game status handlers, but I can't find anything equivalent for normal
> handlers that were registered with host.registerHandler.
>
> Anyone have any ideas?
================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the
person or entity to whom it is addressed. In the event of misdirection, the
recipient is prohibited from using, copying, printing or otherwise
disseminating it or any information contained in it.
In the event of misdirection, illegible or incomplete transmission please
telephone (023) 8024 3137
or return the E.mail to postmaster at multiplay.co.uk.
------------------------------
Message: 3
Date: Sat, 23 Jul 2005 23:34:59 +0200
From: "Einar S. Ids?" <esi at itk.ntnu.no>
Subject: Re: [bfprog] Unregistering Handlers
To: Battlefield Programming <bfprog at lists.matureasskickers.net>
Message-ID: <42E2B803.9060205 at itk.ntnu.no>
Content-Type: text/plain; charset=ISO-8859-1
Like Steven said, this method don't seem to exist. I don't know what
technique Steven uses in his Modmanager, though I am looking forward to
seeing his work, but, depending on why you need to unregister the event
handler, you might get by by simply reassigning the function being
called to do absolutely nothing? It would still incur the time to call,
obviously, but just let it pass/return immediately.
You could use a simple dummy-function for this which takes nothing but
key/val arguments, so that each and every function you want to
cancel/unregister can be redirected to this single dummy-function.
Einar
Forrest Thiessen wrote:
> I'm working on a fairly esoteric BF2 Python problem that requires me to
> be able to UNregister a previously registered event handler. There's a
> host.unregisterGameStatusHandler method that can be used to unregister
> game status handlers, but I can't find anything equivalent for normal
> handlers that were registered with host.registerHandler.
>
> Anyone have any ideas?
>
> --Forrest (aka "Woody")
>
> _______________________________________________
> BFProg mailing list
> BFProg at lists.matureasskickers.net
> http://lists.matureasskickers.net/mailman/listinfo/bfprog
>
>
------------------------------
_______________________________________________
BFProg mailing list
BFProg at lists.matureasskickers.net
http://lists.matureasskickers.net/mailman/listinfo/bfprog
End of BFProg Digest, Vol 2, Issue 12
*************************************
More information about the BFProg
mailing list