acedInitGet - acedGetKeyword bug

acedInitGet - acedGetKeyword bug

mconficconi
Advocate Advocate
303 Views
2 Replies
Message 1 of 3

acedInitGet - acedGetKeyword bug

mconficconi
Advocate
Advocate
in this function:
 

 

void _TryMeFunction(void)
{
	bool bContinue = true;
	do
	{
		int iReturnValue = acedInitGet(RSG_NOZERO, _T("T RP RX RA R E"));
		if (iReturnValue == RTNORM)
		{
			TCHAR acUserTyped[132];
			::ZeroMemory(acUserTyped, 132);
			// As you can test, if your choice is RP or RX (the 2 character ar not consecutive), acedGetKword return R
			iReturnValue = acedGetKword(_T("\nTry to use the right button mouse [Test/ Responde se vu Ple/ Rest in tX/ RAil/ Redo/ Exit] :"), acUserTyped);
			if (iReturnValue == RTNORM)
			{
				acutPrintf(_T("\n*** You have choice: %s ***"), acUserTyped);
				if (_tcsicmp(acUserTyped, _T("E")) == 0)
					bContinue = false;
			}
		}
	}
	while (bContinue);
}

 

 
When the acedGetKword wait for the user input, using the right mouse button the error appear.
If the keyword is 2 char not consecutive, only the first is returned.
Using the keyoboard the keyword is always accepted. 
0 Likes
Accepted solutions (1)
304 Views
2 Replies
Replies (2)
Message 2 of 3

tbrammer
Advisor
Advisor
Accepted solution

You have "R" explicitly in the keyword list. I think this behavior is "as designed".  The uppercase letters must be unique.

Maybe this works as you expect it:

 

acedInitGet(RSG_NOZERO, _T("T rP rX rA R E"));
acedGetKword(L"\nTry to use the right button mouse [Test/responde se vu Ple/rest in tX/rAil/Redo/Exit] :", acUserTyped);

 

If you enter "RX" or "X" you reg "rX".

For "RA" or "A" you get "rA" and for "R" you get "R".


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes
Message 3 of 3

mconficconi
Advocate
Advocate

But registering RA e R with acedInitGet(RSG_NOZERO, L"RA R"), the acedGetKword(L"RAil/Redo", acUserTyped); with the right mouse menu, return the correct values (RA or R).

 

IMHO, is an error when the uppercase in acedGetKword are in different word of the same option....

0 Likes