![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Smalltalk collections | |
mk23 Member |
![]() ![]() ![]() Hello all, I am currently playing around with the tool editor, trying to wrap my head round more smalltalk. I have managed to fill an ordered collection with a list of file names. Now I would like to display these as a vertical list in the tools GUI, with a number of parameters aligned horizontally next to each file name. The thing I'm stuck with currently is how best to step through each name in the ordered collection. I checked the manual but from the description of the Do and the While loops I can't really seem to get either working. Anyone have any suggestions? And while I'm at it, does anyone have any suggestions about how to list the file names in the tools GUI? The number of files will be different each time the tool is run on a different folder, so I need a dynamic way of listing them... Thanks in advance for any assistance David mK IP: Logged | |
SSC Administrator |
![]() ![]() ![]()
code: This opens a file dialog, lets you select one file in a folder, then creates a collection of all files of the same type in that folder. In the next step, it creates a writeStream and writes all the filenames to that stream with CRs separating each filename. Then it assigns the contents of that writeStream to the variable (which automatically displays the filenames in the Tool). IP: Logged | |
cristian_vogel Member |
![]() ![]() ![]() its always good to see SmallTalk problems and solutions - good for learning Keep on with the tool , look forward to seeing it! ... what does [ ^ self ] mean? [This message has been edited by cristian_vogel (edited 29 October 2008).] IP: Logged | |
mk23 Member |
![]() ![]() ![]() SSC: thanks for the code fragment, I am slowly unraveling it :-) I'm still playing with it, will have more questions soon!
quote: indeed, this code snippet has kick started my Smalltalk studies again....
quote: I was wondering this as well. After a fair bit of googling on Smalltalk this week I came across a good description on this page: http://www.inf.ufsc.br/poo/smalltalk/ibm/tutorial/chap3.html read the section "Returning a Value". Clarifies it well in my opinion. Best David [This message has been edited by mk23 (edited 05 November 2008).] IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.