这是我的代码,我在选择带有小部件的文件后尝试获取 file_nameFileChooserButton
Gtk::FileChooserButton *chooserButton = nullptr;
std::string idChooserButton = commonArray[b]["id"];
builder->get_widget(idChooserButton, chooserButton);
Php::call("var_dump",chooserButton);
if (strcmp(commonArray[b]["action"], "click") == 0) {
Php::Value callback = commonArray[b]["callback"];
chooserButton->signal_selection_changed().connect(
sigc::bind<Php::Value,Php::Value>(
sigc::mem_fun(*this, &ParserGtk::callbacks),
callback,
chooserButton->get_filename()
)
);
}
我调用functinoget_filename
但get_filename
返回空字符串“”;