Error occur when pressing delete key to clear the date value of the datetimepicker control


Error occur when pressing delete key to clear the date value of the...
Author
Message
Jeff Pagley
Jeff Pagley
Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)Advanced StrataFrame User (641 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
Hi Strataframe Team,

After I upgraded to the 1.6.5, I get the error below when I press the delete key to clear the date value of the datetimepicker control which is bound to a date field of a business object.   Although I get this error, the database is being updated properly.  Why is this error is occurring?

=======================================================================

Object reference not set to an instance of an object.
  Exception (NullReferenceException): Source="MicroFour StrataFrame UI"; Target=null; Tag=null;
    Message = "Object reference not set to an instance of an object."
  Environment: ThreadIdentity="" DateTime=["2008-04-29 16:31:15.908"] ThreadName=null WindowsIdentity="STRUSS\JPagley" ThreadId="10" DomainName="CMPR.vshost.exe" OSVersion=["Microsoft Windows NT 5.1.2600 Service Pack 2"] MachineName="1LPJPAGLEY"
    UserName="JPagley"
  Remaining Stack Trace  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    at MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker.CreateManualCaret()
    at MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker.OnGotFocus(EventArgs e)
    at System.Windows.Forms.Control.WmSetFocus(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.DateTimePicker.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
    at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Replies
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,

Here is a 2 for 1 quick sample project Hehe

You will find 2 forms, one for testing the datetime picker problem when you try to delete its value and the other will show you the problem with the ListView Add button which will always stay Enabled when there is not parent record.



Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I saw something that could produce an error within certain environments.  Give this assembly a shot...I think that it will resolve your problems.  It had to do with how the API interprets bitmaps and the integer pointer.

Note: You will need to be on the 1.6.6 beta in order for this assembly to properly work.

Attachments
MicroFourStrataFrameUI.zip (140 views, 743.00 KB)
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (04/30/2008)
I saw something that could produce an error within certain environments.  Give this assembly a shot...I think that it will resolve your problems.  It had to do with how the API interprets bitmaps and the integer pointer.

Note: You will need to be on the 1.6.6 beta in order for this assembly to properly work.

Hi Trent,

Yes, this assembly fixed the datetimepicker delete value problem.

Thanks.

P.S.

Where you able to test the 2nd form for the ListView issue? even thought it does not belong to this thread Smile

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Look here: http://forum.strataframe.net/FindPost16017.aspx

I didn't run your sample as I already knew what you were trying to accomplish, so I haven't even tested it at this point.  But you can load the assembly and see if you get what you want.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search