Skip to content

Instantly share code, notes, and snippets.

@gchiu
Created May 23, 2013 07:27
Show Gist options
  • Save gchiu/5633285 to your computer and use it in GitHub Desktop.
Save gchiu/5633285 to your computer and use it in GitHub Desktop.
unable to access list from button
Rebol [
date: 21-May-2013
author: "Graham Chiu"
]
i: load http://www.rebol.com/bay.jpg
gob-list2: []
go: make object! [name: offset: type: none]
append gob-list2 make go []
view [
hpanel [
sp: scroll-panel [
container: hpanel [
image i
]
] options [max-hint: 1020x1400]
scroll-panel [
vpanel [
button "Close" on-action [close-window face]
vpanel [
button "Submit" red
on-action [
print "Submit button pressed"
probe type? gob-list2
if error? set/any 'err try [
probe gob-list2
either block? gob-list2 [
foreach g container/gob/pane [
gob-list2/1/offset: g/offset
; commenting out the next line allows line 26 to work okay!
gob-list2: next gob-list2
]
probe head gob-list2
] [
print ["gob-list2 is type " type? gob-list2]
]
] [
probe err
]
]
]
]
]
]
]
@gchiu
Copy link
Author

gchiu commented May 23, 2013

Looks like View collects all the set-words and sets them to none!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment