[Bf-committers] MessageSensor getSubject() Bug

Kester Maddock bf-committers@blender.org
Thu, 8 Apr 2004 02:04:34 +1200


Hi Carsten,

This didn't apply clean (some of the lines got word wrapped, and there is 
something strange in the indentation) but I managed to merge it anyway.

I'll commit tonight.

Thanks,

Kester


On Wednesday 07 April 2004 04:01, Carsten Wartmann wrote:
> Hi,
>
> this is my first try to fix a bug, so be kind with me ;-) I have to
> say its even the first time I put my hands on C++...
>
>
> The bug:
>
> In NaN times I suggested a python function to get the subject of a
> Message using a python function of the MessageSensor.
>
> Thats a nice thing if you want complex message handling in one python
> script. Just get all messages, check the subject and do what you
> want. In the current situation you end up with several MessageSensors
> connected to the python script, instead of one Sensor and a smart
> script.
>
> Some developer (cant remember who) did implement that function, but
> however not the way I wanted (maybe I was not clear enough) ;-) So the
> getSubject() function will return whats entered in the "Subject:"
> filter field of the MessageSensor. Quite useless IMHO.
>
> So I added a new function getSubjects() which is similar to
> getBodies(), in fact I stole the code from there ;-)
>
> I left the getSubject() alone, because of backward compatibility
> (never saw someone using that function, but...)
>
>
> The future:
>
> In conjunction with a wildcard subject: filter field the getSubjects()
> function will be even more usefull.
>
> i.e. Player* will filter for PlayerScore, PlayerKill etc.
>
>
>
> Here is the patch, it works here but no guaranties I did not broke the
> whole world ;-)
>
> Regards,
> Carsten.
>
>
--snip--
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
>
> !DSPAM:407337e232192268836741!