Run time error on DevEx Subclasses TextBox


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I just upgraded the DevEx Comntrols to 11.1 and since then I am getting a run time error on a Devex Subclassed Control

(Everything was working fine prior to the upgrade)

I have traced the Error (Object reference not set to an instance....)  back to a Line on the .Designer.cs file :

((System.ComponentModel.ISupportInitialize)(this.txtTotalExposure.Properties)).BeginInit();

 

My Subclassed Code is (Which I have not changed)

// 31-03-11 Subclass form DevExpress Controls
public class dxTextEdit : MicroFour.StrataFrame.UI.Windows.Forms.DevEx.TextEdit
{
private System.Drawing.Color originalBackgroudColour;
protected override void OnEnter(EventArgs e)
{
//-- Run Base Class Code
// XtraMessageBox.Show("this is a message in OnEnter of dcTextEdit");
base.OnEnter(e);
//-- Save away original background color
this.originalBackgroudColour = this.BackColor;
// Mimic the VFP SelectOnEntry = .t.
this.SelectAll();
 
//-- Set fields to be the maximum length of the database fields
//-- For Memo (VarChar(Max) check for Mutiline..assumes Multiline is on for VarChar(Max) though
// -----> TextEdit does not seem to have a propety called MultiLine or AutoAdjustMaxLength..GOC Modified SF code No MUltiLine though ??
if (this.BusinessObject == null )
{
this.AutoAdjustMaxLength = false;
}
else
{
// XtraMessageBox.Show("dxTextEdit... before setting this.AutoAdjustMaxLength to true");
this.AutoAdjustMaxLength = true;
}
 
//-- Define the background color for the control.. maybe extend this to use a property later
this.BackColor = Color.Aqua;
}
 
protected override void OnLeave(EventArgs e)
{
//-- Run the Base Code for the textbox
base.OnLeave(e);
//-- Reset back color to the default
this.BackColor = this.originalBackgroudColour;
}
} // End dxTextEdit
 
// 31-03-11 SubClas dxTextEdit for 0 decimal point numeric field
public class dxTextEdit0D : dxTextEdit
{
protected override void OnEnter(EventArgs e)
{
base.OnEnter(e);
this.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.Properties.EditFormat.FormatString = "###,###,###,##0"; // Allow dec point else it ignores it and 12.34 goes to 1234
this.Properties.DisplayFormat.FormatString = "###,###,###,##0";
this.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
this.Properties.Mask.EditMask = "n00";
}
} // End dxTextEditN0


 


Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
OK . Seem to have got this sorted.

Even though I 'thought' I had copied the Recompiled SF Inherited UI.dll to the GAC, it does not look as if it had been copied. So I removed the existing one, and recopied if to the GAC from the Project Folder. Error is gone away now !!
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Gerard,

Yeap, I've seen errors like that before when rebuilding SF source.  Make sure when you are updating the SF source that any project that uses those libraries are closed.

Edhy Rijo

Zoltan Riss
Zoltan Riss
StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)
Group: Forum Members
Posts: 1, Visits: 2
I checked while updating SF source and closed all the projects that used the libraries.But still it shows an error message while updating SF source...Can anyone point out where am I going wrong.                           

Mortgage Refinancing
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Zoltan.

Are you getting a run time error in relation to new version of Dev Express with Modifified SF Source Code ? . If so, what fixed it for me, was recompiling the SF Source Code (for DevExpress Wrappers) and SPECIFICALLY COPYING THE SF DevExpress .DLL to the GAC  (By first deleting the Exisitng GAC DLL, then opening two concurrent versions of Windows Explorer and Dragging and Dropping the DLL from the compiled folder into the GAC folder)

 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search