PROBLEM EXPORT

Hi guys , i'm in trouble exporting a small script. This is my first program. i need help to understand. So i have write a small script who run fine . but the export don't start an linux and mac too. Should i write something ? i can show my code if necessary. can someone help me. thanks guys

Answers

  • Post the code and any errors you see.

    Operating system? Which version of processing?

  • edited February 2017

    You can't export applications for Mac OS from a Windows PC.

  • edited February 2017

    When i run the programm no probleme with pde. Export report no probleme but when i launch the app i got a grey window without nothing else. of course i run a win app in a windows operating system and i compile a mac app in a mac operating system. here is the code :

    import interfascia.*;
    
    import java.text.DecimalFormat;
    
    
    PFont font; // instanciation de la fonte
    
    //PFont font2;
    
    String entree = ""; // on déclare la chaîne "entree" et on la vide
    
    String masse="";
    
    String Shore="";
    
    String Resultat="";
    
    int maxNumber=20000;
    
    
    
    
    PImage bg;
    
    GUIController c;
    
    IFTextField poidTotal,shore,deadner,silicone;
    
    IFLabel label1, label2,label3,label4;
    
    
    DecimalFormat format;
    
    
    
    
    void setup() {
    
    size(800,684); // définition de la surface de travail
    
    //bg=loadImage("chimie.jpg");
    
    //background(200);
    
    font = createFont("28 Days Later.ttf", 50);
    
    //font = loadFont("Objective.ttf"); // chargement de la police
    
    textFont(font); // déclaration de la police active
    
    frameRate(10); // taux de traitement par seconde
    
    //font2 = createFont("Objective-Bold.ttf",10);
    
    c = new GUIController(this);
    
    
      poidTotal = new IFTextField("T",335,180,60);
    
      shore = new IFTextField("S", 335, 250, 60);
    
      deadner = new IFTextField("C", 335, 470, 60);
    
      silicone = new IFTextField("P",335, 540,60);
    
    
      label1 =  new IFLabel("G au total ( silicone +deadner)",400,190);
    
      label2 = new IFLabel("Shore H (15,20,30,45)", 400, 260);
    
      label3= new IFLabel("G de deadner",400,480);
    
      label4= new IFLabel("Silicone A + B en G", 400, 550);
    
    
      poidTotal.addActionListener(this);
    
      shore.addActionListener(this);
    
      deadner.addActionListener(this);
    
       silicone.addActionListener(this);  
    
      c.add(poidTotal);
    
      c.add(shore);
    
      c.add(deadner);
    
      c.add(silicone);
    
      c.add(label1);
    
      c.add(label2);
    
      c.add(label3);
    
      c.add(label4);
    
    
      format = new DecimalFormat();
    
      format.setMaximumFractionDigits(2);
    
    }
    
    
    
    void draw() {
    
      background(200);
    
     entree="Shore Platgel Calculator";
    
    text(entree,100,80); // on affiche le contenu de 'entree' aux coordonnées 10,30
    
    
    
    //textFont(font2);
    
    masse="Poid Total ";
    
    text(masse,20,200);
    
    Shore ="Shore ";
    
    text(Shore,20,280);
    
    Resultat="Resultat ";
    
    text(Resultat,20,500);
    
    }
    
    
    
    void actionPerformed(GUIEvent e) {
    
      float deadner2;
    
      float silicone2;
    
      float poidTotal2;
    
      float Shore2;
    
      float ratio;
    
      float x;
    
      if (e.getMessage().equals("Modified")) {
    
        if (e.getSource() == poidTotal) {
    
          try {
    
             Shore2 = Float.parseFloat(shore.getValue());
    
             poidTotal2 = Float.parseFloat(poidTotal.getValue());
    
             x=poidTotal2/(2+Shore2/15);
    
            deadner.setValue(format.format(poidTotal2-2*x));
    
            silicone.setValue(format.format(poidTotal2-(Shore2/15)*x));
    
    
          } catch (Exception e2) { }
    
        } else {
    
          try {
    
            Shore2 = Float.parseFloat(shore.getValue());
    
             poidTotal2 = Float.parseFloat(poidTotal.getValue());
    
    
             x=poidTotal2/(2+Shore2/15);
    
            deadner.setValue(format.format(poidTotal2-2*x));
    
            silicone.setValue(format.format(poidTotal2-(Shore2/15)*x));
    
          } catch (Exception e2) { }
    
        }    
      }    
    }
    

    Thanks guys

  • sorry processing 3,3 and i've update java too

  • That is not, in my book, "a small script".

    The imports might cause you trouble. The fonts also. You need to include those in your export, I don't think that happens automatically. Examine the exported directory, see if the necessary jars are there.

    Also, to format your code for the forum, edit your post, highlight the code and press ctrl-o

  • edited February 2017

    ok. Thanks to help me. this is my first app !! i'm a newbee :-) Can you explain me more in details. i use the interfacia library . yes it is not in the source file. should i copy it in or something like that ? i have copy the font too. but where exactly . thanks Koog.

  • (The imports won't cause trouble, no worries. That was with Processing 1, AFAIK even P2 didn't have the problem)

  • The fonts, on the other hand may. You must have put them in the data folder, right?

  • Perhaps, try using loadFont instead.

  • ok it's fix guys !! i have copy the fonts but one more problem was in the script to call java. So i have had import java.* and the export works now .

    this is fix.thanks for your support and fast answer. see you soon

  • (Processing IDE should have taken care of that. Strange.)

Sign In or Register to comment.