设计了有两个按钮的layout button,代码:
int MY_lay ( int dialog_id,
void * client_data,
UF_STYLER_item_value_type_p_t callback_data)
{
UF_STYLER_item_value_type_t value;
int ir6;
char *cp1="point construct";
double rr4[3];
char buffer[UF_UI_MAX_STRING_LEN];
int ia2=0;
/* Make sure User Function is available. */
if ( UF_initialize() != 0)
return ( UF_UI_CB_CONTINUE_DIALOG );
/* ---- Enter your callback code here ----- */
value.item_id=MY_LAY;
value.item_attr=UF_STYLER_VALUE;
if(value.value.integer)
{
ir6=uc1616(cp1,[$ia2,0,rr4)]
UF_UI_open_listing_window();
sprintf(buffer,"point(x1,y1,z1) is: %f, %f, %f\n", rr4[0],rr4[1],rr4[2]);
UF_UI_write_listing_window(buffer);
}
else
{
ir6=uc1616(cp1,[$ia2,0,rr5)]
UF_UI_open_listing_window();
sprintf(buffer,"point(x2,y2,z2) is: %f, %f, %f\n", rr5[0],rr5[1],rr5[2]);
UF_UI_write_listing_window(buffer);
}
可以执行,问题是:程序只显示rr4的坐标,按了按钮2,程序依然执行rr4部分,rr5部分执行不到,为什么呢?
求教!!!! |