View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 3 - Fisnik Shpuza

In detail, describe a problem that you experienced in Squeak. What was the problem? Why did it happen? How did you eventually overcome this problem?

One major problem that I experienced during Milestone 2 was to make a file browser and choose a file and then get the name from that file. The problem was that there is not a class in Squeak that is called "filebrowser" or alike, which i think is the most intuitive name for such an object. Instead there were a lot of classes named FileList or similar etc.
I could see that various objects in Squeak used similar objects, but I could not find out how to invoke one from written code. I started messing around with all objects that had a file browser. The most interesting one that I found, which had all the functionality that I needed was that of the media player. I browsed on the class of the media player and in less then 5 minutes (after more then 2 hours of searching) I had a file browser that was allowing me to restrict the kind of files that could be seen, and getting the full file path to the chosen file.
Thus my solution to the above mentioned problem was all in one line of code that I found ready at the mediaplayer class.

yourTempvar := FileList2 modalFileSelectorForSuffixes: #('gif' 'jpg').

The above code opens a new file browser allowing the user to browse the system, and choose files with extentions gif and jpg only. After chosing the yourTempvar will have the path to the chosen file.


Discussion 3 - Jiasheng He discussion got my attention because the feature he found Whisker Browser seems to be very usefull when you have only a 17" CRT. I struggled with minimazing and maximazing the windows of my file and class browsers trying to create some real estate for my work space, but once I got to try the multi method browsing capabilities this feature gives you i could not get my hands off squeak.


Discussion 3 - Vishal Patel. In his discussion Vishal points out a the color/indent feature that it's a must for all those who have previously programmed using an IDE. I did not know of this feature even though it was infront of me all the time. The indent feature on lets you see the code in an organized way, pointing out loops, if statements etc. Besides tha, this feature will let you know of any misspells, methods already declared etc.

Links to this Page