I do something like this, It can be optimized, Im moving all logs every
time when you can have something like a ringbuffer instead:
private var _log:Array = new Array(20);
public function log(t:*)
{
for (var i:int = 0; i < _log.length-1; i++) {
_log[i] = _log[i + 1];
}
_log[_log.length - 1] = t;
output.text = _log.join("\n");
}
HTH/Christoffer
eric e. dolecki skrev:
Hey all,
I have a class that serves as a debugger - containing a textfield that text
gets dumped into. Rather quickly. What might be the best way to simply limit
the number of lines in the field itself, as the appends after a while bog
the application down (understandable).
I have many ideas, but I don't want the mechanism to clean up add too much
overhead itself.
Thanks,
Eric
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders