-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added example for flush() #2570
Conversation
Merge pull request processing#2417 from hackertron/master
update from processing
Hi, could you add a brief description for the method, explaining what |
Sure !! |
src/io/files.js
Outdated
@@ -1125,6 +1125,7 @@ p5.PrintWriter = function(filename, extension) { | |||
this.content += data + '\n'; | |||
}; | |||
/** | |||
* Flushes the PrintWriter object that calls it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually go for something more descriptive, as "flush" means nothing to someone unfamiliar with a PrintWriter. Something like "Clears the data already written to the PrintWriter"
Description : Clears the data already written to the PrintWriter object 👍 |
the only issue i have with this is that it's not actually necessary to call also, another weird thing, and this has nothing to do with your example, is that usually when you have a writer API with a |
@Spongman understood your first point but I just wanted to show flush example in it's simplest form . |
@Spongman I see your point, but I think this is nice as a simple example. we can always add a second more complex example that demonstrates a clear use case. |
added example for Printwriter flush() method .
refering to this issue : #1954