diff --git a/wst/trunk/type_lib_edtr/edit_helper.pas b/wst/trunk/type_lib_edtr/edit_helper.pas index a8dda7b54..2941ba3f8 100644 --- a/wst/trunk/type_lib_edtr/edit_helper.pas +++ b/wst/trunk/type_lib_edtr/edit_helper.pas @@ -9,16 +9,15 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -} +} +{$INCLUDE wst_global.inc} unit edit_helper; -{$mode objfpc}{$H+} - interface uses Classes, SysUtils, - pastree, pascal_parser_intf; + pastree, pscanner, pascal_parser_intf; type @@ -464,7 +463,11 @@ begin end; end; end; + {$IFDEF WST_TCLASS_MEMBERS} + locList := TPasClassType(AType).Members; + {$ELSE WST_TCLASS_MEMBERS} locList := TPasClassType(AType).ClassVars; + {$ENDIF WST_TCLASS_MEMBERS} for i := 0 to locList.Count-1 do begin locElement := TPasElement(locList[i]); if locElement.InheritsFrom(TPasVariable) then begin diff --git a/wst/trunk/type_lib_edtr/uprocedit.pas b/wst/trunk/type_lib_edtr/uprocedit.pas index 6b57926e8..5a745c959 100644 --- a/wst/trunk/type_lib_edtr/uprocedit.pas +++ b/wst/trunk/type_lib_edtr/uprocedit.pas @@ -9,17 +9,16 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -} +} +{$INCLUDE wst_global.inc} unit uprocedit; -{$mode objfpc}{$H+} - interface uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls, StdCtrls, ActnList, Menus, - pastree, pascal_parser_intf, + pastree, PScanner, pascal_parser_intf, edit_helper, Buttons; type @@ -272,7 +271,11 @@ procedure TfProcEdit.SaveToObject(); try newObj := TPasFunction(FSymbolTable.CreateElement(TPasFunction,FObject.Name,prt,visPublic,'',0)); prt.Members.Add(newObj); + {$IFDEF WST_TPASSOURCEPOS} + newObjType := FSymbolTable.CreateFunctionType('','result',newObj,False,Default(TPasSourcePos)); + {$ELSE WST_TPASSOURCEPOS} newObjType := FSymbolTable.CreateFunctionType('','result',newObj,False,'',0); + {$ENDIF WST_TPASSOURCEPOS} newObj.ProcType := newObjType; CopyArgs(FObject.ProcType,newObjType); newObjType.ResultEl.ResultType := edtResultType.Items.Objects[edtResultType.ItemIndex] as TPasType; diff --git a/wst/trunk/wst_global.inc b/wst/trunk/wst_global.inc index f59310339..e03828c19 100644 --- a/wst/trunk/wst_global.inc +++ b/wst/trunk/wst_global.inc @@ -57,7 +57,8 @@ {$DEFINE WST_TKPOINTER} {$IFEND} {$IF Defined(FPC_FULLVERSION) and (FPC_FULLVERSION >= 30101) } - {$DEFINE WST_TPASSOURCEPOS} + {$DEFINE WST_TPASSOURCEPOS} + {$DEFINE WST_TCLASS_MEMBERS} {$IFEND} {$ENDIF}