View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005456 | JEDI VCL | 00 JVCL Components | public | 2011-01-13 11:19 | 2011-09-21 14:10 |
Reporter | bongos | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | 3.45 | |||
Summary | 0005456: JvValidateEdit/JvCustomEdit OnChange event called on Component Loading | ||||
Description | The OnChange event of a TjvCustomEdit derivative is called when the component is loaded which is not the behaviour that is expected. | ||||
Additional Information | Recreate by putting TjvValidateEdit on a form, set a value and the OnChange event and run. The Onchange event is fired upon creation of the form. I have currently fixed it for myself by changing the following: In TjvCustomEdit.SetText(const Value: TCaption), change the line ( inherited Text := Value; to Perform(WM_SETTEXT, 0, LongInt(PChar(Value))); | ||||
Tags | No tags attached. | ||||
|
Forgot to mention slight alteration to TJvCustomValidateEdit for this bug, to set the EditText to the formatted value before considering csLoading procedure TJvCustomValidateEdit.Loaded; begin // set the EditText to the formatted value before taking csLoading from ComponentState, to allow eg.skipping of OnChange DataConnector.Active := False; try EditText := FEditText; finally DataConnector.Active := True; end; inherited Loaded; // (obones) Why is this necessary? It overrides DecimalPlaces set to 0 by the user { if DisplayFormat = dfCurrency then if FDecimalPlaces = 0 then FDecimalPlaces := CurrencyDecimals;} end |
|
Please provide the zipped sources of a sample application showing this. |
|
Fixed in svn revision 12986. As far as I can see this can only happen if you use visual inheritance because then the OnChange event handler can be assigned before the Value property. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-01-13 11:19 | bongos | New Issue | |
2011-01-13 12:12 | bongos | Note Added: 0018296 | |
2011-02-15 13:48 | obones | Note Added: 0018350 | |
2011-02-15 13:48 | obones | Status | new => feedback |
2011-02-16 18:53 | AHUser | Note Added: 0018384 | |
2011-02-16 18:53 | AHUser | Status | feedback => resolved |
2011-02-16 18:53 | AHUser | Fixed in Version | => Daily / SVN |
2011-02-16 18:53 | AHUser | Resolution | open => fixed |
2011-02-16 18:53 | AHUser | Assigned To | => AHUser |
2011-09-21 14:10 | obones | Fixed in Version | Daily / SVN => 3.45 |