RePost redirect posting away from the main post window.


In a Republic, lots of post messages come in all the time, especially with many active participants.

RePost allows redirecting debug/info posting to a special view. 


Note: This is not polished yet, more of an idea for discussion.

E.g. posting last thing on top could be discussed/switchable, 

also a button for turning off posting to main post window, 

etc etc.



// initialise RePost, creates its own little post view

RePost.init; 

RePost.init(nil, Rect(800, 200, 400, 320)); 


// normal post

3.do { |i| [i, (1..10).scramble].postln; };


// post to both 

"Hello\n".repost; // post

"World!".repostln; // postln

"note\n\n".repostc; // postc

"ascending".repostcln; // postcln

"order.".repostcs; // postcs

"and %.\n".repostf(\format);// postcs



// now post only to Repost

RePost.toPost = false;

3.do { |i| [i, (1..10).scramble].repostln; };


"... the serene\n".repost;

"quietness".repostln;

"of the post window".repostcln;

"lets you read errors again.".repostcs;


// repost keeps a list of last <numPosts> post strings:

RePost.posts;

RePost.numPosts;

RePost.clear; // clear them



// you can put Repost of a given window:

w = Window("test").front;

RePost.init(w);

10.do { (1..10).scramble.postlnR; };

// with given bounds - and a new window replaces any previous one.

w = Window("test2").front;

RePost.init(w, Rect(50, 50, 300, 300));