Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ArgumentOutOfRangeException (Read 5328 times)
jovi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Aug 12th, 2009
ArgumentOutOfRangeException
Aug 12th, 2009 at 7:50pm
Print Post  
Hello, I installed PocketPlanner and I was trying to build and run the sample projects in a device using Windows CE 5.0 (NOT Windows Mobile).
With the sample named "Resources" I changed the target platform to Windows CE and I got succesful run only once, after just opening the mainform and modifing the "Dock" attribute it does not work anymore.
After that, all contacts information was lost and I cannot add new contacts using the designer.
I am using Visual Studio 2008. Does anyone have any hint about this?

Thanks in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ArgumentOutOfRangeException
Reply #1 - Aug 13th, 2009 at 6:09am
Print Post  
What exactly happens when you add new contacts in the designer?

Meppy
  
Back to top
 
IP Logged
 
jovi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Aug 12th, 2009
Re: ArgumentOutOfRangeException
Reply #2 - Aug 13th, 2009 at 11:22am
Print Post  
Hi again,

Thank you for taking interest in my problem.
The issue is very easy to reproduce. Just take the "Resources" sample provided with the trial, change the target platform to Windows CE, open the MainForm with the designer and you will see the contact information. Change an attribute (docking for example), save and close the form and open it again. All contacts will be gone, and if you try to run the sample, you will get an ArgumentOutOfRangeException (as expected).
To run the sample you will need a real WinCE device or you will have to build a WinCE SDK with an emulator using Platform Builder, since VS2005 and VS2008 do not provide an emulator for WinCE. But you can reproduce the first part of the issue without actually running the application.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ArgumentOutOfRangeException
Reply #3 - Aug 13th, 2009 at 1:16pm
Print Post  
I was able to reproduce your problem. For some reason when the designer generates the initialization code, it adds the contacts to a newly created collection objects instead of to the Calendar.Contacts collection. Here is the code generated by the designer for me:

Code
Select All
new MindFusion.Scheduling.ContactCollection().Add(contact1);
new MindFusion.Scheduling.ContactCollection().Add(contact2); 


Thus, when you change any property, the designer regenerates the code and the contacts get lost.

It seems that the designer information associated with the component (which is located in the accompanying asmmeta assembly) is not loaded in the Windows CE designer. Properties have lost their default values and various setting objects, which are supposed to be editable in the property grid, are grayed out.

What I can suggest under those circumstances is that you add resources manually through code.

Regards,
Meppy
  
Back to top
 
IP Logged
 
jovi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Aug 12th, 2009
Re: ArgumentOutOfRangeException
Reply #4 - Aug 13th, 2009 at 5:52pm
Print Post  
Hi Meppy,

Indeed the accompanying assembly it is not been loaded, and I think this may be because it is a PocketPC assembly and not a WinCE assembly.

MindFusion should also provide a WinCE assembly, I think it can be generated using the genasm tool provided by VS2005/VS2008. Only a change in one parameter is required:
-platformfamily WindowsCE
instead of
-platformfamily PocketPC

But this is not up to me, so I will have to follow your advice for now.

Thanks for your help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint