stdout n Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

stdout n Windows

Charles A. Monteiro-2
When I run the snippet below , it bombs on an access denied error. Is  
there anything that I need to do to configure Windows to allow me to  
utilize this? BTW, the snippet below is basically mirroring code found in  
the ImageConfigurationSubsystem class.



thanks

Charles

System Configuration:

Windows XP service pack 1
VisualWorks 7.3

Workspace:

"PRINTING TO STANDARD OUT"

stream :=  (Filename named: 'CONOUT$') writeStream.
stream nextPutAll: 'Hello World'.
stream close.


Stack dump:

Unhandled exception: ERROR_ACCESS_DENIED ("CONOUT$")
HandleRegistry>>evaluateWithFullProtection:
HandleRegistry>>registerValueOf:
PCDiskFileAccessor class(OSHandle class)>>handleValue:
IOAccessor class>>openFileNamed:direction:creation:
FileConnection>>open
FileConnection>>setName:mode:creationRule:
FileConnection class>>openFileNamed:mode:creationRule:
FileEncodedStreamConstructor>>writeStream
NTFSFilename(Filename)>>writeStream
UndefinedObject>>unboundMethod
UndefinedObject(Object)>>performMethod:arguments:
UndefinedObject(Object)>>performMethod:
TextEditorController(ParagraphEditor)>>evaluateCompiled:
optimized [] in ParagraphEditor>>evaluateSelection
BlockClosure>>ensure:
Cursor>>showWhile:
TextEditorController(ParagraphEditor)>>evaluateSelection
optimized [] in ParagraphEditor>>doIt
BlockClosure>>on:do:
TextEditorController(ParagraphEditor)>>doIt
TextEditorController>>dispatchMenuSymbol:
TextEditorController>>dispatchMenuSelection:
TextEditorController(ControllerWithMenu)>>processMenu:at:centered:
TextEditorController(ControllerWithMenu)>>processMenuAt:centered:
TextEditorController(ControllerWithMenu)>>yellowButtonPressedEvent:
TextEditorController(ParagraphEditor)>>yellowButtonPressedEvent:
TextEditorController>>yellowButtonPressedEvent:
YellowButtonPressedEvent>>dispatchTo:
TextEditorController(ControllerWithMenu)>>handleEvent:
EventDispatcher>>dispatch:to:
EventDispatcher>>dispatchEvent:
YellowButtonPressedEvent(Event)>>dispatch
YellowButtonPressedEvent(Event)>>dispatchForWindowManager:
optimized [] in WindowManager>>safelyDispatchForWindowManager:
BlockClosure>>on:do:
WindowManager>>safelyDispatchForWindowManager:
WindowManager>>processNextEvent
optimized [] in [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:

----------------------------------------------------------------------
HandleRegistry>>evaluateWithFullProtection:
Receiver:
        a HandleRegistry
Instance Variables:
        tally = 2
        valueArray = a WeakArray[79]
        executors = an Array[79]
        accessLock = a RecursionLock
Arguments:
        aBlock = BlockClosure [] in HandleRegistry>>registerValueOf:
Temporaries:
        exception = an OsInaccessibleError
        return = nil
        newException = an OsInaccessibleError
Context PC = 39

----------------------------------------------------------------------
HandleRegistry>>registerValueOf:
Receiver:
        a HandleRegistry
Instance Variables:
        tally = 2
        valueArray = a WeakArray[79]
        executors = an Array[79]
        accessLock = a RecursionLock
Arguments:
        aBlock = BlockClosure [] in OSHandle class>>handleValue:
Context PC = 9

----------------------------------------------------------------------
PCDiskFileAccessor class(OSHandle class)>>handleValue:
Receiver:
        a PCDiskFileAccessor class
Instance Variables:
        superclass = PCIOAccessor
        methodDict = a MethodDictionary[6]
        format = 16386
        subclasses = nil
        instanceVariables = nil
        organization = ('accessing' #commit)
('defaults' #connectionClass)
('stream creation' #readWriteStream)
('synchronization' #setSem:forWrite:)
('testing' #isSeekable)
('locking' #lock:for:)

        name = #PCDiskFileAccessor
        classPool = nil
        environment = a NameSpace[109]
Arguments:
        aBlock = BlockClosure [] in IOAccessor  
class>>openFileNamed:direction:creation:
Context PC = 10

----------------------------------------------------------------------
IOAccessor class>>openFileNamed:direction:creation:
Receiver:
        an IOAccessor class
Instance Variables:
        superclass = OSHandle
        methodDict = a MethodDictionary[43]
        format = 16386
        subclasses = an Array[3]
        instanceVariables = nil
        organization = ('initialize-release' #close)
('accessing' #bufferSize #commit #descriptor #fileSize #truncateTo:)
('testing' #isActive #isSeekable)
('positioning' #seekTo:)
('data transfer' #readInto: #readInto:startingAt:for:  
#readInto:startingAt:for:untilFalse: #readInto:untilFalse: #writeAll:  
#writeFrom: #writeFrom:startingAt:for:  
#writeFrom:startingAt:for:untilFalse: #writeFrom:startingAt:forSure:)
('constants' #lineEndConvention #readPauseInterval #writePauseInterval)
('connections' #asExternalConnection)
('stream creation' #readAppendStream #readStream #writeStream)
('printing' #printOn:)
('defaults' #connectionClass #defaultClass)
('synchronization' #ioWait #ioWaitWithTimeoutMs: #readWait  
#readWaitWithTimeoutMs: #setSem:forWrite: #writeWait  
#writeWaitWithTimeoutMs:)
('finalization' #finalize)
('private-primitives' #primBufferSize #primClose #primGetDescriptor  
#primGetSize #primReadInto:startingAt:for: #primSeekTo:  
#primWriteFrom:startingAt:for:)

        name = #IOAccessor
        classPool = a NameSpaceOfClass[2]
        environment = a NameSpace[109]
Arguments:
        nm = 'CONOUT$'
        rwMode = 1
        creationRule = 3
Context PC = 11

----------------------------------------------------------------------
FileConnection>>open
Receiver:
        a FileConnection
Instance Variables:
        inputDescriptor = nil
        outputDescriptor = nil
        fileName = a PortableFilename('CONOUT$')
        rwmode = #writeOnly
        creationRule = #truncateOrCreate
        rememberedPosition = nil
Context PC = 20

----------------------------------------------------------------------
FileConnection>>setName:mode:creationRule:
Receiver:
        a FileConnection
Instance Variables:
        inputDescriptor = nil
        outputDescriptor = nil
        fileName = a PortableFilename('CONOUT$')
        rwmode = #writeOnly
        creationRule = #truncateOrCreate
        rememberedPosition = nil
Arguments:
        aName = a NTFSFilename('CONOUT$')
        aRwMode = #writeOnly
        aCreationRule = #truncateOrCreate
Context PC = 11

----------------------------------------------------------------------
FileConnection class>>openFileNamed:mode:creationRule:
Receiver:
        a FileConnection class
Instance Variables:
        superclass = ExternalConnection
        methodDict = a MethodDictionary[13]
        format = 16390
        subclasses = nil
        instanceVariables = an Array[4]
        organization = ('accessing' #dataSize #fileName #logicalName #name)
('io buffer creation' #defaultIoBuffer #defaultIoBufferInMode:)
('testing' #canPersist)
('status' #isActive #open)
('persistence' #rememberedPosition #rememberPosition: #revive)
('private' #setName:mode:creationRule:)

        name = #FileConnection
        classPool = nil
        environment = a NameSpace[109]
Arguments:
        aName = a NTFSFilename('CONOUT$')
        rwMode = #writeOnly
        creationRule = #truncateOrCreate
Context PC = 9

----------------------------------------------------------------------
FileEncodedStreamConstructor>>writeStream
Receiver:
        a FileEncodedStreamConstructor
Instance Variables:
        dataRepository = a NTFSFilename('CONOUT$')
        encoding = #default
Context PC = 9

----------------------------------------------------------------------
NTFSFilename(Filename)>>writeStream
Receiver:
        a NTFSFilename
Instance Variables:
        osName = a ByteArray[7]
        publicName = 'CONOUT$'
        logicalName = nil
Context PC = 7

----------------------------------------------------------------------
UndefinedObject>>unboundMethod
Receiver:
        an UndefinedObject
Context PC = 7

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:arguments:
Receiver:
        an UndefinedObject
Arguments:
        method = AnnotatedMethod UndefinedObject>>unboundMethod
        args = an Array[0]
Context PC = 5

----------------------------------------------------------------------
UndefinedObject(Object)>>performMethod:
Receiver:
        an UndefinedObject
Arguments:
        method = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 5

----------------------------------------------------------------------
TextEditorController(ParagraphEditor)>>evaluateCompiled:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        aMethod = AnnotatedMethod UndefinedObject>>unboundMethod
Temporaries:
        context = nil
Context PC = 13

----------------------------------------------------------------------
optimized [] in ParagraphEditor>>evaluateSelection
Receiver:
        an UndefinedObject
Temporaries:
        .self = a TextEditorController
        .code = AnnotatedMethod UndefinedObject>>unboundMethod
Context PC = 7

----------------------------------------------------------------------
BlockClosure>>ensure:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in ParagraphEditor>>evaluateSelection
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        aBlock = BlockClosure [] in Cursor>>showWhile:
Temporaries:
        result = nil
Context PC = 4

----------------------------------------------------------------------
Cursor>>showWhile:
Receiver:
        a Cursor
Instance Variables:
        errorCode = 0
        handle = 4
        image = Depth1Image(extent: 16@16 depth: 1)
        mask = Depth1Image(extent: 16@16 depth: 1)
        hotSpot = 1@1
        name = 'xeq'
Arguments:
        aBlock = BlockClosure [] in ParagraphEditor>>evaluateSelection
Temporaries:
        oldcursor = Cursor normal
Context PC = 23

----------------------------------------------------------------------
TextEditorController(ParagraphEditor)>>evaluateSelection
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Temporaries:
        code = AnnotatedMethod UndefinedObject>>unboundMethod
        result = nil
Context PC = 14

----------------------------------------------------------------------
optimized [] in ParagraphEditor>>doIt
Receiver:
        an UndefinedObject
Temporaries:
        .self = a TextEditorController
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in ParagraphEditor>>doIt
        outerContext = nil
        copiedValues = a TextEditorController
Arguments:
        anExceptionSelector = CompilationError
        handlerBlock = BlockClosure [] in ParagraphEditor>>doIt
Context PC = 18

----------------------------------------------------------------------
TextEditorController(ParagraphEditor)>>doIt
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Context PC = 20

----------------------------------------------------------------------
TextEditorController>>dispatchMenuSymbol:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        menuSelection = #doIt
Context PC = 10

----------------------------------------------------------------------
TextEditorController>>dispatchMenuSelection:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        menuSelection = #doIt
Context PC = 20

----------------------------------------------------------------------
TextEditorController(ControllerWithMenu)>>processMenu:at:centered:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        aMenu = a Menu
        aPoint = 260@376
        centered = true
Temporaries:
        valueResult = a MenuItem 'Do it'
Context PC = 41

----------------------------------------------------------------------
TextEditorController(ControllerWithMenu)>>processMenuAt:centered:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        aPoint = 260@376
        centered = true
Context PC = 9

----------------------------------------------------------------------
TextEditorController(ControllerWithMenu)>>yellowButtonPressedEvent:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        event = a YellowButtonPressedEvent
Context PC = 13

----------------------------------------------------------------------
TextEditorController(ParagraphEditor)>>yellowButtonPressedEvent:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        event = a YellowButtonPressedEvent
Context PC = 9

----------------------------------------------------------------------
TextEditorController>>yellowButtonPressedEvent:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        anEvent = a YellowButtonPressedEvent
Context PC = 19

----------------------------------------------------------------------
YellowButtonPressedEvent>>dispatchTo:
Receiver:
        a YellowButtonPressedEvent
Instance Variables:
        time = -473010090
        initiator = an EventDispatcher
        window = an ApplicationWindow 988
        state = 2
        x = 134
        y = 189
        gx = 260
        gy = 376
        buttonNumber = 2
Arguments:
        anObject = a TextEditorController
Context PC = 4

----------------------------------------------------------------------
TextEditorController(ControllerWithMenu)>>handleEvent:
Receiver:
        a TextEditorController
Instance Variables:
        model = a PluggableAdaptor
        view = a TextEditorView
        sensor = a TranslatingSensor
        menuHolder = a ValueHolder on: a Menu
        performer = a WorkspacePage
        beginTypeInIndex = nil
        anchorIndex = 1
        emphasisHere = nil
        dispatchTable = a DispatchTable
        charComposer = a CharacterComposer
        textHasChanged = false
        feelPolicy = a CodingFeelPolicy
        supportCodeEditingFeels = true
        localMenuItems = an Array[21]
        extendingDown = true
        keyboardProcessor = a KeyboardProcessor
        keyboardHook = nil
        readOnly = false
        accepted = true
        autoAccept = false
        continuousAccept = false
        tabMeansNextField = true
        tabRequiresControl = true
        dispatcher = an UIDispatcher
Arguments:
        anEvent = a YellowButtonPressedEvent
Context PC = 24

----------------------------------------------------------------------
EventDispatcher>>dispatch:to:
Receiver:
        an EventDispatcher
Instance Variables:
        windowController = an ApplicationStandardSystemController
        currentMouseConsumer = nil
        grabbingMouse = false
        keyboardProcessor = a KeyboardProcessor
        lastControlObject = a TextEditorController
        trapList = nil
        state = nil
        repairDamageWhenDebugging = true
        flushQueueAfterError = true
        distributeEventsWhenDebugging = true
        dragDropInProgress = false
        dragDropTracker = nil
        dispatchUnknownEvents = false
Arguments:
        event = a YellowButtonPressedEvent
        object = a TextEditorController
Temporaries:
        tmp = nil
Context PC = 10

----------------------------------------------------------------------
EventDispatcher>>dispatchEvent:
Receiver:
        an EventDispatcher
Instance Variables:
        windowController = an ApplicationStandardSystemController
        currentMouseConsumer = nil
        grabbingMouse = false
        keyboardProcessor = a KeyboardProcessor
        lastControlObject = a TextEditorController
        trapList = nil
        state = nil
        repairDamageWhenDebugging = true
        flushQueueAfterError = true
        distributeEventsWhenDebugging = true
        dragDropInProgress = false
        dragDropTracker = nil
        dispatchUnknownEvents = false
Arguments:
        event = a YellowButtonPressedEvent
Temporaries:
        objectWantingControl = a TextEditorController
        targetKeyboardProcessor = nil
Context PC = 113

----------------------------------------------------------------------
YellowButtonPressedEvent(Event)>>dispatch
Receiver:
        a YellowButtonPressedEvent
Instance Variables:
        time = -473010090
        initiator = an EventDispatcher
        window = an ApplicationWindow 988
        state = 2
        x = 134
        y = 189
        gx = 260
        gy = 376
        buttonNumber = 2
Context PC = 16

----------------------------------------------------------------------
YellowButtonPressedEvent(Event)>>dispatchForWindowManager:
Receiver:
        a YellowButtonPressedEvent
Instance Variables:
        time = -473010090
        initiator = an EventDispatcher
        window = an ApplicationWindow 988
        state = 2
        x = 134
        y = 189
        gx = 260
        gy = 376
        buttonNumber = 2
Arguments:
        aWinMgr = a WindowManager
Context PC = 4

----------------------------------------------------------------------
optimized [] in WindowManager>>safelyDispatchForWindowManager:
Receiver:
        an UndefinedObject
Temporaries:
        .event = a YellowButtonPressedEvent
        .self = a WindowManager
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in  
WindowManager>>safelyDispatchForWindowManager:
        outerContext = nil
        copiedValues = an Array[2]
Arguments:
        anExceptionSelector = BadControllerError
        handlerBlock = BlockClosure [] in  
WindowManager>>safelyDispatchForWindowManager:
Context PC = 18

----------------------------------------------------------------------
WindowManager>>safelyDispatchForWindowManager:
Receiver:
        a WindowManager
Instance Variables:
        windows = an OrderedCollection[1]
        activeController = nil
        interruptLock = false
        outstandingMetaOrDamage = false
        openInProgress = false
        eventQueue = an EventQueue
        baseProcess = a Process in Semaphore>>wait
        dontFilterEvents = false
Arguments:
        event = a YellowButtonPressedEvent
Context PC = 13

----------------------------------------------------------------------
WindowManager>>processNextEvent
Receiver:
        a WindowManager
Instance Variables:
        windows = an OrderedCollection[1]
        activeController = nil
        interruptLock = false
        outstandingMetaOrDamage = false
        openInProgress = false
        eventQueue = an EventQueue
        baseProcess = a Process in Semaphore>>wait
        dontFilterEvents = false
Temporaries:
        event = a YellowButtonPressedEvent
Context PC = 9

----------------------------------------------------------------------
optimized [] in [] in WindowManager>>newProcess
Receiver:
        an UndefinedObject
Temporaries:
        .self = a WindowManager
Context PC = 13

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in [] in WindowManager>>newProcess
        outerContext = nil
        copiedValues = a WindowManager
Arguments:
        anExceptionSelector = TerminateException
        handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess
Context PC = 18

----------------------------------------------------------------------
optimized [] in WindowManager>>newProcess
Receiver:
        an UndefinedObject
Temporaries:
        .self = a WindowManager
Context PC = 15

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
        a BlockClosure
Instance Variables:
        method = CompiledBlock [] in WindowManager>>newProcess
        outerContext = nil
        copiedValues = a WindowManager
Arguments:
        anExceptionSelector = TerminateException
        handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority:
Context PC = 18

----------------------------------------------------------------------
optimized [] in Process class>>forBlock:priority:
Receiver:
        an UndefinedObject
Temporaries:
        .aBlock = BlockClosure [] in WindowManager>>newProcess
Context PC = 9


--
Charles A. Monteiro

Reply | Threaded
Open this post in threaded view
|

Re: stdout n Windows

Mark Pirogovsky-3
Charles,

I think that it may depend on how you started your VW application.


I think that  'CONOUT$' may not be available to you if you start from
the shortcut.  It should be available when you start it from the command
prompt however.

Also it may  be dependent on your permission level.

Or maybe you need a specially built VM with the 'CONOUT$' support.

Also see the MS description on the subject:

Use the CONOUT$ value to specify console output.

CONIN$ gets a handle to the console input buffer, even if the
SetStdHandle function redirects the standard input handle. To get the
standard input handle, use the GetStdHandle function.

CONOUT$ gets a handle to the active screen buffer, even if SetStdHandle
redirects the standard output handle. To get the standard output handle,
use GetStdHandle.

!!!! When opening CONOUT$, specify FILE_SHARE_WRITE.

You should specify OPEN_EXISTING when using CreateFile to open the console.

!!!! CON GENERIC_READ GENERIC_WRITE Causes CreateFile to fail;
GetLastError returns ERROR_FILE_NOT_FOUND.
Windows Me/98/95:  Causes CreateFile to fail; GetLastError returns
ERROR_PATH_NOT_FOUND.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp


My 2c.

--Mark

Charles A. Monteiro wrote:

> When I run the snippet below , it bombs on an access denied error. Is  
> there anything that I need to do to configure Windows to allow me to  
> utilize this? BTW, the snippet below is basically mirroring code found
> in  the ImageConfigurationSubsystem class.
>
>
>
> thanks
>
> Charles
>
> System Configuration:
>
> Windows XP service pack 1
> VisualWorks 7.3
>
> Workspace:
>
> "PRINTING TO STANDARD OUT"
>
> stream :=  (Filename named: 'CONOUT$') writeStream.
> stream nextPutAll: 'Hello World'.
> stream close.
>
>
> Stack dump:
>
> Unhandled exception: ERROR_ACCESS_DENIED ("CONOUT$")
> HandleRegistry>>evaluateWithFullProtection:
> HandleRegistry>>registerValueOf:
> PCDiskFileAccessor class(OSHandle class)>>handleValue:
> IOAccessor class>>openFileNamed:direction:creation:
> FileConnection>>open
> FileConnection>>setName:mode:creationRule:
> FileConnection class>>openFileNamed:mode:creationRule:
> FileEncodedStreamConstructor>>writeStream
> NTFSFilename(Filename)>>writeStream
> UndefinedObject>>unboundMethod
> UndefinedObject(Object)>>performMethod:arguments:
> UndefinedObject(Object)>>performMethod:
> TextEditorController(ParagraphEditor)>>evaluateCompiled:
> optimized [] in ParagraphEditor>>evaluateSelection
> BlockClosure>>ensure:
> Cursor>>showWhile:
> TextEditorController(ParagraphEditor)>>evaluateSelection
> optimized [] in ParagraphEditor>>doIt
> BlockClosure>>on:do:
> TextEditorController(ParagraphEditor)>>doIt
> TextEditorController>>dispatchMenuSymbol:
> TextEditorController>>dispatchMenuSelection:
> TextEditorController(ControllerWithMenu)>>processMenu:at:centered:
> TextEditorController(ControllerWithMenu)>>processMenuAt:centered:
> TextEditorController(ControllerWithMenu)>>yellowButtonPressedEvent:
> TextEditorController(ParagraphEditor)>>yellowButtonPressedEvent:
> TextEditorController>>yellowButtonPressedEvent:
> YellowButtonPressedEvent>>dispatchTo:
> TextEditorController(ControllerWithMenu)>>handleEvent:
> EventDispatcher>>dispatch:to:
> EventDispatcher>>dispatchEvent:
> YellowButtonPressedEvent(Event)>>dispatch
> YellowButtonPressedEvent(Event)>>dispatchForWindowManager:
> optimized [] in WindowManager>>safelyDispatchForWindowManager:
> BlockClosure>>on:do:
> WindowManager>>safelyDispatchForWindowManager:
> WindowManager>>processNextEvent
> optimized [] in [] in WindowManager>>newProcess
> BlockClosure>>on:do:
> optimized [] in WindowManager>>newProcess
> BlockClosure>>on:do:
> optimized [] in Process class>>forBlock:priority:
>
> ----------------------------------------------------------------------
> HandleRegistry>>evaluateWithFullProtection:
> Receiver:
>     a HandleRegistry
> Instance Variables:
>     tally = 2
>     valueArray = a WeakArray[79]
>     executors = an Array[79]
>     accessLock = a RecursionLock
> Arguments:
>     aBlock = BlockClosure [] in HandleRegistry>>registerValueOf:
> Temporaries:
>     exception = an OsInaccessibleError
>     return = nil
>     newException = an OsInaccessibleError
> Context PC = 39
>
> ----------------------------------------------------------------------
> HandleRegistry>>registerValueOf:
> Receiver:
>     a HandleRegistry
> Instance Variables:
>     tally = 2
>     valueArray = a WeakArray[79]
>     executors = an Array[79]
>     accessLock = a RecursionLock
> Arguments:
>     aBlock = BlockClosure [] in OSHandle class>>handleValue:
> Context PC = 9
>
> ----------------------------------------------------------------------
> PCDiskFileAccessor class(OSHandle class)>>handleValue:
> Receiver:
>     a PCDiskFileAccessor class
> Instance Variables:
>     superclass = PCIOAccessor
>     methodDict = a MethodDictionary[6]
>     format = 16386
>     subclasses = nil
>     instanceVariables = nil
>     organization = ('accessing' #commit)
> ('defaults' #connectionClass)
> ('stream creation' #readWriteStream)
> ('synchronization' #setSem:forWrite:)
> ('testing' #isSeekable)
> ('locking' #lock:for:)
>
>     name = #PCDiskFileAccessor
>     classPool = nil
>     environment = a NameSpace[109]
> Arguments:
>     aBlock = BlockClosure [] in IOAccessor  
> class>>openFileNamed:direction:creation:
> Context PC = 10
>
> ----------------------------------------------------------------------
> IOAccessor class>>openFileNamed:direction:creation:
> Receiver:
>     an IOAccessor class
> Instance Variables:
>     superclass = OSHandle
>     methodDict = a MethodDictionary[43]
>     format = 16386
>     subclasses = an Array[3]
>     instanceVariables = nil
>     organization = ('initialize-release' #close)
> ('accessing' #bufferSize #commit #descriptor #fileSize #truncateTo:)
> ('testing' #isActive #isSeekable)
> ('positioning' #seekTo:)
> ('data transfer' #readInto: #readInto:startingAt:for:  
> #readInto:startingAt:for:untilFalse: #readInto:untilFalse: #writeAll:  
> #writeFrom: #writeFrom:startingAt:for:  
> #writeFrom:startingAt:for:untilFalse: #writeFrom:startingAt:forSure:)
> ('constants' #lineEndConvention #readPauseInterval #writePauseInterval)
> ('connections' #asExternalConnection)
> ('stream creation' #readAppendStream #readStream #writeStream)
> ('printing' #printOn:)
> ('defaults' #connectionClass #defaultClass)
> ('synchronization' #ioWait #ioWaitWithTimeoutMs: #readWait  
> #readWaitWithTimeoutMs: #setSem:forWrite: #writeWait  
> #writeWaitWithTimeoutMs:)
> ('finalization' #finalize)
> ('private-primitives' #primBufferSize #primClose #primGetDescriptor  
> #primGetSize #primReadInto:startingAt:for: #primSeekTo:  
> #primWriteFrom:startingAt:for:)
>
>     name = #IOAccessor
>     classPool = a NameSpaceOfClass[2]
>     environment = a NameSpace[109]
> Arguments:
>     nm = 'CONOUT$'
>     rwMode = 1
>     creationRule = 3
> Context PC = 11
>
> ----------------------------------------------------------------------
> FileConnection>>open
> Receiver:
>     a FileConnection
> Instance Variables:
>     inputDescriptor = nil
>     outputDescriptor = nil
>     fileName = a PortableFilename('CONOUT$')
>     rwmode = #writeOnly
>     creationRule = #truncateOrCreate
>     rememberedPosition = nil
> Context PC = 20
>
> ----------------------------------------------------------------------
> FileConnection>>setName:mode:creationRule:
> Receiver:
>     a FileConnection
> Instance Variables:
>     inputDescriptor = nil
>     outputDescriptor = nil
>     fileName = a PortableFilename('CONOUT$')
>     rwmode = #writeOnly
>     creationRule = #truncateOrCreate
>     rememberedPosition = nil
> Arguments:
>     aName = a NTFSFilename('CONOUT$')
>     aRwMode = #writeOnly
>     aCreationRule = #truncateOrCreate
> Context PC = 11
>
> ----------------------------------------------------------------------
> FileConnection class>>openFileNamed:mode:creationRule:
> Receiver:
>     a FileConnection class
> Instance Variables:
>     superclass = ExternalConnection
>     methodDict = a MethodDictionary[13]
>     format = 16390
>     subclasses = nil
>     instanceVariables = an Array[4]
>     organization = ('accessing' #dataSize #fileName #logicalName #name)
> ('io buffer creation' #defaultIoBuffer #defaultIoBufferInMode:)
> ('testing' #canPersist)
> ('status' #isActive #open)
> ('persistence' #rememberedPosition #rememberPosition: #revive)
> ('private' #setName:mode:creationRule:)
>
>     name = #FileConnection
>     classPool = nil
>     environment = a NameSpace[109]
> Arguments:
>     aName = a NTFSFilename('CONOUT$')
>     rwMode = #writeOnly
>     creationRule = #truncateOrCreate
> Context PC = 9
>
> ----------------------------------------------------------------------
> FileEncodedStreamConstructor>>writeStream
> Receiver:
>     a FileEncodedStreamConstructor
> Instance Variables:
>     dataRepository = a NTFSFilename('CONOUT$')
>     encoding = #default
> Context PC = 9
>
> ----------------------------------------------------------------------
> NTFSFilename(Filename)>>writeStream
> Receiver:
>     a NTFSFilename
> Instance Variables:
>     osName = a ByteArray[7]
>     publicName = 'CONOUT$'
>     logicalName = nil
> Context PC = 7
>
> ----------------------------------------------------------------------
> UndefinedObject>>unboundMethod
> Receiver:
>     an UndefinedObject
> Context PC = 7
>
> ----------------------------------------------------------------------
> UndefinedObject(Object)>>performMethod:arguments:
> Receiver:
>     an UndefinedObject
> Arguments:
>     method = AnnotatedMethod UndefinedObject>>unboundMethod
>     args = an Array[0]
> Context PC = 5
>
> ----------------------------------------------------------------------
> UndefinedObject(Object)>>performMethod:
> Receiver:
>     an UndefinedObject
> Arguments:
>     method = AnnotatedMethod UndefinedObject>>unboundMethod
> Context PC = 5
>
> ----------------------------------------------------------------------
> TextEditorController(ParagraphEditor)>>evaluateCompiled:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     aMethod = AnnotatedMethod UndefinedObject>>unboundMethod
> Temporaries:
>     context = nil
> Context PC = 13
>
> ----------------------------------------------------------------------
> optimized [] in ParagraphEditor>>evaluateSelection
> Receiver:
>     an UndefinedObject
> Temporaries:
>     .self = a TextEditorController
>     .code = AnnotatedMethod UndefinedObject>>unboundMethod
> Context PC = 7
>
> ----------------------------------------------------------------------
> BlockClosure>>ensure:
> Receiver:
>     a BlockClosure
> Instance Variables:
>     method = CompiledBlock [] in ParagraphEditor>>evaluateSelection
>     outerContext = nil
>     copiedValues = an Array[2]
> Arguments:
>     aBlock = BlockClosure [] in Cursor>>showWhile:
> Temporaries:
>     result = nil
> Context PC = 4
>
> ----------------------------------------------------------------------
> Cursor>>showWhile:
> Receiver:
>     a Cursor
> Instance Variables:
>     errorCode = 0
>     handle = 4
>     image = Depth1Image(extent: 16@16 depth: 1)
>     mask = Depth1Image(extent: 16@16 depth: 1)
>     hotSpot = 1@1
>     name = 'xeq'
> Arguments:
>     aBlock = BlockClosure [] in ParagraphEditor>>evaluateSelection
> Temporaries:
>     oldcursor = Cursor normal
> Context PC = 23
>
> ----------------------------------------------------------------------
> TextEditorController(ParagraphEditor)>>evaluateSelection
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Temporaries:
>     code = AnnotatedMethod UndefinedObject>>unboundMethod
>     result = nil
> Context PC = 14
>
> ----------------------------------------------------------------------
> optimized [] in ParagraphEditor>>doIt
> Receiver:
>     an UndefinedObject
> Temporaries:
>     .self = a TextEditorController
> Context PC = 6
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
>     a BlockClosure
> Instance Variables:
>     method = CompiledBlock [] in ParagraphEditor>>doIt
>     outerContext = nil
>     copiedValues = a TextEditorController
> Arguments:
>     anExceptionSelector = CompilationError
>     handlerBlock = BlockClosure [] in ParagraphEditor>>doIt
> Context PC = 18
>
> ----------------------------------------------------------------------
> TextEditorController(ParagraphEditor)>>doIt
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Context PC = 20
>
> ----------------------------------------------------------------------
> TextEditorController>>dispatchMenuSymbol:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     menuSelection = #doIt
> Context PC = 10
>
> ----------------------------------------------------------------------
> TextEditorController>>dispatchMenuSelection:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     menuSelection = #doIt
> Context PC = 20
>
> ----------------------------------------------------------------------
> TextEditorController(ControllerWithMenu)>>processMenu:at:centered:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     aMenu = a Menu
>     aPoint = 260@376
>     centered = true
> Temporaries:
>     valueResult = a MenuItem 'Do it'
> Context PC = 41
>
> ----------------------------------------------------------------------
> TextEditorController(ControllerWithMenu)>>processMenuAt:centered:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     aPoint = 260@376
>     centered = true
> Context PC = 9
>
> ----------------------------------------------------------------------
> TextEditorController(ControllerWithMenu)>>yellowButtonPressedEvent:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     event = a YellowButtonPressedEvent
> Context PC = 13
>
> ----------------------------------------------------------------------
> TextEditorController(ParagraphEditor)>>yellowButtonPressedEvent:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     event = a YellowButtonPressedEvent
> Context PC = 9
>
> ----------------------------------------------------------------------
> TextEditorController>>yellowButtonPressedEvent:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     anEvent = a YellowButtonPressedEvent
> Context PC = 19
>
> ----------------------------------------------------------------------
> YellowButtonPressedEvent>>dispatchTo:
> Receiver:
>     a YellowButtonPressedEvent
> Instance Variables:
>     time = -473010090
>     initiator = an EventDispatcher
>     window = an ApplicationWindow 988
>     state = 2
>     x = 134
>     y = 189
>     gx = 260
>     gy = 376
>     buttonNumber = 2
> Arguments:
>     anObject = a TextEditorController
> Context PC = 4
>
> ----------------------------------------------------------------------
> TextEditorController(ControllerWithMenu)>>handleEvent:
> Receiver:
>     a TextEditorController
> Instance Variables:
>     model = a PluggableAdaptor
>     view = a TextEditorView
>     sensor = a TranslatingSensor
>     menuHolder = a ValueHolder on: a Menu
>     performer = a WorkspacePage
>     beginTypeInIndex = nil
>     anchorIndex = 1
>     emphasisHere = nil
>     dispatchTable = a DispatchTable
>     charComposer = a CharacterComposer
>     textHasChanged = false
>     feelPolicy = a CodingFeelPolicy
>     supportCodeEditingFeels = true
>     localMenuItems = an Array[21]
>     extendingDown = true
>     keyboardProcessor = a KeyboardProcessor
>     keyboardHook = nil
>     readOnly = false
>     accepted = true
>     autoAccept = false
>     continuousAccept = false
>     tabMeansNextField = true
>     tabRequiresControl = true
>     dispatcher = an UIDispatcher
> Arguments:
>     anEvent = a YellowButtonPressedEvent
> Context PC = 24
>
> ----------------------------------------------------------------------
> EventDispatcher>>dispatch:to:
> Receiver:
>     an EventDispatcher
> Instance Variables:
>     windowController = an ApplicationStandardSystemController
>     currentMouseConsumer = nil
>     grabbingMouse = false
>     keyboardProcessor = a KeyboardProcessor
>     lastControlObject = a TextEditorController
>     trapList = nil
>     state = nil
>     repairDamageWhenDebugging = true
>     flushQueueAfterError = true
>     distributeEventsWhenDebugging = true
>     dragDropInProgress = false
>     dragDropTracker = nil
>     dispatchUnknownEvents = false
> Arguments:
>     event = a YellowButtonPressedEvent
>     object = a TextEditorController
> Temporaries:
>     tmp = nil
> Context PC = 10
>
> ----------------------------------------------------------------------
> EventDispatcher>>dispatchEvent:
> Receiver:
>     an EventDispatcher
> Instance Variables:
>     windowController = an ApplicationStandardSystemController
>     currentMouseConsumer = nil
>     grabbingMouse = false
>     keyboardProcessor = a KeyboardProcessor
>     lastControlObject = a TextEditorController
>     trapList = nil
>     state = nil
>     repairDamageWhenDebugging = true
>     flushQueueAfterError = true
>     distributeEventsWhenDebugging = true
>     dragDropInProgress = false
>     dragDropTracker = nil
>     dispatchUnknownEvents = false
> Arguments:
>     event = a YellowButtonPressedEvent
> Temporaries:
>     objectWantingControl = a TextEditorController
>     targetKeyboardProcessor = nil
> Context PC = 113
>
> ----------------------------------------------------------------------
> YellowButtonPressedEvent(Event)>>dispatch
> Receiver:
>     a YellowButtonPressedEvent
> Instance Variables:
>     time = -473010090
>     initiator = an EventDispatcher
>     window = an ApplicationWindow 988
>     state = 2
>     x = 134
>     y = 189
>     gx = 260
>     gy = 376
>     buttonNumber = 2
> Context PC = 16
>
> ----------------------------------------------------------------------
> YellowButtonPressedEvent(Event)>>dispatchForWindowManager:
> Receiver:
>     a YellowButtonPressedEvent
> Instance Variables:
>     time = -473010090
>     initiator = an EventDispatcher
>     window = an ApplicationWindow 988
>     state = 2
>     x = 134
>     y = 189
>     gx = 260
>     gy = 376
>     buttonNumber = 2
> Arguments:
>     aWinMgr = a WindowManager
> Context PC = 4
>
> ----------------------------------------------------------------------
> optimized [] in WindowManager>>safelyDispatchForWindowManager:
> Receiver:
>     an UndefinedObject
> Temporaries:
>     .event = a YellowButtonPressedEvent
>     .self = a WindowManager
> Context PC = 6
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
>     a BlockClosure
> Instance Variables:
>     method = CompiledBlock [] in  
> WindowManager>>safelyDispatchForWindowManager:
>     outerContext = nil
>     copiedValues = an Array[2]
> Arguments:
>     anExceptionSelector = BadControllerError
>     handlerBlock = BlockClosure [] in  
> WindowManager>>safelyDispatchForWindowManager:
> Context PC = 18
>
> ----------------------------------------------------------------------
> WindowManager>>safelyDispatchForWindowManager:
> Receiver:
>     a WindowManager
> Instance Variables:
>     windows = an OrderedCollection[1]
>     activeController = nil
>     interruptLock = false
>     outstandingMetaOrDamage = false
>     openInProgress = false
>     eventQueue = an EventQueue
>     baseProcess = a Process in Semaphore>>wait
>     dontFilterEvents = false
> Arguments:
>     event = a YellowButtonPressedEvent
> Context PC = 13
>
> ----------------------------------------------------------------------
> WindowManager>>processNextEvent
> Receiver:
>     a WindowManager
> Instance Variables:
>     windows = an OrderedCollection[1]
>     activeController = nil
>     interruptLock = false
>     outstandingMetaOrDamage = false
>     openInProgress = false
>     eventQueue = an EventQueue
>     baseProcess = a Process in Semaphore>>wait
>     dontFilterEvents = false
> Temporaries:
>     event = a YellowButtonPressedEvent
> Context PC = 9
>
> ----------------------------------------------------------------------
> optimized [] in [] in WindowManager>>newProcess
> Receiver:
>     an UndefinedObject
> Temporaries:
>     .self = a WindowManager
> Context PC = 13
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
>     a BlockClosure
> Instance Variables:
>     method = CompiledBlock [] in [] in WindowManager>>newProcess
>     outerContext = nil
>     copiedValues = a WindowManager
> Arguments:
>     anExceptionSelector = TerminateException
>     handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess
> Context PC = 18
>
> ----------------------------------------------------------------------
> optimized [] in WindowManager>>newProcess
> Receiver:
>     an UndefinedObject
> Temporaries:
>     .self = a WindowManager
> Context PC = 15
>
> ----------------------------------------------------------------------
> BlockClosure>>on:do:
> Receiver:
>     a BlockClosure
> Instance Variables:
>     method = CompiledBlock [] in WindowManager>>newProcess
>     outerContext = nil
>     copiedValues = a WindowManager
> Arguments:
>     anExceptionSelector = TerminateException
>     handlerBlock = BlockClosure [] in [] in Process
> class>>forBlock:priority:
> Context PC = 18
>
> ----------------------------------------------------------------------
> optimized [] in Process class>>forBlock:priority:
> Receiver:
>     an UndefinedObject
> Temporaries:
>     .aBlock = BlockClosure [] in WindowManager>>newProcess
> Context PC = 9
>
>

Reply | Threaded
Open this post in threaded view
|

Re: stdout n Windows

Alan Knight-2
In reply to this post by Charles A. Monteiro-2
You have to run with the console VM, or else there's no standard out to write to.

I also suspect it's not a good idea to try and close it.

At 10:35 AM 2/28/2006, Charles A. Monteiro wrote:
>When I run the snippet below , it bombs on an access denied error. Is  
>there anything that I need to do to configure Windows to allow me to  
>utilize this? BTW, the snippet below is basically mirroring code found in  
>the ImageConfigurationSubsystem class.

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross

Reply | Threaded
Open this post in threaded view
|

Re: stdout n Windows

Charles A. Monteiro-2
why? Also, the ImageConfigurationSubystem does close it although it is  
done apparently right before the image shutdowns, see code attached below.  
I would think that the sheer fact that the image shutdowns releases the  
stream. Here is another question. let's say that VW opens a bunch of  
external streams but does not close them, if then VW shuts done is part of  
shutting down the closing of said streams i.e those found in "OpenStreams"  
or is it that Windows closes them once it sees the process for VW go away  
or are those streams just left open?

ImageConfigurationSubsystem>>
runCodeAndThenQuit: argumentStream
        "This allows you to run arbitrary code from the command line, specified a  
Smalltalk string to be evaluated. After evaluation, the string will be  
printed to standard out and the image will quit. Make very sure that we  
always quit, even if closing the stream doesn't work."

        <option: '-evaluate'>

        | expressions result |
        [
        self class allowExpressions ifFalse: [^self].
        [expressions := CommandLineInterest argumentsFrom: argumentStream.
        expressions
                do:
                        [:each |
                        result := Compiler evaluate: each.
                        self stdout nextPutAll: result displayString]] ensure: [self stdout  
close]] ensure: [ObjectMemory quit].


On Tue, 28 Feb 2006 12:55:50 -0500, Alan Knight <[hidden email]> wrote:

> You have to run with the console VM, or else there's no standard out to  
> write to.
>
> I also suspect it's not a good idea to try and close it.
>
> At 10:35 AM 2/28/2006, Charles A. Monteiro wrote:
>> When I run the snippet below , it bombs on an access denied error. Is
>> there anything that I need to do to configure Windows to allow me to
>> utilize this? BTW, the snippet below is basically mirroring code found  
>> in
>> the ImageConfigurationSubsystem class.
>
> --
> Alan Knight [|], Cincom Smalltalk Development
> [hidden email]
> [hidden email]
> http://www.cincom.com/smalltalk
>
> "The Static Typing Philosophy: Make it fast. Make it right. Make it  
> run." - Niall Ross



--
Charles A. Monteiro