Advertisement

posting to svn_head - interface changes?

Started by June 20, 2007 07:04 PM
0 comments, last by WitchLord 17 years, 5 months ago
Just updated to the latest svn head and it seems that SetCommonMessageStream has been removed from the newer builds. Can anyone point out what the replacement / alternative for this is? Note - I didn't do our initial integration of AngelScript, just was hoping to drop in the new version & run it ;} Thanx in advance,
Every time I change the library interface that breaks compatibility in some way I change the middle version number. If I'm not mistaken you were using 2.4.1 before, right? Well it's been more than a year since I released that version and quite a few things have changed. I don't take decisions to change the interface lightly, so you can be assured that I had a good reason for it, and that it is for the better.

With regards to the SetCommonMessageStream(), it has been replaced by the SetMessageCallback(), which gives the message in a much easier format that allows the application to filter and present the messages anyway they want with less work.

Here's an example message callback object, and how to register it. The method formats the messages in the same way the previous SetCommonMessageStream() received the messages, so if you were doing any parsing of the messages this should fit right in.

class COutStream{public:	void Callback(asSMessageInfo *msg) 	{ 		const char *msgType = 0;		if( msg->type == 0 ) msgType = "Error  ";		if( msg->type == 1 ) msgType = "Warning";		if( msg->type == 2 ) msgType = "Info   ";		printf("%s (%d, %d) : %s : %s\n", msg->section, msg->row, msg->col, msgType, msg->message);	}};engine->SetMessageCallback(asMETHOD(COutStream,Callback), &out, asCALL_THISCALL);


You'll want to read through the change log for the releases since the version you're currently using. Especially look for items under the header "Library interface", since these are the ones that usually break the compatibility.

Hopefully your upgrade should go quite smoothly, there haven't been any really big change to the interface, only minor improvements.

I'm anxious to hear how the new version will work for you. Let me know as soon as possible if you encounter any problems so that I can fix them immediately.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement