使用SceneEditor后,在代码中获取Component的问题

使用SceneEditor后,想在代码中获取UI中的一个按钮,但在获取UI的Component的始终报错。即使用代码:
CCComponent* component = m_pCurNode->getChildByTag(1005)->getComponent(“GUIComponent”);
获取下段JSON中“tag”为“10005”的“ GUIComponent ”时,一直出现“访问冲突”的错误……
新手,求人指教……

Scene.json
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
{
“classname”: “CCNode”,
“name”: null,
“canedit”: true,
“objecttag”: 10000,
“rotation”: 0,
“scalex”: 1,
“scaley”: 1,
“visible”: 1,
“x”: 0,
“y”: 0,
“zorder”: 1,
“gameobjects”:
{
“__type”: “ComGameObjectSurrogate:#EditorCommon.JsonModel”,
“classname”: “CCNode”,
“name”: null,
“canedit”: true,
“objecttag”: 10005,
“rotation”: 0,
“scalex”: 1,
“scaley”: 1,
“visible”: 1,
“x”: 0,
“y”: 0,
“zorder”: 1,
“gameobjects”:
{
“__type”: “ComGameObjectSurrogate:#EditorCommon.JsonModel”,
“classname”: “CCNode”,
“name”: null,
“canedit”: true,
“objecttag”: 10004,
“rotation”: 0,
“scalex”: 1,
“scaley”: 1,
“visible”: 1,
“x”: 674.2857666015625,
“y”: 111.42858123779297,
“zorder”: 1,
“gameobjects”: ],
“components”:
{
“__type”: “ComArmatureAdapterSurrogate:#EditorCommon.JsonModel.Component”,
“classname”: “CCArmature”,
“name”: “CCArmature”,
“file”: null,
“fileData”: {
“path”: “HomeScene/Action/Action.ExportJson”,
“plistFile”: null,
“resourceType”: 0
},
“selectedactionname”: “Animation1”
}
]
}
],
“components”:
{
“__type”: “ComGUIAdapterSurrogate:#EditorCommon.JsonModel.Component”,
“classname”: “GUIComponent”,
“name”: “GUIComponent”,
“file”: null,
“fileData”: {
“path”: “HomeScene/UI_1/UI_1.ExportJson”,
“plistFile”: null,
“resourceType”: 0
}
}
]
}
],
“CanvasSize”: {
“_height”: 480,
“_width”: 720
},
“Version”: “0.4.0.0”,
“components”:
{
“__type”: “ComSceneSurrogate:#EditorCommon.JsonModel.Component”,
“classname”: “CCScene”,
“name”: “CCScene”,
“scenename”: “Scene”
},
{
“__type”: “ComSimpleAudioSurrogate:#EditorCommon.JsonModel.Component”,
“classname”: “CCBackgroundAudio”,
“name”: “CCBackgroundAudio”,
“file”: null,
“fileData”: {
“path”: “HomeScene/Sound/home.mp3”,
“plistFile”: null,
“resourceType”: 0
},
“loop”: 1
}
]
}

↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑