On 21 January 2011 19:53, Eliot Miranda <eliot.mira...@gmail.com> wrote: > > > On Fri, Jan 21, 2011 at 10:19 AM, Igor Stasenko <siguc...@gmail.com> wrote: >> >> On 21 January 2011 19:06, Eliot Miranda <eliot.mira...@gmail.com> wrote: >> > >> > >> > On Fri, Jan 21, 2011 at 2:34 AM, Igor Stasenko <siguc...@gmail.com> >> > wrote: >> >> >> >> On 21 January 2011 11:28, Sven Van Caekenberghe <s...@beta9.be> wrote: >> >> > >> >> > On 21 Jan 2011, at 11:19, Igor Stasenko wrote: >> >> > >> >> >>> What is interesting (and we might make that an option) is that the >> >> >>> 'no >> >> >>> display' error results in the image being saved 'headfull' so that >> >> >>> you can >> >> >>> start it up using a display to debug it (suspended >> >> >>> process/debugger). >> >> >> >> >> >> That could be done.. but not as userful as simply report an error. >> >> >> Usually we (developers) knowing what we want to do, >> >> >> and what i don't want to see in my headless image is any attempts to >> >> >> access display/ui. >> >> > >> >> > Yeah, that's why I said it would better be an option. The first thing >> >> > to >> >> > do is simply report the error (and quit, or maybe that should be an >> >> > option >> >> > too). But many people playing with headless images (myself included) >> >> > have >> >> > had blocking/locked up images: having a log would be great, but >> >> > adding this >> >> > option to debug the cause further would be great. >> >> > >> >> >> >> this is next step.. >> >> >> >> I think this could be set by preference system >> >> on error: >> >> - print error to log and quit >> >> - print error to log and do save & quit >> >> - print error to log and do save new version & quit >> >> >> >> In future , by adding support from VM side we could also have: >> >> - switch to interactive(headfull) mode, by creating an OS window >> >> opening debugger , showing dialog(s) etc etc >> > >> > The VW headful/headless switch requires _no_ additional VM support at >> > all. >> > All one needs is stdio support (which we have) and everything else can >> > be >> > done in Smalltalk. >> > >> >> err.. no additional support? you mean it already in there? >> - how to tell VM to close everything at runtime and become headless > > There's an openDisplay primitive that is used ever time the system comes up > headless. IFAIA one never goes directly headless from a headful state. > Instead one saves headless and resumes the snapshot headless. "Saving > headless" means doing a snapshot that sets a variable such that when the > saved image resumes it doesn't do an openDisplay. What one does do is > dynamically become headful, and to do that one just uses the openDisplay > primitive. (FYI openDisplay is primitive #960). >> >> - how to tell VM to create a new window(s) and turn from headless to >> headful mode? > > Use openDisplay. >
that what i meant by saying 'VM support' SqueakVMs don't have such primitive. But maybe we don't need it, because i think it would be much better to give image a full control upon creation/closing of host windows. So, image could decide by own what to do (and then you even don't need to a special handling in VM for headless mode, since it will be a decision which image does, not VM). -- Best regards, Igor Stasenko AKA sig.