View unanswered posts | View active topics It is currently Sat May 27, 2017 9:17 am



This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
 DataChangedEvent range not changing 
Author Message

Joined: Thu Jul 21, 2011 7:01 pm
Posts: 2
Post DataChangedEvent range not changing
Hello, I'm using migcalendar and I need to extract startDate and endDate from DataChangedEvent when I creates an activity by dragging in the day/days date area.
I noticed that, no matter how big is my dragging rectangle, endDate is ALWAYS 30 minutes after start date. For example if I create an activity for tomorrow from 10am to 12am, I see in the DataChangedEvent that
startDate is 07-22-2011 10:00:00 and endDate is 07-22-2011 10:29:59, even if in the panel the activity rectangle is from 10am to 12am.

So I tried to debug your BeanDemo example, I put a breakpoint in AppFrame on line 1228, where is the code :
Code:
// This is the code that creates an activity by dragging in the day/days date area.
      if (evt.getType() == DateChangeEvent.PRESSED) {

         if (newCreatedAct == null && evt.getNewRange().getMillisSpanned(false, false) > 45*60*1000) {
            newCreatedAct = new DefaultActivity(evt.getNewRange(), new Long(new Random().nextLong()));
            newCreatedAct.setSummary("New Event");
            newCreatedAct.addCategoryID(homeID, -1);
            ActivityDepository.getInstance(dayDateArea.getActivityDepositoryContext()).addBrokedActivity(newCreatedAct, this, TimeSpanListEvent.ADDED_CREATED);
         }


inspecting "evt.getNewRange().getMillisSpanned(false, false)" I found that it's always 1799999 milliseconds, no matter how tall is the activity rectangle that I drag.

I wonder wether this is a bug or I'm missing something.
Thanks


Thu Jul 21, 2011 7:19 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: DataChangedEvent range not changing
Hello,

Please use the support ticket system for support. You can find it at the main site migcalendar.com

Thanks,


Thu Jul 21, 2011 8:48 pm
Profile WWW

Joined: Thu Jul 21, 2011 7:01 pm
Posts: 2
Post Re: DataChangedEvent range not changing
Hello, I have a developer license. Opening a new bug ticket is allowed only to customers with support contract?


Thu Jul 21, 2011 9:20 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: DataChangedEvent range not changing
We have support contracts to get support.

This is most likely not a bug.

Thanks,


Thu Jul 21, 2011 10:30 pm
Profile WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 4 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.