View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003569 | JEDI VCL | 00 JVCL Components | public | 2006-03-09 09:59 | 2006-03-10 02:57 |
Reporter | ivan_ra | Assigned To | AHUser | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.10 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003569: JvInterpreter: class fields support | ||||
Description | in 3.20 was introduced class fields support for JvInterpreter. Now if recognizes forms with fields. But assigning of values not works every time. This is patch to fix problem | ||||
Tags | No tags attached. | ||||
2006-03-09 10:00
|
JvInterpreterFm.pas.patch (2,359 bytes)
Index: run/JvInterpreterFm.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvInterpreterFm.pas,v retrieving revision 1.31 diff -u -r1.31 JvInterpreterFm.pas --- run/JvInterpreterFm.pas 17 Jan 2006 20:40:36 -0000 1.31 +++ run/JvInterpreterFm.pas 9 Mar 2006 17:03:30 -0000 @@ -473,6 +473,19 @@ function TJvInterpreterFm.SetValue(const Identifier: string; const Value: Variant; var Args: TJvInterpreterArgs): Boolean; + // Class Fields support begin +var + JvInterpreterForm: TJvInterpreterForm; + + function SetFormValue(Form: TJvInterpreterForm): Boolean; + begin + result:=false; + with Form.FFieldList do + if FindVar('', Identifier) <> nil then + Result := SetValue(Identifier, Value, Args); + end; + // Class Fields support end + begin if (Args.Obj = nil) and (CurInstance is TJvInterpreterForm) then begin @@ -482,23 +495,33 @@ Exit; end; // Class Fields support begin - with Form.FFieldList do - if FindVar('', Identifier) <> nil then - begin - Result := SetValue(Identifier, Value, Args); - Exit; - end; + { may be TForm field } + Result := SetFormValue(TJvInterpreterForm(CurInstance)); + if not result then begin // Class Fields support end - { may be TForm method or published property } - Args.Obj := CurInstance; - Args.ObjTyp := varObject; - try - Result := inherited SetValue(Identifier, Value, Args); - finally - Args.Obj := nil; - Args.ObjTyp := 0; + { may be TForm method or published property } + Args.Obj := CurInstance; + Args.ObjTyp := varObject; + try + Result := inherited SetValue(Identifier, Value, Args); + finally + Args.Obj := nil; + Args.ObjTyp := 0; + end; end; end + // Class Fields support begin + else + if (Args.Obj <> nil) and (Args.ObjTyp = varObject) and + (Args.Obj is TJvInterpreterForm) then + try + JvInterpreterForm:=TJvInterpreterForm(Args.Obj); + Args.Obj:=nil; + Result := SetFormValue(JvInterpreterForm); + finally + Args.Obj:=JvInterpreterForm; + end + // Class Fields support end else Result := False; Result := Result or inherited SetValue(Identifier, Value, Args); |
|
Fixed in CVS. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-03-09 09:59 | ivan_ra | New Issue | |
2006-03-09 10:00 | ivan_ra | File Added: JvInterpreterFm.pas.patch | |
2006-03-10 02:57 | AHUser | Status | new => resolved |
2006-03-10 02:57 | AHUser | Resolution | open => fixed |
2006-03-10 02:57 | AHUser | Assigned To | => AHUser |
2006-03-10 02:57 | AHUser | Note Added: 0008645 |