Re: Eclipse cannot find binding in WO Components
Re: Eclipse cannot find binding in WO Components
- Subject: Re: Eclipse cannot find binding in WO Components
- From: Pascal Robert <email@hidden>
- Date: Wed, 20 Aug 2008 14:34:58 -0400
"protected int dayIndex;" should be "public int dayIndex;". You get
this warning because if you're using packages (I guess you're not, for
now) your code wouldn't work. Better fix those warnings right now so
that you can use packages later on.
It took a lot of work, but I have completed most of the transition
of my project from Xcode 2.x (WO 5.3) to Eclipse 3.3.2 / WOLips
3.3.5385 (WO 5.4.2). The java files are error from but still have
some warnings, mostly due to generics. The problem I am running into
is with the WO components. I get error messages (from Eclipse) in
the HTML/WOD files stating there is no key 'keyName' in
MiniMonthCalendar. It is unable to find inherited iVars. If I define
the iVar locally, it works. All java files are in the same package.
Note that all of this was working code prior to the migration.
Here are the simplified relevant pieces to the classes / components
involved:
BaseComponent extends WOComponent
{
// valueForKey() was overridden here to provide some custom behavior.
// I found a thread that indicated that could be the cause problems
so I
// removed it for testing. The errors persisted.
}
CalendarBase extends BaseComponent
{
protected int dayIndex; // No accessor methods provided for dayIndex
}
MiniMonthCalendar extends CalendarBase
{
protected GregorianCalendar gcMiniCalendar;
public AppointmentCalendar dayViewForDate()
{
AppointmentCalendar nextPage = (AppointmentCalendar)
pageWithName( AppointmentCalendar.class.getName() );
. . .
return nextPage;
}
public NSTimestamp calendarDate()
{
NSTimestamp tsTemp = new NSTimestamp( gcMiniCalendar.getTime() );
gcMiniCalendar.add( GregorianCalendar.DAY_OF_MONTH, 1 );
return tsTemp;
}
public NSMutableDictionary<String, String> dateDict()
{
return NSMutableDictionary containing the date information as a
String for the clicked date
}
}
MiniMonthCalendar.html
<webobject name="dayLoop">
<webobject name="dayLink">
<webobject name="theDate"></webobject>
</webobject>
</webobject>
MiniMonthCalendar.wod
dayLoop: WORepetition
{
count = 7;
index = dayIndex; // Cannot find -- iVar defined in CalendarBase.java
}
dayLink: WOHyperlink
{
action = dayViewForDate; // Can find -- method defined in
MiniMonthCalendar.java
queryDictionary = dateDict; // Can find -- method defined in
MiniMonthCalendar.java
}
theDate: WOString
{
value = calendarDate; // Can find -- method defined in
MiniMonthCalendar.java
dateformat = "%d";
}
_______________________________________________
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
-------------------------------------------------------
Pascal Robert
http://www.macti.ca
http://www.linkedin.com/in/macti
Skype: MacTICanada
AIM/iChat : MacTICanada
_______________________________________________
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