Skip to content

Commit 871bf24

Browse files
committed
example issues
1 parent 7a90bff commit 871bf24

6 files changed

Lines changed: 16 additions & 24 deletions

File tree

.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>Baseprogram</name>
3+
<name>BaseProgram</name>
44
<comment></comment>
55
<projects>
66
</projects>

examples/BaseProgram/ReadData

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import base.Baseprogram;
2+
3+
println("Integer: " + Baseprogram.readInt());

examples/Hello/Hello.pde

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/README

Lines changed: 0 additions & 1 deletion
This file was deleted.

resources/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ant.description=ProcessingLibs Ant build file.
7272
# Project details.
7373
# Give your library a name. The name must not contain spaces or special characters.
7474

75-
project.name=Baseprogram
75+
project.name=BaseProgram
7676

7777
# The name as the user will see it. This can contain spaces and special characters.
7878

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,27 @@
4242
*
4343
*/
4444

45-
public class Baseprogram
45+
public class BaseProgram
4646
{
4747

4848
public final static String VERSION = "##library.prettyVersion##";
4949

50+
/**
51+
* Open a dialog so that the user can enter an integer value
52+
*
53+
* @return -1 in case of error, the entered number otherwise
54+
*/
5055
public static int readInt()
5156
{
5257
while (true)
5358
{
5459
try
5560
{
56-
String lInput = JOptionPane.showInputDialog("Bla");
61+
String lInput = JOptionPane.showInputDialog("Please enter a number");
62+
if (lInput == null)
63+
{
64+
return -1;
65+
}
5766
return Integer.parseInt(lInput);
5867
}
5968
catch (NumberFormatException pExc)

0 commit comments

Comments
 (0)