Back

MultiLineLog

Documentation for MultiLineLog

In order to use MultiLineLog, you must first load the plugin at the top of your script using the LoadPlugin method like this:

 app.LoadPlugin( "MultiLineLog" );

Then you can create an instance of the plugin object when you need it like this:

 plg = app.CreateObject( "MultiLineLog" );

To use this example copy all to a script and run from there.

Example - Print to debug console

app.LoadPlugin( "MultiLineLog" );

function OnStart()
{
  lay = app.CreateLayout( "Linear", "VCenter,FillXY" );

  btn = app.CreateButton( "Press Me" );
  btn.SetOnTouch( CallPlugin );
  lay.AddChild( btn );

  plg = app.CreateObject( "MultiLineLog" );

  app.AddLayout( lay );
}

function CallPlugin()
{
  plg.log("A man is smoking a cigarette and blowing smoke rings into the air. His girlfriend becomes irritated with the smoke and says, “Can’t you see the warning on the cigarette pack? Smoking is hazardous to your health!”\nTo which the man replies, “I am a programmer. We don’t worry about warnings; we only worry about errors.”");
}

Copy All