Please keep questions on the list.

On 2-Apr-08, at 11:19 PM, Eleni Manou wrote:
Hi David

I am just copying some lines from my project in WO 5.3. There in Session.java I define

public String userName;

and then in a component I set this variable using

((Session)session()).userName = .....

This should work, though personally I'd wrap userName with accessor methods.

This is not working in WOLips project, wher I get the error message

Unresolved compilation problem:
        username cannot be resolved or is not a field

Why is username not here not camelCased like above?

Can you help more? Many thanks

Stavros

On 02 Απρ 2008, at 6:23 ΠΜ, David LeBer wrote:

On 1-Apr-08, at 11:14 PM, Eleni Manou wrote:

Hi all,

Can anyone help e on how to access session variables? Before (WO 5.3) I had simply to declare a variable in to the session.java class and then I cold read and and set this variable using (Session)session(). This seems that does not work in my Eclipse/ WOLips project.

Am I doing something wrong (probably)?

Many thanks in advance


Are your variables private or protected?

They need to be public or (better yet) have public accessors.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to