I have a form that displays a Catetory Popup Trigger and my
app initialized the display to MemoPad's current category. But
it appears that there is some problem with the category, initially,
until I go into MemoPad, once.
I am consistently getting this error, in POSE:
"Category.c, Line:462, Bad Category". This error goes away
after I go into MemoPad, once, after the error. The error
will repeat every time I start the app, until I go into MemoPad.
Then I don't see the error again.
Here is the code to setup the initial label for my Category Popup
Trigger.
void GetMemoDBPrefs(void) {
MemoPreferenceType prefs;
Word prefsSize;
Int prefsVersion;
prefsSize = sizeof(MemoPreferenceType);
prefsVersion = PrefGetAppPreferences(sysFileCMemo, 0, &prefs,
&prefsSize, TRUE);
CurrentCategory = prefs.currentCategory;
CategoryGetName(ImportDB, CurrentCategory, CategoryName);
CategorySetTriggerLabel(GetObjectPtr(trgCategory), CategoryName);
}
I think what is happening is that CategorySetTrigger is trying to set
an invalid category. So, when I go into MemoPad the first time, the
value is set correctly. Just a guess.
But if I am right, what is the initial value of category? And how
do I prevent this initial error?
Any idea what could be causing this?
--
-----------------------------------------------------------------
Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------