为什么show不刷新这个rebol listview?

时间:2009-10-30 21:31:17

标签: rebol

我在列表视图中显示来自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:123@72.64.23.123/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:123@72.64.23.123/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"

1 个答案:

答案 0 :(得分:2)