Can anyone tell me how to access enum constants in another package...
amit.hak50
0
Junior Poster in Training
Recommended Answers
Jump to PostDeclare them public, import the package, refer to them by fully-qualified name.
Jump to PostYou are trying to use the enum as if it is a variable. Your code should look more like this...
BetfairStatus status = ...
if (status == BetfairStatus.CONNECTED) ...
Jump to PostI really don't approve of global variables. IMHO you should always make variables private and use get/set methods. But if that's the way you want to do it...
In your globals you need the enum to define the possible values, plus another global variable that holds the current value:
Jump to PostPlease mark thread as solved, so everyone else knows not to try to asnswer it! J
All 16 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
amit.hak50
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
amit.hak50
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
amit.hak50
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
amit.hak50
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
amit.hak50
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
amit.hak50
0
Junior Poster in Training
amit.hak50
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
amit.hak50
0
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.