【发布时间】:2012-01-19 10:32:37
【问题描述】:
我正在 Ada 中编写简单的聊天程序,但我遇到了聊天窗口模拟的问题 - 单击按钮时,它会读取文本表单条目并将其放在 text_view 上。这是我写的code,这是编译输出:
gnatmake client `gtkada-config`
gcc -c -I/usr/include/gtkada client_pkg.adb
client_pkg.adb:14:19: no candidate interpretations match the actuals:
client_pkg.adb:14:37: expected private type "Gtk_Text_Iter" defined at gtk-text_iter.ads:48
client_pkg.adb:14:37: found type "Gtk_Text_View" defined at gtk-text_view.ads:58
client_pkg.adb:14:37: ==> in call to "Get_Buffer" at gtk-text_buffer.ads:568
client_pkg.adb:14:37: ==> in call to "Get_Buffer" at gtk-text_buffer.ads:407
client_pkg.adb:15:34: no candidate interpretations match the actuals:
client_pkg.adb:15:34: missing argument for parameter "Start" in call to "Get_Text" declared at gtk-text_buffer.ads:283
client_pkg.adb:15:34: missing argument for parameter "Start" in call to "Get_Text" declared at gtk-text_buffer.ads:270
gnatmake: "client_pkg.adb" compilation error
谁能告诉我问题出在哪里,因为我不知道为什么程序Get_Buffer 需要Gtk_Text_Iter,以及为什么Get_Text 缺少启动参数?
【问题讨论】:
-
更新您的原始问题可能会很好,Chat window with Gtk+。