tags:

views:

28

answers:

1

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"
+2  A: 

http://www.hmkdesign.dk/rebol/list-view/docs/list-view.html#section-13

Try

grid/update

Graham Chiu
I tried but doesn't seem to refresh either, maybe there's a bug ?
Rebol Tutorial