Bug needs fixed - w/recommendation

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
dwkrueger
Posts: 47
Joined: Tue Jun 26, 2007 1:43 pm
Location: Indiana

Bug needs fixed - w/recommendation

Post by dwkrueger » Tue Apr 08, 2008 6:09 pm

Bug:
OpenDenta/AutoCodeEdit.cs

Empty AutoCodes Can Be Created. This allows ledgeritems to be created without a ProcCode or ProceDescription. Then this causes MigraDoc to create an exception.

Recommened fix to add to the check of the OK Button
if (tbAutoItem.MaxRows ==0)
{
MessageBox.Show(Lan.g(this, "You must add at least one row"));
return;
}
I would have added it to the 5.6 but I think it is locked.
I would have added it to the 5.7 but it doesn't compile right now (sombody forgot a file)

This does bring up a MigraDoc Bug that will throw and exception every time in
ParagraphElement.cs
public Text AddText(string text)
{
if (text == null)
throw new ArgumentNullException("text"); ...

I reocmmend

if (text == null)
text = "";

but This I'm not familiar to migraDoc.

This does make an issue for enclosing migraDoc created elements or previews inside try blocks. With a message saying "unable to present viewer"

How to recreate this bug: 1) Create an empty autocode item 2) add item to ledger 3) Print treatment plan. Crash

User avatar
jordansparks
Site Admin
Posts: 5744
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Bug needs fixed - w/recommendation

Post by jordansparks » Wed Apr 09, 2008 8:43 am

Thank you. The database maintenance tool will already delete procedurelog entries with no code, so just run it to clean up. Now that we know about the cause of the problem, we will be able to fix it quickly.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply