Go to Post I'm nervous for those awesome rookie teams that you may not know about much but that just come and do awesome with some fantastic strategy...Rookies rock. - Eugenia Gabrielov [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-04-2012, 19:55
Team3881 Team3881 is offline
Registered User
FRC #3881
 
Join Date: Feb 2012
Location: Hawaii
Posts: 1
Team3881 is an unknown quantity at this point
Cannot make a static reference to the non-static method

Or, more specifically, "Cannot make a static reference to the non-static method getImage() from the type AxisCamera."

The code is just

Code:
ColorImage image = AxisCamera.getImage();
But eclipse just gives that error.

I am sure I'm missing something simple, and/or something huge. Help would be appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 10-04-2012, 20:01
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Cannot make a static reference to the non-static method

You need to get an instance of an AxisCamera before you can call that method.

Example:
Code:
// Typically you only want to do this ONCE; camera should be a class member
AxisCamera camera = AxisCamera.getInstance(); 

// Then you can get the image as often as you would like (but it's pretty slow, you don't want to call this more than once per 50 milliseconds or so!
ColorImage image = camera.getImage();

Last edited by Jared Russell : 10-04-2012 at 20:06.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi