为什么 show 不刷新此 rebol listview?

发布于 2024-08-09 01:23:31 字数 1094 浏览 4 评论 0原文

我在列表视图中显示来自 mysql 的垃圾邮件列表,删除后我使用 show grid 但它不刷新,为什么?

do http://reboltutorial.com/source/mysql-protocol.r
do http://www.hmkdesign.dk/rebol/list-view/list-view.r

window: layout [
  grid: list-view 500x400 with [
    data-columns: ["ID" "Author" "comment_author_IP"]
    viewed-columns: ["ID" "Author" "comment_author_IP"]
    data: read/custom mysql://johndoe:[email protected]/wordpress_db [
      "SELECT DISTINCT COMMENT_ID, comment_author,comment_author_IP from wp_1_comments WHERE comment_approved='spam'"
    ]
  ]
  Button 200x30 "Delete all spams" [
      read/custom mysql://johndoe:[email protected]/wordpress_db [
      "DELETE FROM wp_1_comments WHERE comment_approved='spam'"
    ]
    Print "Spams deleted."
    show grid ;SHOULD refresh the grid BUT DOESN'T
  ]
]
view/title window "All Rebol Tutorial's Spams"

I show the list of spams from mysql in a listview, after delete I use show grid but it doesn't refresh, why ?

do http://reboltutorial.com/source/mysql-protocol.r
do http://www.hmkdesign.dk/rebol/list-view/list-view.r

window: layout [
  grid: list-view 500x400 with [
    data-columns: ["ID" "Author" "comment_author_IP"]
    viewed-columns: ["ID" "Author" "comment_author_IP"]
    data: read/custom mysql://johndoe:[email protected]/wordpress_db [
      "SELECT DISTINCT COMMENT_ID, comment_author,comment_author_IP from wp_1_comments WHERE comment_approved='spam'"
    ]
  ]
  Button 200x30 "Delete all spams" [
      read/custom mysql://johndoe:[email protected]/wordpress_db [
      "DELETE FROM wp_1_comments WHERE comment_approved='spam'"
    ]
    Print "Spams deleted."
    show grid ;SHOULD refresh the grid BUT DOESN'T
  ]
]
view/title window "All Rebol Tutorial's Spams"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文