Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits) (+2)

All of Lil's query forms (select, extract, update, insert) are pure expressions; they do not modify tables in-place.

If you want to update the table in a grid, you need to write to its ".value" property. Since you simply wish to replace the contents of the grid rather than append to it, you don't require an "into":

roundup.widgets.player.value:insert name age hobby with
   "Alice" 23 "running"
    "Bob" 25 "cooking"
    "Charlie" 17 "birdwatching"
end

If you're doing this at the Listener on the same card as the widget you could be more concise:

player.value:insert name age hobby with
    "Alice" 23 "running"
     "Bob" 25 "cooking"
     "Charlie" 17 "birdwatching"
end

If you then wanted to programmatically append more rows to the table, you could use "into" like so:

g:roundup.widgets.player
g.value:insert name age hobby with
   "Dinah" 19 "bouldering"
   "Evan" 47 "chicken wrangling"
into g.value

Does that help clear things up?

(+1)

Brilliant! Perfect! 100% what I was looking for! Thank you so much. 

Very helpful and could definitely deserve some more doc in the main Decker doc. The Lil examples are nice, but linking that to the Decker widgets is is not straightforward..