Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003890 [JEDI VCL] 00 JVCL Components major always 2006-09-09 06:40 2007-12-16 11:44
Reporter moore View Status public  
Assigned To AHUser
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version 3.34 Product Version Daily / GIT
  Target Version Product Build
Summary 0003890: JvDBRichEdit puts Dataset in edit mode
Description just put a dataset and a datasource and link a JvDBRichEdit, open the dataset on form load and it will be open in edit mode without making any edit/insert operation,
make the JvDBRichEdit Datasource property to nil and the dataset opens normally, that is, browse mode..
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files zip file icon Richdit.zip [^] (1,484 bytes) 2006-09-09 09:35

- Relationships

-  Notes
(0010088)
obones (administrator)
2006-09-09 08:59

Please provide the zipped sources of a sample application that shows this behaviour.
(0010089)
moore (reporter)
2006-09-09 09:36

Simple example source included..
(0010308)
obones (administrator)
2006-10-06 03:33

It's because of the TJvDBRichEdit.EMSetCharFormat function that calls EditCanModify. What do you suggest we do?
(0010409)
ultimo (reporter)
2006-11-03 08:07

On creating component call EMSetCharFormat, this procedure call EditCanModify and this procedure Check if DataLink is in EditMode, if not then FDataLink.Edit.
I correct this to check if datasource autoedit is true, and EMSetCharFormat procedure post change (see below)

procedure TJvDBRichEdit.EMSetCharFormat(var Msg: TMessage);
begin
  if FMemoLoaded then
    if not FUpdating then
        if EditCanModify then
        begin
          Change;
          if (FDataLink.Editing) then //<----- Added
            FDataLink.DataSet.Post; //<----- Added
        end;
  inherited;
end;


function TJvDBRichEdit.EditCanModify: Boolean;
begin
  FStateChanging := True;
  try
    Result := FDataLink.Editing;
    if not Result and Assigned(FDataLink.Field) then
    try
      if FDataLink.Field.IsBlob then
        FDataSave := FDataLink.Field.AsString;
      Result := FDataLink.DataSource.AutoEdit and FDataLink.Edit;
    finally
      FDataSave := '';
    end;
  finally
    FStateChanging := False;
  end;
end;
(0010565)
moore (reporter)
2007-01-18 02:42

I think it's better to replace this :

FDataLink.DataSet.Post; //<----- Added

with this :

FDataLink.DataSet.CheckBrowseMode;
(0010697)
ZENsan (reporter)
2007-02-03 02:58

That it puts in Edit mode - it is half a problem. But if you will change this method with Post - then probl;ems will be more then before. Have thought about aftereffects?
(0013437)
obones (administrator)
2007-06-19 07:04

Anyone care to propose a non breaking solution?
(0013898)
obones (administrator)
2007-10-12 04:21

Hello ?
(0014063)
AHUser (developer)
2007-12-16 11:44

Fixed in SVN

- Issue History
Date Modified Username Field Change
2006-09-09 06:40 moore New Issue
2006-09-09 08:59 obones Note Added: 0010088
2006-09-09 08:59 obones Status new => feedback
2006-09-09 09:35 moore File Added: Richdit.zip
2006-09-09 09:36 moore Note Added: 0010089
2006-10-06 03:33 obones Note Added: 0010308
2006-11-03 08:07 ultimo Note Added: 0010409
2006-11-08 03:43 ultimo Issue Monitored: ultimo
2007-01-18 02:42 moore Note Added: 0010565
2007-02-03 02:58 ZENsan Note Added: 0010697
2007-06-19 07:04 obones Note Added: 0013437
2007-10-12 04:21 obones Note Added: 0013898
2007-12-16 11:44 AHUser Status feedback => resolved
2007-12-16 11:44 AHUser Fixed in Version => Daily / SVN
2007-12-16 11:44 AHUser Resolution open => fixed
2007-12-16 11:44 AHUser Assigned To => AHUser
2007-12-16 11:44 AHUser Note Added: 0014063


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker