Packagecom.adobe.flascc
Classpublic class Console
InheritanceConsole Inheritance flash.display.Sprite
Implements ISpecialFile

A basic implementation of a console for CrossBridge apps. The PlayerKernel class delegates to this for things like read/write, so that console output can be displayed in a TextField on the Stage.



Public Properties
 PropertyDefined By
  consoleText : String
[read-only] Provide a way to get the TextField's text.
Console
Public Methods
 MethodDefined By
  
Console(container:DisplayObjectContainer = null, enableConsole:Boolean = true)
To Support the preloader case you might want to have the Console act as a child of some other DisplayObjectContainer.
Console
  
dispose(event:Event = null):void
Disposes Console freeing memory
Console
  
exit(code:int):Boolean
The PlayerKernel implementation will use this function to handle C process exit requests
Console
  
fcntl(fd:int, com:int, data:int, errnoPtr:int):int
The PlayerKernel implementation uses this function to handle C fcntl requests to the file "/dev/tty." See the ISpecialFile documentation for more information about the arguments and return value.
Console
  
ioctl(fd:int, com:int, data:int, errnoPtr:int):int
The PlayerKernel implementation uses this function to handle C ioctl requests to the file "/dev/tty." See the ISpecialFile documentation for more information about the arguments and return value.
Console
  
read(fd:int, bufPtr:int, nbyte:int, errnoPtr:int):int
The PlayerKernel implementation uses this function to handle C IO read requests to the file "/dev/tty" (for example, reads from stdin will expect this function to provide the data).
Console
  
switchConsole(isEnabled:Boolean):void
Switches default console logging behaviour (text field output)
Console
  
write(fd:int, bufPtr:int, nbyte:int, errnoPtr:int):int
The PlayerKernel implementation uses this function to handle C IO write requests to the file "/dev/tty" (for example, output from printf will pass through this function).
Console
Protected Methods
 MethodDefined By
  
consoleWrite(s:String):void
Helper function that traces to the flashlog text file and also displays output in the on-screen textfield console.
Console
  
enterFrame(e:Event):void
The enterFrame callback is run once every frame.
Console
  
init(event:Event):void
All of the real FlasCC init happens in this method, which is either run on startup or once the SWF has been added to the stage.
Console
Property Detail
consoleTextproperty
consoleText:String  [read-only]

Provide a way to get the TextField's text.


Implementation
    public function get consoleText():String
Constructor Detail
Console()Constructor
public function Console(container:DisplayObjectContainer = null, enableConsole:Boolean = true)

To Support the preloader case you might want to have the Console act as a child of some other DisplayObjectContainer.

Parameters
container:DisplayObjectContainer (default = null)
 
enableConsole:Boolean (default = true)
Method Detail
consoleWrite()method
protected function consoleWrite(s:String):void

Helper function that traces to the flashlog text file and also displays output in the on-screen textfield console.

Parameters

s:String

dispose()method 
public function dispose(event:Event = null):void

Disposes Console freeing memory

Parameters

event:Event (default = null)

enterFrame()method 
protected function enterFrame(e:Event):void

The enterFrame callback is run once every frame. UI thunk requests should be handled here by calling CModule.serviceUIRequests() (see CModule ASdocs for more information on the UI thunking functionality).

Parameters

e:Event

exit()method 
public function exit(code:int):Boolean

The PlayerKernel implementation will use this function to handle C process exit requests

Parameters

code:int

Returns
Boolean
fcntl()method 
public function fcntl(fd:int, com:int, data:int, errnoPtr:int):int

The PlayerKernel implementation uses this function to handle C fcntl requests to the file "/dev/tty." See the ISpecialFile documentation for more information about the arguments and return value.

Parameters

fd:int
 
com:int
 
data:int
 
errnoPtr:int

Returns
int
init()method 
protected function init(event:Event):void

All of the real FlasCC init happens in this method, which is either run on startup or once the SWF has been added to the stage.

Parameters

event:Event

ioctl()method 
public function ioctl(fd:int, com:int, data:int, errnoPtr:int):int

The PlayerKernel implementation uses this function to handle C ioctl requests to the file "/dev/tty." See the ISpecialFile documentation for more information about the arguments and return value.

Parameters

fd:int
 
com:int
 
data:int
 
errnoPtr:int

Returns
int
read()method 
public function read(fd:int, bufPtr:int, nbyte:int, errnoPtr:int):int

The PlayerKernel implementation uses this function to handle C IO read requests to the file "/dev/tty" (for example, reads from stdin will expect this function to provide the data). See the ISpecialFile documentation for more information about the arguments and return value.

Parameters

fd:int
 
bufPtr:int
 
nbyte:int
 
errnoPtr:int

Returns
int
switchConsole()method 
public function switchConsole(isEnabled:Boolean):void

Switches default console logging behaviour (text field output)

Parameters

isEnabled:Boolean

write()method 
public function write(fd:int, bufPtr:int, nbyte:int, errnoPtr:int):int

The PlayerKernel implementation uses this function to handle C IO write requests to the file "/dev/tty" (for example, output from printf will pass through this function). See the ISpecialFile documentation for more information about the arguments and return value.

Parameters

fd:int
 
bufPtr:int
 
nbyte:int
 
errnoPtr:int

Returns
int