<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Thanks Rodney and Jay for your comments.</DIV>
<DIV> </DIV>
<DIV>Here are a few points I'd like to add to this discussion.</DIV>
<DIV> </DIV>
<DIV>1. I agree with Jay that command line arguments would be better than environment variables.</DIV>
<DIV> </DIV>
<DIV>2. I agree with Rodney that the "laziness property" must be set before data gets read/written and that it should be set only once, not changed during execution.</DIV>
<DIV> </DIV>
<DIV>3. A drawback to using command-line variables (and env vars) is that it shifts the responsibility from the programmer to the user. IMO, this type of behavior is something that is "designed" and documented as part of the program, so it should not be changeable by the user. For example, if the user fails to put the appropriate parameter on the command-line, the program's behavior changes. In effect, this is sort of what has happened to me, that is, the behavior of my cm3 v4.1 gui-mode program(s) has changed from its design because the underlying implementation changed to use lazy console allocation and I have no way of getting the old behavior back without changing the implementation.</DIV>
<DIV> </DIV>
<DIV>4. Perhaps a better approach would be to devise a new option for the compiler. For example, "-gui" works as now and uses lazy console allocation. "-gui_no_lazy" works the way -gui did in 4.1 where the Stdio.stdin/stderr/stdout would be NIL for a gui-mode program. The problem here is I'm not sure exactly how to implement it. In effect, use of this option would mean we would need to swap (i.e., choose) the implementation of Process.m3 at compile time, OR we would need some way to ensure the Stdio variables get set to NIL after the current Process.m3 initialization (thereby undoing the lazy allocation). Maybe one of these methods can be done via quake somehow, but I'm not sure how to go about it. Any ideas?</DIV>
<DIV> </DIV>
<DIV>5. If I'm the only person having this issue with the lazy allocation, perhaps I can adapt my programs. Perhaps I can just set the Stdio variables to be NIL at the beginning of my mainline code for programs I know should be compiled as -gui. This brings to mind an idea for how to implement -gui_no_lazy. Do you think we could write some quake code that causes a new module implementation to be included in the program whenever the target is NT386 AND the -gui_no_lazy option is set? This new implementation would import from Stdio and all it would do is set the Stdio vars to be NIL. Since it imports from Stdio and Stdio imports Process, I would tend to think that Process and Stdio module initializations would be run before this new module initialization thereby ensuring the lazy allocated consoles get set to NIL. What do you think?</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy<BR><BR>>>> "rodney.bates" <rodney.bates@wichita.edu> 6/21/2008 10:18 AM >>><BR>I guess I am on a somewhat different wavelength on this. I do<BR>agree that a complete set of queries by the application should<BR>be supported, concerning lazy allocated streams. But to me,<BR>applications need to have either very little or nothing in the<BR>way of ability to change behaviour.<BR><BR>For one thing, it makes sense for the lazy property to apply<BR>only to stdout/stderr, on win32 platforms, compiled as -gui.<BR>This is why I was questioning getting a stream from FileWr.Open,<BR>and then setting it lazy. Laziness doesn't make any sense on<BR>a disk file.<BR><BR>Beyond that, I think at the most, an application should be able <BR>to change the laziness property only before any data has been<BR>written to the stream. After that, the window is already popped,<BR>and the semantics would get ugly.<BR><BR>In fact, I am very skeptical about the need for an application <BR>to change laziness at all. If it can query this property, then<BR>it can just refrain from writing to the steam, if it doesn't want<BR>the window to pop up.<BR><BR>Hence my objection to making the properties variables, not because<BR>of general principal, but because an application could assign to<BR>them at any time.<BR><BR>>===== Original Message From Jay <jayk123@hotmail.com> =====<BR>>set CM3_ConsoleBehavior=4.1<BR>>m3guiapp<BR>>console behavior still changed<BR>><BR>>m3guiapp @M3ConsoleBehavior=4.1<BR>>console behavior back to "default"<BR>> - Jay><BR><BR>Rodney Bates<BR>Retired assistant professor<BR>Computer Science<BR><BR><BR></DIV></BODY></HTML>