如何在new const内解发code

Home Home
引用 | 编辑 G.M.I
2012-09-30 00:03
楼主
推文 x0
e.g.



new const item_type[MAX_ITEM_TYPE][] =
{
"code_a",
"code_b ",
"code_ c"
}


public code_a(id)
{
xxxxxxxxxxxxxxxxxx
}



public code_b(id)
{
xxxxxxxxxxxxxxxxxx
}



public code_c(id)
{
xxxxxxxxxxxxxxxxxx
}


如果写在menu..
switch(key)
item_type[key][id]


可行吗

献花 x0
引用 | 编辑 tw2twtw
2012-09-30 07:50
1楼
  
不可能用字串来触发事件的...
不过set_task 除外。

献花 x0