| Perhaps you should try putting each icon in it's own button that has selectors which refer to the icon. – Andrew Sayman |
| Here are two cases pages that may be of help to you: M5 - Persistence. and HOW TO USE DOMXML – Andrew Sayman |
| Try fitContents – Andrew Sayman |
Try this (taken from the resize/collapse category of SystemWindow):swin setBoundsWithFlex: (0@0 extent:600@600) Also, taken from the example page that I posted below: swin openInWorldExtent: 600@600 – Andrew Sayman |
| I really need the error message from this to help you specifically, but I can give you some ideas. Firstly, changeSelected: expects a message that can accept a parameter, so you should be passing it something like #indexChanged: or #functionName:. Secondly, the reason it works with nil is because PluggableListMorph checks to see if you've given it nil and then does nothing. What's happening here is probably that it's trying to send a signal that doesn't accept the parameter it expects, or you've not implemented the methods in your model. You may want to have a look at this page for a sample, working PluggableListMorph – Andrew Sayman |
| It's referring to a class method. – Andrew Sayman |
| Using a single SUnit class to test multiple networking classes is ok. Jeff |
| If you just want to display text, you should probably use StringMorph instead. Are you trying to do something different? – Andrew Sayman |
| In addition to Andrew's suggestion, you can call the message 'lock: true' on the TextMorph, and it will make it uneditable. – Troy Brant |
| As far as I can tell from my experiments in 3.5, that's not true. – Andrew Sayman |
| PluggableTextMorph is a subclass of ScrollPane. ScrollPane has the very obviously named method hideScrollBar. That should work for you if you just want to make the scrollbar go away. – Andrew Sayman |
| It seems you've answered you own question here. Squeak may not be very strongly typed, but you expect certain types, and your program fails if not given them. – Andrew Sayman |
| ALT-(period) . It'll break you out of that nasty inifinate loop. – Troy Brant |
| Also, your changes are not gone! See the 2340 Squeak FAQ , and scroll down to "Squeak crashed I've lost a lot of changes! What can I do?" -Lex Spoon |
| If some set of Squeak classes are critical to your design, and now showing them makes certain details unclear, then you should put them there. – Andrew Sayman |
| Yes. SIXX provides methods for both writing an object out to a string and reading it back in. Jeff |
GIFReadWriter putForm: Display onFileNamed: 'test.gif'
form := GIFReadWriter formFromFileNamed: 'test.gif'
| More explicitly, you cannot use pre-loading images as a mechanism to avoid passing images around via the network. So you can cache once you've pulled the images down (to make loading faster next time, for example), but you then have to check to verify that the image you've cached hasn't changed. Jeff |
| Lex, what do you mean "whenever the image changes"? Is there a requirement that the user be able to load in any image from disk? Or do you mean if the user decides to change his icon selection to another one (that's already predefined)? –Sebastian Becerra |
| I only meant, changes during the development of your program. Graphics must be developed just like code.... -Lex Spoon |
| That's ok, I meant that "whenever the image changes" means when any user changes his icon, your system needs to pull down the new icon and use it. For this milestone don't worry about dynamic updating (e.g. a user changes his icon repeatedly while a client is connected to your map server), but every time your client connects to the server it should check to see if it needs to download new images. Jeff |
| Yes, but make sure your team does so because they think it's the appropriate design to use, not because it's the easiest. Jeff |
| Both the user icon and the map should be images. Jeff |
| Nope, we were just mathematically challenged when we assigned the original points. It's fixed now. Jeff |
| It's up to your group to decide exactly what you think the right pieces of functionality are to test (although feel free to consult with your TA to get feedback about whether or not you're on the right track). As a general rule of thumb, it's tough to unit test graphical interfaces, because they generally require action by the user. But you can unit test network interfaces in many cases; just connect to the local host (127.0.0.1). Jeff |
| Multiple catch blocks as in nested, or as in multiple catches for a single block? The former should be straightforward, though I haven't tried it. For the latter case, catch an exception higher in the hierarcy (like Exception) and test it at run time to see what type it is. Jeff |
| They must be able to run in separate Squeak images (and different machines), but you're welcome to write the code so that it also works on a single machine and in a single image. Jeff |
| See the OODesign lecture notes; slide 56. (Delay forSeconds: 1) wait. Jeff |
| See Lex's comment below: Squeak processes are actually closer to threads. Jeff |
| I will be moving up that lecture, I just haven't decided exactly where to put it yet (discussing UI development is critical for the project too. In the short term, take a look at the networking powerpoint slides from previous 2340 offerings and look through OT chapter 4. Jeff |
| Discover the "Edit" button. It's your friend. |
| Lex Spoon has helpfully put together a simple chat program as an example of networking in Squeak. Jeff |
| A Smalltalk "Process" is actually a thread, by today's terminology. It runs in the same address space. However, processes at the same priority do not preempty each other in Squeak; so don't fork something that uses 100% CPU. This said, you might want to try designs that use only one thread. If you use the usual threading approach of spawning a thread per connection and then trying to use locks to protect them from trampling on each other, you end up with a program that mostly works but has occasional weird crashes and hangs. It's hard to get all the locks correct, and it's hard to debug the problems when you have errors. But, it's up to you... Thread per Connection? -Lex Spoon |