• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keep PrintStream Redirect across multiple scenes

 
John Tsioumpris
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to everybody. I have a problem and i could really use some help
I have a JavaFX application with multiple scenes.
In the application one scene plays the "master" role and the others are loaded according to actions
The issue i have is that i need to redirect all the PrintStream activity to a specific TextArea on the "master" scene,
and by "all" i am meaning every PrintStream activity on every scene should be redirected to this specific TextArea
The code i am using on the "master" is :


I am using the Singleton pattern for the rest of the scenes is:


The issue is that i don't like this implementation so ...is there a better solution
 
John Damien Smith
Ranch Hand
Posts: 296
14
 
John Tsioumpris
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Damien Smith wrote:Question is also available on StackOverflow:

http://stackoverflow.com/questions/28728458/keep-printstream-redirect-across-multiple-scenes

Is it against any rule ?
 
John Damien Smith
Ranch Hand
Posts: 296
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More of a guideline than a rule:

http://www.coderanch.com/how-to/java/BeForthrightWhenCrossPostingToOtherSites
 
John Tsioumpris
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Damien Smith wrote:More of a guideline than a rule:

http://www.coderanch.com/how-to/java/BeForthrightWhenCrossPostingToOtherSites

Thanks for letting me know....i am afraid i was under a lot of pressure to get this done....but i think i have found a solution...
So if you find this post offending in anyway please delete it...sorry for the cross posting but i have a hard time to get some answers and time is ticking
 
John Damien Smith
Ranch Hand
Posts: 296
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't mind cross-posting as long as links are posted, so that anybody who finds the post can find related information and work on the issue.

If you have independently found a solution, you should post it on one of the sites you asked your question on, and link to your solution from other posts (probably post it on stack overflow as stack overflow doesn't allow link only answers).

My advice is to try to write perfect questions - as those question types are more likely to get answered.

I answer many questions on different forums and I have read your question numerous times and have not been able to understand exactly what it is asking, nor how to solve it.
I have seen others attempt to answer your question and fail to answer satisfactorily.
If the question is clear, interesting, simple to understand and any issue lucidly explained and immediately reproducible at the time the question is first read, then you are far more likely to get better help sooner.
 
John Tsioumpris
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Damien Smith wrote:I don't mind cross-posting as long as links are posted, so that anybody who finds the post can find related information and work on the issue.

If you have independently found a solution, you should post it on one of the sites you asked your question on, and link to your solution from other posts (probably post it on stack overflow as stack overflow doesn't allow link only answers).

My advice is to try to write perfect questions - as those question types are more likely to get answered.

I answer many questions on different forums and I have read your question numerous times and have not been able to understand exactly what it is asking, nor how to solve it.
I have seen others attempt to answer your question and fail to answer satisfactorily.
If the question is clear, interesting, simple to understand and any issue lucidly explained and immediately reproducible at the time the question is first read, then you are far more likely to get better help sooner.

Thanks for the advices
As for the solution....well is quite simple...i simple don't close the PrintStream...I set the redirection and forget about it...(it seems to work ?)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic