issue-#144 inconsistencies with Files.Locator error codes

User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#144 inconsistencies with Files.Locator error code

Post by DGDanforth »

Robert wrote:"loc = NIL" is not necessarily wrong.

Have you investigated those occurances and regard them as individually suspicious?
"Files.dir.This" returns "dir.startup"
dir.statup = NewLocator(path)
"NewLocator(path)" always returns # NIL.
"loc.This(path)" returns either "loc" or "NewLoc(path)"

In HostFiles no locator is set to NIL.

So only if one calls PROCEDURE SetDir (d: Directory);
and implements a Directory that returns NIL for ".This"
will one get a NIL locator.

But then all bets are off for the res codes can not be guaranteed either.

-Doug
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#144 inconsistencies with Files.Locator error code

Post by Josef Templ »

More modules fixed.

StdApi (ASSERT removed)
fixes related to using StdDialog.GetSubLoc: DevCmds, DevCompiler

See diffs at http://redmine.blackboxframework.org/pr ... 1ed4eefc22.

I looked into many of the modules listed by Doug but most seem OK for me,
and after some time spent I gave up the detailed analysis.
Not every loc = NIL or loc # NIL is a bug. For example, Dialog.GetIntSpec is
specified to set loc := NIL in case of an error.
If you find a place that you think is really a bug, please point out
that specific place.

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#144 inconsistencies with Files.Locator error code

Post by Robert »

Josef Templ wrote:fixes related to using StdDialog.GetSubLoc: ...
Are you sure that it can't return NIL? It looks like it could in build 694.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#144 inconsistencies with Files.Locator error code

Post by Josef Templ »

Robert wrote:
Josef Templ wrote:fixes related to using StdDialog.GetSubLoc: ...
Are you sure that it can't return NIL? It looks like it could in build 694.
I cannot find a place in build 694 where it returned NIL.
Note that in the one and only case of setting it to NIL after Files.dir.Old failed,
it will be set to # NIL later.

Did I overlook something?

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#144 inconsistencies with Files.Locator error code

Post by Robert »

Josef Templ wrote:Note that in the one and only case of setting it to NIL after Files.dir.Old failed, it will be set to # NIL later.
You are right;I missed that.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#144 inconsistencies with Files.Locator error code

Post by Josef Templ »

If there are no further modules to fix, we should proceed with this issue
because it affects a lot of modules and thereby it has
a big potential to create merge conflicts with other issues.

If it turns out later that there are more modules to be fixed this can be
added any time.

- Josef
Ivan Denisov
Posts: 1700
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#144 inconsistencies with Files.Locator error code

Post by Ivan Denisov »

Doug, this issue is ready for voting. Josef is right that we should proceed faster with that issue to prevent merge conflicts.

I am already changed DevMarkers file in another branch. I will resolve this conflict before voting about issue-#139.
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#144 inconsistencies with Files.Locator error code

Post by DGDanforth »

Vote created.
Post Reply