Skip to content
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

I get an error @ void save #1

Open
DeMich opened this issue Mar 5, 2014 · 2 comments
Open

I get an error @ void save #1

DeMich opened this issue Mar 5, 2014 · 2 comments

Comments

@DeMich
Copy link

DeMich commented Mar 5, 2014

Hey,

First of all, I'm a newbie ;D

I just being learning Arduino for a week now.

I'm getting an error @

String savePath = selectOutput();  // Opens file chooser

With desription:

The method selectOuput(String,String) in the type PApplet is not applicable for the arguments ()

I would be very gratefull if you could point me in the direction of what I'm doing wrong.

Thanks

@mikko-n
Copy link

mikko-n commented Oct 14, 2014

Hi,

You must modify the Strage class a little bit. Change the following line:
class Strage{
to read:
public class Strage{

and then replace:

 void save()
  {
    String savePath = selectOutput();  // Opens file chooser
    if (savePath == null) {

with:

void save()
  {
    selectOutput("Select a file to write to:", "fileSelected", null, this);  // Opens file chooser
  }

  public void fileSelected(File selection) {
    String savePath;
    if (selection == null) {
    println("Window was closed or the user hit cancel.");
    return;
  } else {
     savePath = selection.getAbsolutePath();
  }
    if (savePath == null) {

The missing font issue can be solved from 'Tools -> Create font...' dialog

@DeMich
Copy link
Author

DeMich commented Oct 14, 2014

Alright! Thanks Maruta, you've made a lot of my projects possible ;)

Regards,
Michel
On Oct 14, 2014 12:55 PM, "mikko-n" notifications@github.com wrote:

Hi,

You must modify the Strage class a little bit. Change the following line:
class Strage{
to read:
public class Strage{

and then replace:

void save()
{
String savePath = selectOutput(); // Opens file chooser
if (savePath == null) {

with:

void save()
{
selectOutput("Select a file to write to:", "fileSelected", null, this); // Opens file chooser
}

public void fileSelected(File selection) {
String savePath;
if (selection == null) {
println("Window was closed or the user hit cancel.");
return;
} else {
savePath = selection.getAbsolutePath();
}
if (savePath == null) {

The missing font issue can be solved from 'Tools -> Create font...' dialog


Reply to this email directly or view it on GitHub
#1 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants