(Warning, Java style hints ahead. This email could upset C programmers :-)
You wrote:
CSpider.putUserSessionObject("sesLetter",(CSpValue) new CSpString("NULL"));
Hi, one quick piece of advice not related to your question:
the line above is written in a way that may confuse people,
because these are all different:
"NULL" NULL CSpString("NULL") (CSpString)NULL (CSpValue)(CSpString("NULL");
Instead of "NULL", how about using a space letter?
CSpider.putUserSessionObject("sesLetter",(CSpValue) new CSpString(" "));
If you want to prepare for Java Beans (which is always smart)
you may want to consider writing the above in a better, clearer
way that will be more understandable and encapsulated:
protected final string kSesLetter="sesLetter";
public void setSesLetter (char c) {
CSpider.putUserSessionObject(kSesLetter,(CSpValue) new CSpString(c));
}
public void setSesLetterNull () {
CSpider.putUserSessionObject(kSesLetter,(CSpValue) new CSpString(' '));
}
public char getSesLetter () {
return (CSpider.getUserSessionObject(kSesLetter)).toChar();
}
public boolean isSesLetterNull () {
return (CSpider.getUserSessionObject(kSesLetter)).toChar()==' ';
}
The Bean style is preferable because now your developers
don't need to know your internal representation of NULL,
nor about ND sessions, nor about CSpValue or CSpString,
nor about what string you choose to use for "sesLetter".
The Bean approach takes a little more time and design.
In my experience, it is well worth it if you will ever
have other Java developers maintaining your code.
- Joel
[EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]