On Fri 20 Mar, Georg Gollmann wrote:
Does this mean that the image HAS to know whether it runs headless
or not ? No, not at all. If you were to change the startup sequence to check for some flag for head/nohead, you could simply do/not-do the #beDisplay. The image would still be able to think of itself as having a Display form, but the VM would not have been told about it and so no window would appear and no attempt to call ioShowDisplay() would occur. There may be some issues about the event loop for some machines and situations.
For my current applications it is very convenient to have a single
image
that runs unchanged either with or without a window.
Sounds fine to me. For you a suitable flag for headlessness might be the existence of a certain file, or maybe an environment variable, or maybe some #getAttribute: result that refelcts a command line option for the VM. It's up to you. I think this is the key point of my suggestion; it is simply a mechanism to allow the VM to not open a 'real' window until and unless you want one. To extend the point a little, a headless image could still open a window if some error ocurred that needed attention, by adding the send of #beDisplay somewhere in the Notifier opening. I guess one might want to keep an image flag indicating whetheror not the window had already been opened. Of course, with more advanced work, the notifier might choose to use a socket to inform some remote machine of the problem and keep the image headless.
So it´s "your mileage may vary", I guess.
Most definitely. With the suggested VM changes, nobody would even notice the difference in a 'normal' image.
tim
Greetings...
I'm trying to find out if there is currently any work going on in the "pure" object world. I've read all I can on the "Self" language, but I'm still looking for more. I'm currently working on extending some of the object design notations (Coad notation and UML) to handle Self-like concepts of prototypes, object inheritance, etc. Pure object thinking works great with the object model patterns Peter Coad and I have written about. I just need to find some pure object thinkers to exchange ideas with.
Thanks,
Mark Mayfield
___________________________________________________________ Mark Mayfield mmayfield@netexplorer.com
"I am an architect. I know what is to come by the principles on which it is built."
Howard Roark in Ayn Rand's "The Fountainhead"
squeak-dev@lists.squeakfoundation.org