using PtGetResources in RrTrend

To Whom It May Concerns:

I have set the color list for RtTrend in a rttrend realize function by
using
PtSetArg(&args[0], Rt_ARG_TREND_COLOR_LIST, list1, :sunglasses:;
PtSetResources(ABW_RtTrend_Scope, 1, args);
Then in another Callback function, I’m trying to get that color list by
using
PtSetArg(&args[0], Rt_ARG_TREND_COLOR_LIST, list2, :sunglasses:;
PtGetResources(ABW_RtTrend_Scope, 1, args);
somehow the PtGetResources giving me memory fault, I have tried to change
the list1[8] and list2[8] from PgColor_t type to
Int type, I also tried using &list2 instead of list2. that didn’t seem
to help. the only way to avoid memory fault
is to change change 8 to 0 in PtSetArg(&args[0], Rt_ARG_TREND_COLOR_LIST,
list2, :sunglasses: before calling PtGetResources,
but then list2 doesn’t contain the same elements as in list1.

Can someone help me???


The complete 2 functions are as follows:


int rttrend_realized_cb( PtWidget_t *widget, ApInfo_t *apinfo,
PtCallbackInfo_t cbinfo )
{ /
eliminate ‘unreferenced’ warnings */
widget = widget, apinfo = apinfo, cbinfo = cbinfo;
PgColor_t list1[8];
PtArg_t args[2];

list1[0] = Pg_RED;
list1[1] = Pg_GREEN;
list1[2] = Pg_MAGENTA;
list1[3] = Pg_YELLOW;
list1[4] = Pg_GREY;
list1[5] = Pg_DBLUE;
list1[6] = Pg_CYAN;
list1[7] = Pg_WHITE;
PtSetArg(&args[0], Rt_ARG_TREND_COLOR_LIST, list1, :sunglasses:;
PtSetResources(ABW_RtTrend_Scope, 1, args);
}

int PtButton_F1_cb( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t
cbinfo )
{ /
eliminate ‘unreferenced’ warnings */
widget = widget, apinfo = apinfo, cbinfo = cbinfo;

PgColor_t list2[8];
PtArg_t args[2];

PtSetArg(&args[0], Rt_ARG_TREND_COLOR_LIST, list2, :sunglasses:;
// memory fault !!!
PtGetResources(ABW_RtTrend_Scope, 1, args);
}