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

A basic implementation of a console for FlasCC 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)
To Support the preloader case you might want to have the Console act as a child of some other DisplayObjectContainer.
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
  
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(e: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)

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)
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

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(e: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

e: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
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