Sendmessage

BlitzMax Forums/BlitzMax Beginners Area/Sendmessage

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

OK. It seems a bit odd but I now understand the reasoning.
How is it used to actually send messages between objects?
This seems quite funky but is it what sendmessage is for?
SuperStrict

Type test1
    Method sendmessage:Object(message:Object,context:Object)
           Return context.sendmessage(message,Null)
    End Method
	
End Type

Type test2
     Method sendmessage:Object(message:Object,parm:Object)
           Local mystring:String=String(message)
           Print mystring
           Return "OK"
     End Method
End Type

Local msg:Object="Hello World"
Local mytest1:test1=New test1
Local mytest2:test2=New test2
Print String(mytest1.sendMessage(msg,mytest2))