What the below code do is take the values of some controls from a panel then put them in a table in another panel. I save the panel state using SavePanelState(). After SavePanelState is performed, the save state file is generated for the first time. When the below code run again, I received error at RecallPanelState() stating the "control cannot be loaded as panel has changed". However, i never do any changes on the panel after SavePanelState(). I would like to know where are my mistakes?
SITEDBPL = LoadPanel(0,"main.uir",SITEDB);
if(FileExists("d:\\Project\\GI Netcom\\NOSMOC\\SiteDB.db",0)==1)
RecallPanelState(SITEDBPL,"d:\\Project\\GI Netcom\\NOSMOC\\SiteDB.db",0);
GetCtrlVal(SITEDBPL,SITEDB_ROW,&row);
StrSiteName = malloc (row*sizeof(char*));
GetCtrlVal(SITECONFIGPL,SITECONFIG_MODE,StrConfig);
strcpy (StrTbl[1], StrConfig);
GetCtrlVal(SITECONFIGPL,SITECONFIG_POLL,StrConfig);
strcpy (StrTbl[2], StrConfig);
InsertIntoList(SITECONFIGPL,SITECONFIG_POLLLIST,StrConfig);
GetCtrlVal(SITECONFIGPL,SITECONFIG_FILE,StrConfig);
strcpy (StrTbl[3], StrConfig);
InsertIntoList(SITECONFIGPL,SITECONFIG_FILELIST,StrConfig);
GetCtrlVal(SITECONFIGPL,SITECONFIG_SIM,StrConfig);
strcpy (StrTbl[4], StrConfig);
InsertIntoList(SITECONFIGPL,SITECONFIG_SIMLIST,StrConfig);
InsertTableRows (SITEDBPL, SITEDB_SITEDBTBL, y, 1, VAL_USE_MASTER_CELL_TYPE);
SetTableCellRangeVals (SITEDBPL, SITEDB_SITEDBTBL, MakeRect(y,1,1,5), StrTbl, VAL_ROW_MAJOR);
GetCtrlVal(SITECONFIGPL,SITECONFIG_DFFOLDER,StrConfig);
strcpy (StrF, StrConfig);
SetTableCellVal (SITEDBPL, SITEDB_SITEDBTBL, MakePoint(6,y), StrF);
GetCtrlVal(SITECONFIGPL,SITECONFIG_EXECUTEDT,StrConfig);
strcpy (StrF, StrConfig);
SetTableCellVal (SITEDBPL, SITEDB_SITEDBTBL, MakePoint(7,y), StrF);
SavePanelState(SITEDBPL,"d:\\Project\\GI Netcom\\NOSMOC\\SiteDB.db",0);
DiscardPanel(SITEDBPL);
Thank you