Hi
First off I admit to having never used Squeak or any Smalltalk in anger (or even in a very slight temper). I have looked over Squeaks shoulder several times though in the last couple of years and it always fascinates me. I have a play, think, not sure how to actually build anything in this and scuttle off back to python land or java land or whatever. I think, this time I might get further.
Ok, I have an application (this is hobby time not work time) in Python that is a software defined radio, running in two parts over a network. The server and the client part communicate using Pyro (a distributed object protocol for Python). The server is mostly 'C' with Python wrappers. For this experiment I intend leaving the server much as it is except I have to connect to it from Squeak. I guess I would have to use plain sockets and devise a text based message protocol to get these two parts to communicate.
First question - is there any better way (meaning higher level) way to do this communication, perhaps using Squeak on both sides. I could arrange for the server side Squeak to talk to the 'C' processes through named pipes if this makes things easier. The server is on Linux (Suse 9.3) by the way. The client in on Windows XP.
Second question - well actually quite a few questions. I have been playing with Morphic as the major part of what I would need to build is the UI. Having found the tutorials not particularly helpful in explaining how to build a UI I have discovered/questions on the following, which is no doubt only the tip of the iceberg.
1. I find the Supplies and Widgets flaps a bit odd. The widgets seem to be what I would best describe as applets and the supplies what I would best describe as widgets. At first I though, where is everything, expecting to see all the usual suspects for building a UI but finding (to me) a rather odd and small selection of bits. I then found that the 'new morph' menu item gives a huge selection of parts and buried in there I have found quite a number of the more standard parts although how to use them is another question. I didn't find things like check box, radio button and box but I assume they are somewhere. At the risk of being shot down I think the flaps and their contents, with the possible exception of the tools detract from the overall look of the default distribution. Some better crafted graphics and a better selection would make all the difference.
2. Ok, so I can drop parts onto the main window and play with them. It took me a while to work out there is for example an 'Alignment Morph', which I could then turn into a window and add components to it. There also seem to be some layout managers/sizers (not sure what Squeak calls them). I guess if I work at this long enough I would figure out how to combine alignment panels and layouts to get a finished UI with the correct layout and resize behaviour. Is this the way people do it, just work it out for themselves or did I miss a whole load of info somewhere.
3. Having got my layout, what do I do with it? I am used to GUI builders that drop code. I found several menu items, but none seemed to help.
4. While playing I got a lot of 'Message Not Understood' errors. Bearing in mind I'm not writing any code yet why do I get these. Mostly they can be Abandoned but occasionally I get a whole string of them that brings the thing to its knees and I have to restart. Some morphs I have tried also throw errors immediately and every time I mouse over them. How do you get rid of these as you can't bring up the halo.
Sorry for a lot of questions but I wanted to get as far as I could in a reasonable amount of time and then fire enough off to get me to next base. If you only know the answer to one question, please don't hold off as any info will help me move forward.
Thanks
Bob
*** Confidentiality Notice *** Proprietary/Confidential Information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply email.
Hi Bob, I'll take a stab at this. Thanks for the feedback. There is a lot of history here and the situation is complex. One would almost have to answer that Squeak does not at this moment provide the kind of stable UI development platform you're looking for. But, you should investigate the BobsUI package that was just posted on this list, it has long been the nearest thing to a "standard" widgets library. And, investigate the Tweak project, which has a greatly cleaned up UI framework - *if* it's stable enough to base work a project on right now, perhaps others can say more about that.
Hi Bob,
I guess I've been through something similar too, having done UI's in Delphi before. Luckily I also work in DCL (Dialogue Contol Language) which is a textual description where you put your widgets into groups of rows and columns. I found an example of this kind in Sunit's TestRunner.
So after this I've done one UI by just programming a method like in TestRunner>>openAsMorph (at least in 3.6 and 3.7) and then doing manual alignments for my aesthetic preferences.
Actually I find this method easier than what you do in Delphi/VB as soon as you have changes like: "I need another group of controls between these two groups of controls". This ends up in a lot of manual dragging and resizing.
But then I'm used to doing a sketch on paper (which I can do by just placing the widgets on screen in Squeak) and writing down my DCL.
The other UI I did in Squeak just ignores the MS-Office design. It just has a MonthMorph as to select a date, a PluggableListMorph to select a person and several alpha blended rectangular Morphs as a display on what this person spent it's time on. It will get another selector for products and to change the display to day week or Month.
I just opened these elements (except for the display, which is an independent class) from the workspace, put them where I needed them and plugged them into the data model which digs the information out of a Mysql database.
1- I surely believe that it would take a more effort to do this in the conventional style. 2- I'm sure that when I hand the program to the users, I will not need to explain how to use it.
Simon already pointed to Bob's UI, at the time I tried it (3.6), I had some problems loading it and it couldn't match Delphi.
My experience was, when I stopped reading every morphic example with the expectation to find something like Delphi, the frustration stopped. And believe me, I was frustrated :-))
BTW I just stumbled over Mezzo http://symphonyos.com/laws.html or google for MezzoGraypaper.pdf
Couldn't agree more, the MS-Office style of UI is not the solution for all GUI's.
Cheers,
Herbert mailto:herbertkoenig@gmx.net
Hi!
Second question - well actually quite a few questions. I have been playing with Morphic as the major part of what I would need to build is the UI
Perhaps you might be interested in using Seaside to design your GUI. Instead of manipulating morphic, you can define a web front end css aware. From my experience, using seaside proofed to be a better choice than using morphic.
Cheers, Alexandre
On Fri, Oct 28, 2005 at 02:01:28PM +0100, Bob.Cowdery@CGI-Europe.com wrote:
Ok, I have an application (this is hobby time not work time) in Python that is a software defined radio, running in two parts over a network. The server and the client part communicate using Pyro (a distributed object protocol for Python). The server is mostly 'C' with Python wrappers. For this experiment I intend leaving the server much as it is except I have to connect to it from Squeak. I guess I would have to use plain sockets and devise a text based message protocol to get these two parts to communicate.
First question - is there any better way (meaning higher level) way to do this communication, perhaps using Squeak on both sides. I could arrange for the server side Squeak to talk to the 'C' processes through named pipes if this makes things easier. The server is on Linux (Suse 9.3) by the way. The client in on Windows XP.
If you want a Squeak server to talk to your 'C process' through OS pipes, you can do this with class PipeableOSProcess. You need to load the packages OSProcess and CommandShell from SqueakMap (PipeableOSProcess is in the CommandShell package). If your 'C process' interacts with the world through stdin and stdout streams, this would be a reasonable thing to do. This only works on Unix/Linux, but it would be fine for your Linux server.
Also, if you want to have two Squeak images running as client and server, it is convenient to have one of them start the other one with "OSProcess thisOSProcess forkSqueakAndDo: [something]" or "OSProcess thisOSProcess forkHeadlessSqueakAndDo: [something]" (to start a headless Squeak server with no UI). You can't do this from your Windows XP system, but if you are developing on your Linux box it may come in handy.
Dave
squeak-dev@lists.squeakfoundation.org