XRCCTRL和XRCID

XRCCTRL和XRCID

我不是很清楚这两个函数的区别,不是都在xrc文件中得到xml id是函数参数的widget的对象吗?得到了是不是原来怎么用就怎么用?
我得到了一个toolbutton的widget,写了个回调函数,我发现所有的toolbutton都用这个回调函数,有的toolbutton函数我还没写也开始用这个回调函数了,menuitem也出现了这个问题,是怎么回事?
哪位比较熟,给我解释一下?
http://wiki.wxpython.org/index.cgi/XRCTutorial
这个上面写了

However, another frequent use of Bind is to hook up event handlers with menu items, but the wxMenuItem class does not derive from wxWindow. Therefore, you cannot use XRCCTRL to return a MenuItem object. Instead, None would be returned and the Bind method would default to the id parameter, which would be wx.ID_ANY. The result of this would be that the event would be bound to all objects with the id wx.ID_ANY, and this is definitely not what you want.

In these cases, you must use XRCID to get the object's ID instead, and pass that as a keyword argument to the Bind call.

多谢大家