FM9: User menu/commands in session?
Hi,
another difference in FM9/FDK9 with commands. We add our menu with Fx_ApiDefineCommand. When the menu command is clicked at logging we get the name of the command, but with FM9 it returns completely different labels and names. This is the function we use to get the names/labels of the command. It works for earlier versions. Any idea how to fix it?
StringT getCommandName(IntT cmdNum)
{
F_ObjHandleT mcmdId = Fx_ApiGetId(0, FV_SessionId, FP_FirstCommandInSession);
while (mcmdId) {
IntT mcndNum = Fx_ApiGetInt(FV_SessionId, mcmdId, FP_CommandNum);
if (mcndNum == cmdNum) {
StringT name = Fx_ApiGetString(FV_SessionId, mcmdId, FP_Label);
/*
StringT fmName = Fx_ApiGetString(FV_SessionId, mcmdId, FP_Name);
F_Free(fmName);
*/
return name;
F_Free(name);
}
mcmdId = Fx_ApiGetId(FV_SessionId, mcmdId, FP_NextCommandInSession);
}
}
UPDATE: if you place a breakpoint after getting the label, and not returning but setting the next statement to FP_NextCommandInSession line, you are able to get the correct label. It seems there are more commands with the same cmdId that are in the session.
just wondering how many things could be changed the similar way ![]()
Thanks,
Viktor