Re: Protected access modifiers handled differently at runtime in XCode and Eclipse?
Re: Protected access modifiers handled differently at runtime in XCode and Eclipse?
- Subject: Re: Protected access modifiers handled differently at runtime in XCode and Eclipse?
- From: Guido Neitzer <email@hidden>
- Date: Wed, 20 Aug 2008 00:20:00 -0600
- Thread-topic: Protected access modifiers handled differently at runtime in XCode and Eclipse?
On 20.08.08 00:04, "Peter Newnam" <email@hidden> wrote:
> I have a WebObjects projects which is being converted to Eclipse - on
> Mac. One of the defined components has 4 protected access variables.
Which is actually wrong when you really think about it.
> These 4 variables are bound to components in the html When in the
> binding view in Eclipse (WOlips perspective) an error is rightly picked
> up that the variables are not visible.
Which is correct.
> If the errors are ignored and
> the application is run it fails at runtime because it can't find the
> variables. So far so good ....
And that part is weird. Are you doing something different in Eclipse? Here
that gives the errors in the Component Editor, but it works at runtime just
fine.
Are you sure that the errors at runtime come from that?
> Any insight would be appreciated.
Fix your Java code. Variables should be private with public accessors as
soon as something outside your class (and package) accesses it which is the
case with components. That this works is just some magic of key value
coding.
cug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden