Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » CalendarField doesn't like the 30 March(Dates around the 30 march don't appear correctly in calendar)
CalendarField doesn't like the 30 March [message #1275092] Sat, 22 March 2014 13:37 Go to next message
Didier LALLEMAND is currently offline Didier LALLEMANDFriend
Messages: 18
Registered: February 2014
Junior Member
Hi Scout Users,

CalendarField works fine for me ...except when I add a CalendarAppointment with date after 29 march, then in the CalendarField (Month view "March")
- < 29 march : the date is highlight (ok)
- 30 march : the date is NOT highlight
- 31 march : 30 march is highlight but not 31 march
- 1st april : 31 march is highlight but not 1st april
...and so on

It's ok for Month view "April" (30 march, 31 march are correctly highlighted, 30 april also ok)
Also no problem with other views "day", "week", "work week"...


(Note, that instead of "Mois", it is written "Mese"... Crying or Very Sad
...you've guess, i'm french Razz )

Regards,



Scout 3.9 with RAP (neither Swing nor SWT) / Linux
Re: CalendarField doesn't like the 30 March [message #1276197 is a reply to message #1275092] Mon, 24 March 2014 08:11 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Didier,

thanks for your question. I did try your usecase with our Widget Demo App:

            @Override
            protected void execLoadItems(Date minDate, Date maxDate, final Set<ICalendarItem> result) throws ProcessingException {

              java.util.Calendar cal = java.util.Calendar.getInstance();

              cal.setTime(new Date());
              cal.set(java.util.Calendar.DAY_OF_MONTH, 31);
              cal.set(java.util.Calendar.MONTH, 2);
              cal.set(java.util.Calendar.YEAR, 2014);
              System.err.println(cal.getTime());
              result.add(new CalendarAppointment(1L, 2L, cal.getTime(), cal.getTime(), true, "March 31", "body", "2AD50A"));

              cal.setTime(new Date());
              cal.set(java.util.Calendar.DAY_OF_MONTH, 30);
              cal.set(java.util.Calendar.MONTH, 2);
              cal.set(java.util.Calendar.YEAR, 2014);
              System.err.println(cal.getTime());
              result.add(new CalendarAppointment(1L, 2L, cal.getTime(), cal.getTime(), true, "March 30", "body", "9EE0AA"));

              cal.setTime(new Date());
              cal.set(java.util.Calendar.DAY_OF_MONTH, 29);
              cal.set(java.util.Calendar.MONTH, 2);
              cal.set(java.util.Calendar.YEAR, 2014);
              System.err.println(cal.getTime());
              result.add(new CalendarAppointment(1L, 2L, cal.getTime(), cal.getTime(), true, "March 29", "body", "9AD5FD"));
            }


When launching the Swing UI, I get the following result:
index.php/fa/17821/0/

So it seems to work correctly on my side. If you could provide more information, we could try to fix your problem together:

- Is your code different to mine?
- Can you tell me which version of Scout you are using?

Best regards,
Matthias
  • Attachment: calendar.png
    (Size: 74.59KB, Downloaded 1301 times)
Re: CalendarField doesn't like the 30 March [message #1276352 is a reply to message #1276197] Mon, 24 March 2014 12:50 Go to previous messageGo to next message
Didier LALLEMAND is currently offline Didier LALLEMANDFriend
Messages: 18
Registered: February 2014
Junior Member
Hi Matthias,

Thanks for your help and for your quick answer.

I use Scout 3.9 with only RAP (not with Swing neither SWT). I think that the problem appears with Rap.

I use Calendar in that way :

			
	public class CalendarField extends AbstractCalendarField<CalendarField.Calendar> {
				
				@Order(10.0)
				public class Calendar extends AbstractExtensibleCalendar {
					
					@Order(10.0)
					public class DefaultItemProvider extends AbstractExtensibleCalendarItemProvider {
						
						@Override
						protected void execLoadItemsInBackground(final IClientSession session, final Date minDate, final Date maxDate, final Holder<ICalendarItem[]> resultHolder) throws ProcessingException {
						         resultHolder.setValue(getMyCalendarItems(minDate, maxDate));					
                                        	}
					}
				}
	}


	public ICalendarItem[] getMyCalendarItems() throws ProcessingException {
	
		final java.util.Calendar cal = java.util.Calendar.getInstance();
		final List<ICalendarItem> result = new ArrayList<>();
		cal.setTime(new Date());
		cal.set(java.util.Calendar.DAY_OF_MONTH, 31);
		cal.set(java.util.Calendar.MONTH, 2);
		cal.set(java.util.Calendar.YEAR, 2014);
		System.err.println(cal.getTime());
		result.add(new CalendarAppointment(1L, 2L, cal.getTime(), cal.getTime(), true, "March 31", "body", "2AD50A"));
		cal.setTime(new Date());
		cal.set(java.util.Calendar.DAY_OF_MONTH, 30);
		cal.set(java.util.Calendar.MONTH, 2);
		cal.set(java.util.Calendar.YEAR, 2014);
		System.err.println(cal.getTime());
		result.add(new CalendarAppointment(1L, 2L, cal.getTime(), cal.getTime(), true, "March 30", "body", "9EE0AA"));
		cal.setTime(new Date());
		cal.set(java.util.Calendar.DAY_OF_MONTH, 29);
		cal.set(java.util.Calendar.MONTH, 2);
		cal.set(java.util.Calendar.YEAR, 2014);
		System.err.println(cal.getTime());
		result.add(new CalendarAppointment(1L, 2L, cal.getTime(), cal.getTime(), true, "March 29", "body", "9AD5FD"));
		return result.toArray(new ICalendarItem[] {});
	}




And the result (see attachement) :

index.php/fa/17826/0/

Best regards,

Didier


Scout 3.9 with RAP (neither Swing nor SWT) / Linux
Re: CalendarField doesn't like the 30 March [message #1276988 is a reply to message #1276352] Tue, 25 March 2014 10:15 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Didier,
I tried your code with the 3.9 branch, and it works on my side:
index.php/fa/17835/0/

I attached my complete form. Is it somehow different to yours?


When you press "Control-Shift-a" in Eclipse, and type "org.eclipse.scout.rt.ui.svg.calendar", which version does it show to you? Mine is 3.9.0.20130510-1229

Best regards,
Matthias
Re: CalendarField doesn't like the 30 March [message #1277083 is a reply to message #1276988] Tue, 25 March 2014 13:26 Go to previous messageGo to next message
Didier LALLEMAND is currently offline Didier LALLEMANDFriend
Messages: 18
Registered: February 2014
Junior Member
Hi Matthias,

I have 3.9.2.20131003-1323...

Regards,

Didier.


Scout 3.9 with RAP (neither Swing nor SWT) / Linux
Re: CalendarField doesn't like the 30 March [message #1277119 is a reply to message #1277083] Tue, 25 March 2014 14:27 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Didier,
I also tested with 3.9.2.20131003-1323 and works as expected on my side.

Do you have a .target file? If yes can you attach it? Then I would be able to test it on my side.

Matthias
Re: CalendarField doesn't like the 30 March [message #1278477 is a reply to message #1277119] Thu, 27 March 2014 11:39 Go to previous messageGo to next message
Boy D'Poy is currently offline Boy D'PoyFriend
Messages: 67
Registered: October 2011
Member
Holla!

it's just a bug in the Scout default translation files!

"Month" is "Mois" in french rather than "Messe".

  • Attachment: month.png
    (Size: 19.65KB, Downloaded 230 times)


Once You Go Scout, You Never Come Out!
Re: CalendarField doesn't like the 30 March [message #1278531 is a reply to message #1278477] Thu, 27 March 2014 13:07 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
As a french speaking guy I agree that the french translation is not always OK.

I got some feedback for Luna M1 (forum, bug, commit).

To fix the Month translation (Mois instead of Mese), you need to change line 296 in org.eclipse.scout.rt.shared/resources/texts/ScoutTexts_fr.properties.

Could you open a bug and prepare a gerrit patch for it?


For a quick fix, I think you can also override a the default translation with your own one in your project.

Re: CalendarField doesn't like the 30 March [message #1278852 is a reply to message #1278531] Thu, 27 March 2014 23:35 Go to previous messageGo to next message
Didier LALLEMAND is currently offline Didier LALLEMANDFriend
Messages: 18
Registered: February 2014
Junior Member
Hi Matthias, Jeremie and Boy D'Poy

Sorry (again) for my late reply.

@Jeremie : I've never used gerrit, but I'm going to try Wink.
Perhaps also for this translation :
TooManyRows=Quantité des données volumineux. Limiter la recherche s.v.p.
=> Quantité des données volumineuse. Limiter la recherche s.v.p.
or
=> Trop de données. Limiter la recherche s.v.p.


But, my main problem is the one what Matthias tried to reproduce : the dates after 30 march are not highlighted correctly in (my!) CalendarField. According to Matthias tests, it seems that the problem is on my side...

@Matthias : Do you mean this .target file ? (??):
<?pde version="3.8"?>
<target name="ScoutRAP" sequenceNumber="166">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.scout.rt.ui.rap.incubator.filechooser.source.feature.group" version="3.9.0.20130612-0904"/>
<repository location="http://download.eclipse.org/scout/releases/3.9"/>
</location>
<location path="${eclipse_home}/rap_target/" type="Directory"/>
<location path="${eclipse_home}/" type="Directory"/>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rap.fileupload.feature.feature.group" version="1.5.100.20130107-1047"/>
<repository location="http://download.eclipse.org/rt/rap/incubator/2.0/fileupload/"/>
</location>
<location path="${project_loc}/p2/DeltaPackAsRaw/" type="Directory"/>
<location path="${project_loc}/p2/ThirdPartyAsRaw/" type="Directory"/>
<location path="${project_loc}/p2/ImExAsRaw/" type="Directory"/>
</locations>
<launcherArgs>
<vmArgs>-Xms256m -Xmx512m -XX:MaxPermSize=256m</vmArgs>
</launcherArgs>
</target>




Regards,




Scout 3.9 with RAP (neither Swing nor SWT) / Linux
Re: CalendarField doesn't like the 30 March [message #1279028 is a reply to message #1278852] Fri, 28 March 2014 06:21 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Didier LALLEMAND wrote on Fri, 28 March 2014 00:35
@Jeremie : I've never used gerrit, but I'm going to try Wink.
Perhaps also for this translation :
TooManyRows=Quantité des données volumineux. Limiter la recherche s.v.p.
=> Quantité des données volumineuse. Limiter la recherche s.v.p.
or
=> Trop de données. Limiter la recherche s.v.p.


Start with:
* Open a bug (one for all translations you want to improve).
* Sign the CLA

The whole process is described in the Eclipse scout contribution guide.

Do not hesitate to ask in the forum if you are stucked in a step.

Because you just want to edit a text file, you can also do everything on the command line, without setting the Scout RT workspace in Eclipse. It might be quicker. (if I remember correctly you are a linux guy). If you want to do this approach, I can also provide feeback (maybe we can discuss it in an other thread).


I let you disscuss your other problem with Matthias.

.
Re: CalendarField doesn't like the 30 March [message #1279053 is a reply to message #1279028] Fri, 28 March 2014 07:12 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Didier,

one more question, are you using Windows or Linux?
Re: CalendarField doesn't like the 30 March [message #1279113 is a reply to message #1279053] Fri, 28 March 2014 08:46 Go to previous messageGo to next message
Didier LALLEMAND is currently offline Didier LALLEMANDFriend
Messages: 18
Registered: February 2014
Junior Member
Hi Matthias,

I use Linux.


Scout 3.9 with RAP (neither Swing nor SWT) / Linux
Re: CalendarField doesn't like the 30 March [message #1281732 is a reply to message #1279113] Tue, 01 April 2014 09:21 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Didier,
I just wanted to let you know that I am still working on your problem. I will test it with my Ubuntu machine on Thursday.

Best regards,
Matthias

[Updated on: Tue, 01 April 2014 09:22]

Report message to a moderator

Re: CalendarField doesn't like the 30 March [message #1283472 is a reply to message #1281732] Thu, 03 April 2014 13:02 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Didier,
just tried with Ubuntu and now my calendar also does not like March 31 Smile

I will try to come up with a solution.
Re: CalendarField doesn't like the 30 March [message #1284266 is a reply to message #1283472] Fri, 04 April 2014 09:26 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi,
further analysis: The problem is not Linux specific. I think it has to deal with summer/wintertime.
I opened Bug 431987
Re: CalendarField doesn't like the 30 March [message #1288227 is a reply to message #1284266] Tue, 08 April 2014 11:30 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Didier,
I am glad to say that we have fixed the problem in the develop branch (commit)

A backport to the 3.9 branch is difficult because SR2 has already been released. Can you migrate your project to the latest Scout branch?

Best regards,
Matthias
Re: CalendarField doesn't like the 30 March [message #1288658 is a reply to message #1288227] Tue, 08 April 2014 19:11 Go to previous messageGo to next message
Didier LALLEMAND is currently offline Didier LALLEMANDFriend
Messages: 18
Registered: February 2014
Junior Member
Hi Matthias,

(Excuse me, I missed your posts!)

You are the best ! Wink

Yes I'm going to try the latest Scout Branch as soon as possible, both for this problem and for this one http://www.eclipse.org/forums/index.php/t/677028/

Thanks a lot Matthias!

Didier


Scout 3.9 with RAP (neither Swing nor SWT) / Linux
Re: CalendarField doesn't like the 30 March [message #1332508 is a reply to message #1288658] Sun, 04 May 2014 17:30 Go to previous messageGo to next message
Didier LALLEMAND is currently offline Didier LALLEMANDFriend
Messages: 18
Registered: February 2014
Junior Member
Hi Matthias,

I tried with latest devel branch (luna) and the problem seems to be resolved.

Thanks again!

Didier.


Scout 3.9 with RAP (neither Swing nor SWT) / Linux
Re: CalendarField doesn't like the 30 March [message #1394469 is a reply to message #1278852] Sat, 05 July 2014 10:27 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Didier LALLEMAND wrote on Fri, 28 March 2014 00:35
I've never used gerrit, but I'm going to try Wink.


Contributing a patch is pretty simple.

Prerequisite - You need:
* an eclipse.org account (You have already one to post in this forum)
* to sign the CLA
* an existing bug in Bugzilla that describe what you want to change.

Here a "command line" how-to:

0/ Clone the scout RT repository and checkout the develop branch.
git clone -b develop https://git.eclipse.org/r/scout/org.eclipse.scout.rt

If you use git the first time on your computer, you might need to set your email and your user name in the git settings.


1/ Bring your local clone of the git repository in sync with the remote repository:
(Skip this step if just did step 0).
Fetch all commit form the remote repository (develop branch):
git fetch origin develop


And reset your local branch to the latest commit of the develop branch you just fetched (be careful: all local modifications will get lost)
git reset --hard origin/develop


2/ Edit the property file:
Scout text files are located in the folder:
dir org.eclipse.scout.rt.shared/resources/texts/

For example edit the French file:
org.eclipse.scout.rt.shared/resources/texts/ScoutTexts_fr.properties

If your text contains special chars, be aware that you need to encode them. When you find a wrong or missing translation, a fix is to include this translation in your project translation file (Using the NLS Editor). The best way to have the right encoding is to copy the corresponding line from your project translation file into the scout text file.

3/ commit your change locally (the -a option will automatically stage all modified files).
git commit -a

For your commit message the scout team uses something like:
Bug <bug number>: <bug title>

https://bugs.eclipse.org/bugs/show_bug.cgi?id=<bug number>


You can also indicate what you have changed if the bug title is not explicit enough. If you know how, a good practice is to generate a Gerrit Change-Id line at the end of your commit message.

4/ Push your change to Gerrit
git push ssh://<user>@git.eclipse.org:29418/scout/org.eclipse.scout.rt.git HEAD:refs/for/develop


5/ Post the URL of the change as new Bugzilla comment.
If everything works well, your commit message will contain an URL. Past this URL in Bugzilla:
Change for the develop branch: https://git.eclipse.org/r/<change nr>


6/ Tell someone from the team.
We do not monitor the Gerrit inbox actively. Please tell a commiter (email, phone...). Feel free to use the forum or the dev mailing list to get in touch.

Your patch will be reviewed.

See also our contribution guide for a more detailed explanation.

[Updated on: Sun, 06 July 2014 07:32]

Report message to a moderator

Previous Topic:Gradle build for Scout projects
Next Topic:HTTP 500 error
Goto Forum:
  


Current Time: Fri Apr 19 22:57:59 GMT 2024

Powered by FUDForum. Page generated in 0.04335 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top