Format of Sym files

All except GUI problems
Post Reply
User avatar
Robert
Posts: 177
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Format of Sym files

Post 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?
luowy
Posts: 87
Joined: Thu Dec 17, 2015 1:32 pm

Re: Format of Sym files

Post 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",
Post Reply