On Fri, Jan 21, 2011 at 10:19 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 21 January 2011 19:06, Eliot Miranda <eliot.miranda@gmail.com> wrote:
>
>
> On Fri, Jan 21, 2011 at 2:34 AM, Igor Stasenko <siguctua@gmail.com> wrote:
>>
>> On 21 January 2011 11:28, Sven Van Caekenberghe <sven@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.

there should be something from VM side, otherwise how else?
unless, of course, image are in total control of host window
creation/deletion, then of course it could
decide what to do by own.

>>
>> > Sven
>> >
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>
>



--
Best regards,
Igor Stasenko AKA sig.