Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-12

Problems with Namespaced Types

9 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Brunner

### TCodeToolManager.HandleException: "; expected, but . found" at Line=102 Col=61 in
"/Developer/Source/Projects/Aurawin/Sync/Settings/frmMain.pas"

procedure FoldersRetrieved(var Folders :
dbmUserStorage.Storage.Folders.TFolders);

This problem has to do with namespace recognition from the CodeTools unit. At this point I cannot add methods to any form components b/c of this error.

Can someone please fix?

The unit file specified is dbmUserStorage.pas and type Storage nested Folders type with a record structure.

Lazarus trunk (fresh as of today)
FPC trunk (fresh as of today) locates, compiles, builds just fine...

Thanks,

Reply by email

Andrew Brunner
to Andrew Brunner

I have a bug report and SAMPLE code to reproduce the Lazarus problem too. To duplicate just use your ctrl arrow keys on the line of the callback method and it generates a similar error.

http://mantis.freepascal.org/view.php?id=20909

Please fix :-)

Andrew Brunner wrote 20 lines
### TCodeToolManager.HandleException: "; expected, but . found" at Line=102 Col=61 in "/Developer/Source/Projects/Aurawin/Sync/Settings/frmMain.pas" procedure FoldersRetrieved(var Folders : dbmUserStorage.Storage.Folders.TFolders); This problem has to do with namespace recognition from the CodeTools unit. ?At this point I cannot add methods to any form components b/c of this error. Can someone please fix? The unit file specified is dbmUserStorage.pas and type Storage nested Folders type with a record structure. Lazarus trunk (fresh as of today) FPC trunk (fresh as of today) locates, compiles, builds just fine... Thanks,

Reply by email

Mattias Gaertner
to Andrew Brunner: ### TCodeToolManager.HandleException: "; expected, but . found" at Line=102 Col=61 in…
Show quoted text 12 lines
### TCodeToolManager.HandleException: "; expected, but . found" at Line=102 Col=61 in "/Developer/Source/Projects/Aurawin/Sync/Settings/frmMain.pas" procedure FoldersRetrieved(var Folders : dbmUserStorage.Storage.Folders.TFolders); This problem has to do with namespace recognition from the CodeTools unit. At this point I cannot add methods to any form components b/c of this error. Can someone please fix?

Done.

Mattias

Reply by email

Andrew Brunner
to Andrew Brunner

I just realized that codetools can't navigate functions with references to pointers

Adding "SomeMethod" as a procedure worked OK.
Adding it as a Function - produced an exception in Code Tools.

? TForm1 = class(TForm)? private? ? { private declarations }? public
 { public declarations }? ? function ?SomeMethod(Var
ItemP:uNameSpace.Storage.Folders.PItem):uNameSpace.Storage.Folders.PItem;
 ? procedure MyEvent(var Item:uNameSpace.Storage.Folders.TItem);? end;
var? Form1: TForm1;
implementation
{$R *.lfm}
procedure TForm1.MyEvent(var Item:uNameSpace.Storage.Folders.TItem);begin
end;
function TForm1.SomeMethod(Var
ItemP:uNameSpace.Storage.Folders.PItem):uNameSpace.Storage.Folders.PItem;begin
end;
Andrew Brunner wrote 7 lines
On Thu, Dec 15, 2011 at 6:11 PM, Mattias Gaertner wrote: > Done. > > Mattias Works well! Very good! ?Thanks so much.

Reply by email

Mattias Gaertner
to Andrew Brunner
Show quoted text 18 lines
I just realized that codetools can't navigate functions with references to pointers Adding "SomeMethod" as a procedure worked OK. Adding it as a Function - produced an exception in Code Tools. ? TForm1 = class(TForm)? private? ? { private declarations }? public { public declarations }? ? function ?SomeMethod(Var ItemP:uNameSpace.Storage.Folders.PItem):uNameSpace.Storage.Folders.PItem; ? procedure MyEvent(var Item:uNameSpace.Storage.Folders.TItem);? end; var? Form1: TForm1; implementation {$R *.lfm} procedure TForm1.MyEvent(var Item:uNameSpace.Storage.Folders.TItem);begin end; function TForm1.SomeMethod(Var ItemP:uNameSpace.Storage.Folders.PItem):uNameSpace.Storage.Folders.PItem;begin end;

Do you have a more complete example?

Mattias

Reply by email

Andrew Brunner
to Mattias Gaertner

Thanks Mattias, see attachment for "uNameSpace.Storage.Folders.PItem" method to expose CodeTools problem.

Thanks -Andy

Mattias Gaertner wrote 31 lines
On Sat, 17 Dec 2011 19:48:09 -0600 Andrew Brunner wrote: > I just realized that codetools can't navigate functions with > references to pointers > > Adding "SomeMethod" as a procedure worked OK. > Adding it as a Function - produced an exception in Code Tools. > > ? TForm1 = class(TForm)? private? ? { private declarations }? public > ?{ public declarations }? ? function ?SomeMethod(Var > ItemP:uNameSpace.Storage.Folders.PItem):uNameSpace.Storage.Folders.PItem; > ?? procedure MyEvent(var Item:uNameSpace.Storage.Folders.TItem);? end; > var? Form1: TForm1; > implementation > {$R *.lfm} > procedure TForm1.MyEvent(var Item:uNameSpace.Storage.Folders.TItem);begin > end; > function TForm1.SomeMethod(Var > ItemP:uNameSpace.Storage.Folders.PItem):uNameSpace.Storage.Folders.PItem;begin > end; Do you have a more complete example? Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: NameSpace.zip
Type: application/zip
Size: 3277 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111219/dbacce19/attachment-0001.zip>

Reply by email