We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Update to 1.1. - replacement for createFont
Page Index Toggle Pages: 1
Update to 1.1. - replacement for createFont (Read 799 times)
Update to 1.1. - replacement for createFont
Mar 28th, 2010, 12:22pm
 


Hello,

I  am using controlP5 and
this old line used to work:
font1 = new ControlFont(createFont("Times",80),80);

Now it doesn't.

How can I access the Font-object?

Thanks?

Greetings, Chris  Wink

PeasyCam v0.8.1
ControlP5 0.4.2 infos, comments, questions at http://www.sojamo.de/libraries/controlP5
processing.app.debug.RunnerException: IllegalAccessError: tried to access field processing.core.PFont.smooth from class controlP5.ControlFont
     at processing.app.Sketch.placeException(Unknown Source)
     at processing.app.debug.Runner.findException(Unknown Source)
     at processing.app.debug.Runner.reportException(Unknown Source)
     at processing.app.debug.Runner.exception(Unknown Source)
     at processing.app.debug.EventThread.exceptionEvent(Unknown Source)
     at processing.app.debug.EventThread.handleEvent(Unknown Source)
     at processing.app.debug.EventThread.run(Unknown Source)
Exception in thread "Animation Thread" java.lang.IllegalAccessError: tried to access field processing.core.PFont.smooth from class controlP5.ControlFont
     at controlP5.ControlFont.<init>(Unknown Source)
     at SolitaireNeu5.setup(SolitaireNeu5.java:276)
     at processing.core.PApplet.handleDraw(Unknown Source)
     at processing.core.PApplet.run(Unknown Source)
     at java.lang.Thread.run(Thread.java:619)

Re: Update to 1.1. - replacement for createFont
Reply #1 - Mar 28th, 2010, 5:41pm
 
hi,
i just updated controlP5 to version 0.5.0, can be downloaded here. PFont did undergo some changes for processing 1.1 and PFont.smooth is not publicly accessible anymore, so that has been adjusted for ControlFont (more details see the ControlP5controlFont example).
Code:

// since version 0.5.0 the following constructor can be used.
font1 = new ControlFont(createFont("Times",80));

works for you?
best,
andreas
Re: Update to 1.1. - replacement for createFont
Reply #2 - Mar 29th, 2010, 12:59am
 

Thank you very much,

I have to check this evening
(European time).


Chrisir    Wink
Page Index Toggle Pages: 1