Page 1 of 1

Format of Sym files

Posted: Mon Jun 17, 2019 8:49 pm
by Robert
I wish to process the contents of some Sym files.

I used to use the following code to get access to the files:

Code: Select all

PROCEDURE  CheckFile (loc: Files.Locator; fInfo: Files.FileInfo);
  VAR
    st:  Stores.Store;
    conv:  Converters.Converter;
    text:  TextModels.Model;
  BEGIN
    conv  :=  Converters.list;
    WHILE  conv.imp  #  'DevBrowser.ImportSymFile'  DO  conv  :=  conv.next  END;
    Converters.Import (loc, fInfo.name, conv, st);
    text  :=  st(Documents.Document).ThisView ().ThisModel ()(TextModels.Model);
but this no longer works. I need to replace the last line by

Code: Select all

    text  :=  st(Views.View).ThisModel ()(TextModels.Model)
Has something changed, or has my memory failed entirely?

Re: Format of Sym files

Posted: Thu Aug 08, 2019 4:42 am
by luowy
Robert wrote:Has something changed, or has my memory failed entirely?
the Converter which used is not "DevBrowser.ImportSymFile",
open the type guard Trap window to Check what the storeType is(or what the Converter is)
and check your Config file to find out what happened.

P.S. This code in the Config file is incorrect

Code: Select all

    Converters.Register("DevBrowser.ImportSymFile", "", "TextViews.View", "osf", {});
    Converters.Register("DevBrowser.ImportCodeFile", "", "TextViews.View", "ocf", {});
Check the source code of "DevBrowser.ImportSymFile",
the storeType is "Documents.Document" instead of "TextViews.View";
Refer to the Init.Init Register code for "odc",the storeType should be "" instead of "TextViews.View",