FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   setfont nullpointerexception
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: setfont nullpointerexception  (Read 314 times)
joshka

WWW
setfont nullpointerexception
« on: Sep 11th, 2003, 5:41pm »

i don't know if it's p5, or java.. but my setFont() throws a null pointer exception any time it's called.. no idea why..
 
i've pasted code from the net, i've written my own, and i've pasted examples from the api.. still, nothing.
 
thanks..
--josh
 

llotoasoeotasdg;;dsfgnxduibpesrbnlxckj,.ndsa.ewrsgdfivbs
toxi

WWW
Re: setfont nullpointerexception
« Reply #1 on: Sep 11th, 2003, 6:54pm »

that'd probably be because you haven't put a copy of the font in the data folder inside your sketch folder. any file your sketch is loading needs to be in this folder or else it won't be found by P5...
 

http://toxi.co.uk/
benelek

35160983516098 WWW Email
Re: setfont nullpointerexception
« Reply #2 on: Sep 12th, 2003, 4:20am »

this font-to-data-folder thing seems to come up quite a bit. i think it's already been suggested, so i'll just double-suggest that a font be automatically placed in the data folder if required, or that users can easily access the data folder with a simple click from within p5 (which would aid the situation with the data folder in general).
 
even better, would be the possibility to drag and drop a font's icon into a symbolic rectangle, labelled "data" from within the p5 interface. or possibly more easily, a menu called "data folder" in which all the fonts would be listed, and you could click on one, have it ticked, and then it would be moved to the data folder by p5.
 
i don't think this would subtract from the educational experience of knowing that the data folder has to hold these extra files, since users would still have to do something themselves to get the file in the correct location.
 
Jerronimo

WWW
Re: setfont nullpointerexception
« Reply #3 on: Sep 12th, 2003, 4:40am »

How about if the Processing parser can look in a data library for these files, so that you don't need to install them into your data directory itself?
 
Like, first P5 would look in the sketch's data directory, then in its own data directory...
 
(It would also be nice to have a programmers library (shelf?) too, such that you could put classes that you've written into, so that you don't need to copy them into every sketch you write...
 
joshka

WWW
Re: setfont nullpointerexception
« Reply #4 on: Sep 12th, 2003, 4:54am »

ahh.. i had assumed that p5 got what it needed from it's own data library..
 
i guess if i've made that assumption, then it's fair to say plenty others will..
 
therefore the the above suggestions are more than valid, and should be looked into!
 
tks
--josh
 

llotoasoeotasdg;;dsfgnxduibpesrbnlxckj,.ndsa.ewrsgdfivbs
fry


WWW
Re: setfont nullpointerexception
« Reply #5 on: Sep 21st, 2003, 7:32pm »

this is documented in loadFont:
http://proce55ing.net/reference/loadFont_.html
 
but i've also added some better error messages for rev 60, for people who don't read the docs (almost everyone?)
 
also, this will improve for a future release, where we'll get rid of the fonts folder altogether, and add the font builder directly to the app.
 
Pages: 1 

« Previous topic | Next topic »