Hi,
I'm getting a very strange behaviour while running a project I've
done.... Let's expose it: I've two projects. Both of them use a Form
to do some Gui stuff. Other threads pack up messages this way like:
public class UiMsg
{
public enum MsgType { StatusOk };
public MsgType Type;
public Object args;
}
this for the first, while the second:
public class UIData{
public enum dataType{msgSendError, netWorkStatus,
msgFromOp, okClose};
public Object content;
public dataType type;
}
And that's very similar... Then I use the usual Invoke, passing it a
delegate function and an Object Array like:
Object o = (Object)ums;
Invoke(FormCall, new Object[]{ o });
this in the first, where ums is a UiMsg, while in the second
Object []args=new Object[1];
args[0]=(Object)udata;
Invoke(uiUp,args);
.... again pretty similar... Well both compile fine, but when they run
THE FIRST casts out an ArgumentException, complaing that "Object of
type 'ServerApp.UIManager+UiMsg' cannot be converted to type
'System.Object[]'."
..... strange enough... isn't it??? And more strange is the fact that
it says +UiMsg... why it doesn't use the point?!?! What's wrong, did I
forgot checking something??? I tried lot of thing, even making the
codes identical... but no way still the same.
Plase help me solve this mistery...