Originally posted by Gordon Gekko
for example, what the f$%# does this mean??
if (getBarState() == BARSTATE_NEWBAR)
this might as well be in japanese. (i'm not japanese)
Allowing the use of a list of constant values defined through a mnemonic - a symbol that is descriptive - rather than requiring the use of the value itself makes programming easier and code more readable and allows a compiler or interpreter to substitute the actual values. The descriptive constant names and values are defined in a file somewhere ...
If you can find out which file(s) contains all these definitions then you should be able to make some progress. Some implementaions will have just the name and value e.g.
TRANSACTION_STATE = 3;
more useful ones will have a defintion as well e.g.
TRANSACTION_STATE = 3; // Aborted Tranasaction
A really well thought out implementation will require no definition e.g. ABORTED_TRANSACTION = 3; COMPLETED_TRANSACTION = 2; etc
The vendors implementation may or may not publish source code for this and the information and definitions may be in a help file - or may not. Ask the vendor where these things are defined ....
After a while you can guess at the meaning of the constants:
BARSTATE_NEWBAR might mean that some type of user interface control "bar" object was created but perhaps not initialized - that is it is empty or still needs data for its appearance and behaviour etc. .... which is why the code is checking for this value ... Just a guess since I dont code this vendors product ..
The vendor should have a help file with examples that descibe the steps necessary to get a "bar" object initialized and ready to be used.