The arrow that you press to make a new tab, the one on the right. One of the options is 'Delete' - I thought I was deleting a tab, but I deleted the entire sketch
(yes I know the message asked me "Delete Sketch?", what can I say, I am not a genius
). Anyway, is this deleted sketch anywhere on my computer still? I cannot find it in my trash. I am using a mac.
I am
trying to use noFill() to "color" a rect "clear", that is, I want the rect to be "see through", so the images I have behind it can be seen. In my program, I have a bunch of colored rectangles in cols and rows that cover the whole display window, and as the mouse moves across the screen, a loop is comparing an array of mouse positions to the position of the rectangles covering the screen, if a match is made, the rect is noFill() - i can see through the rect - if a match is not made, the rect is filled with a solid color. I have 20 mouse position that increment with each new mouse input to make a trail effect. But it doesn't work right, when I use noFill() only 1 rect in my array ends up actually "see through", but when i specify a color with fill(), it works just fine. I have also messed with using fill() with an alpha value of "0", and this doesn't work quite right either...any help would be great!
//EXC 19_5
//this is the size of each sheild unit, the smaller, the more difficult to uncover
int sheild = 20;
//this is the length of the uncover array, the bigger the number the easier to uncover the sheild
int strength = 20;
//this stops the sheild loop when a matching mouseX/Y position in the uncover array is detected
int matches = 0;
//this is the uncover array, it stores the last x mouse positions, and removes the sheild from those points
When I down load 1.2.1 from the processing.org and install it on my mac, it says " a newer version of processing exits in this location, do you wish to replace it?" ... when I click "About Processing" it lists version 1.0.9 as installed. Unless my math is wrong, I think my mac is lying to me...should I just go for it?
Can an exported Processing sketch use video capture over a browser? That is, activate a users webcam over the internet? I am using the built in video library.
The Reference for some of the Network library methods (i.e. available(), read(), etc) refer to a "buffer" - I do not understand what this is...and I believe my ignorance of it may be leading to the trouble I am having with my code that follows.
I have written a server and client whiteboard program, and I keep getting "nullpointexceptions" after the program runs fine for a while - it appears almost random when the program fails, sometimes it happens to the server, sometimes it happens to a client(s). I open the server first, then I run the clients. the clients are duplicates,I just saved them under different names.
This is the Server:
I have highlighted the line that gets the "nullpointerexception"
//EXC 19-4 SERVER white board with colors
//import net library
import processing.net.*;
//Declare a server and client object
Server server;
//tracks the number of clients connected
int clientCount = 0;
String incomingMessage = "";
PFont f;
void setup(){
size(300, 200);
background(255,0,0);
//initialze server
server = new Server(this, 5204);
f = createFont("Chalkduster-48.vlw", 20, true);
incomingMessage = "";
}//close setup
void draw(){
background(255);
Client client = server.available();
if(client != null){
incomingMessage = client.readStringUntil('*');
server.write(incomingMessage);
//println(incomingMessage);
}//close if
textFont(f);
textAlign(CENTER);
fill(0);
text(incomingMessage, width/2, height/2 + 50);
}//close draw
void serverEvent(Server server, Client client){
//incomingMessage = "A new client has connected" + client.ip();
println("A new client has connected at IP: " + client.ip());
//server.write(clientCount);
clientCount += 1;
}//close serverEvent
This is the client...
I have highlighted the line that gets the "nullpointerexception"
I am displaying text in an applet that is coming from the keyPressed() function, when I press the "SHIFT" key, or other non-letter non-punctuation keys, i get a image that looks like an 8 with a black square around it. Why is this, and is there an easy way to handle these?