Just when I thought I understood it...
I have this application where I have a block of title strings, each followed by an associated file name. I want to extract the title strings from the block and put them into a text-list. I have condensed the operation into the following demo. When I run the program and use the 'Load' button, the text-list shows only the 13 of 16 items that will fit, and the scroll bar is inoperative. If I use the 'Debug' button to halt the program and probe the TITLE-LIST that is what should be in the text-list, everything is present; it just doesn't show. What am I not understanding?
Thank you. Demo follows.
R E B O L [
]
;; -- Titles and associated file names
SNIP-LIST: [
'Alert with OK or Cancel buttons' %AlertWithOKorCancel.txt
'CGI Display Header' %CGIDisplayHeader.txt
'CGI Emit HTML' %CGIEMitHtml.txt
'CGI get input fields' %CGIGetInput.txt
'CGI first lines' %CGIscriptheader.txt
'Datestamp yyyymmdd' %datestamp-yyyymmdd.txt
'File list current dir' %File-list-current-dir.txt
'Generate yyyymmddhhmmss' %GenerateYYYYMMDDHHMMSS.txt
'Get all image files in a folder' %GetAllImageFilesInFolder.txt
'Get yyyymmdd' %GetYYYYMMDD.txt
'Image String' %ImageString.txt
'REBOL Header' %RebolHeader.txt
'Request one file name' %RequestOneFilename.txt
'Timestamp hhmmss' %TimestampHHMMSS.txt
'Trap close button ' %TrapCloseButton.txt
'Clock on window' %WindowClock.txt
]
TITLE-LIST: [] ;; to hold just the titles
LOAD-BUTTON: does [
TITLE-LIST: copy []
TITLE-LIST: extract SNIP-LIST 2
MAIN-LIST/data: TITLE-LIST
show MAIN-LIST
]
SHOW-PICKED: does [
set-face MAIN-PICKED copy MAIN-LIST/picked
]
MAIN-WINDOW: layout [
MAIN-LIST: text-list 500x200 data TITLE-LIST [SHOW-PICKED]
MAIN-PICKED: info 500
across
BUTTON 'Load' [LOAD-BUTTON]
button 'Quit' [quit]
button 'Debug' [halt]
]
view center-face MAIN-WINDOW
And now to show I am not crazy:
>> probe title-list
[
'Alert with OK or Cancel buttons'
'CGI Display Header'
'CGI Emit HTML'
'CGI get input fields'
'CGI first lines'
'Datestamp yyyymmdd'
'File list current dir'
'Generate yyyymmddhhmmss'
'Get all image files in a folder'
'Get yyyymmdd'
'Image String'
'REBOL Header'
'Request one file name'
'Timestamp hhmmss'
'Trap close button '
'Clock on window'
]
>> probe main-list/data
[
'Alert with OK or Cancel buttons'
'CGI Display Header'
'CGI Emit HTML'
'CGI get input fields'
'CGI first lines'
'Datestamp yyyymmdd'
'File list current dir'
'Generate yyyymmddhhmmss'
'Get all image files in a folder'
'Get yyyymmdd'
'Image String'
'REBOL Header'
'Request one file name'
'Timestamp hhmmss'
'Trap close button '
'Clock on window'
]