On 24/08/2015 at 02:27, xxxxxxxx wrote:
here is what I do:
static Bool InvokeCommandCall(GeDialog* dialog, Int32 id) {
BaseContainer actionmsg(BFM_ACTION), actionresult;
actionmsg.SetInt32(BFM_ACTION_ID, id);
return dialog->Message(actionmsg, actionresult);
}
in iCustomGui subclass:
virtual Bool Command(Int32 id, const BaseContainer& msg) {
if (id == COMMANDMSG_VALUECHANGED) {
SendValueChanged(this, msg);
}
return TRUE;
}
static Bool SendValueChanged(iCustomGui* dlg, BaseContainer msg) {
msg.SetInt32(BFM_ACTION_ID, dlg->GetId());
msg.RemoveData(BFM_ACTION_VALUE);
msg.SetData(BFM_ACTION_VALUE, dlg->GetData().GetValue());
//GePrint("just msg " + String::IntToString((static_cast<iSnodeDataType*> (msg.GetData(BFM_ACTION_VALUE).GetCustomDataType(SEVENPHOTONS_NODE_CUSTOMDATATYPE)))->count));
return dlg->SendParentMessage(msg);
}
which is simply updating my CustomDataType members, so if user interacts with GeUserArea, InvokeCommandCall() is the update function.
if I remove InvokeCommandCall() , there is a delay, but it works without a problem, what should I do?