[comp.sys.mac.programmer] THINK C bug??

fjo@cbnewsc.ATT.COM (frank.j.owen) (08/28/89)

   I just ran across something strange while using THINK C (4.0).
I have two copies of a project folder so that I can make changes to 
one, and retain a copy of my old stuff. Recently, I wanted to view 
an old version of one of the files, along with the new version. When
I tried to "Open" the old version, nothing happened. The only way I 
could look at either version was to explicitly close one, and then 
open the other. It looks like if you have two files with the same
name, only one can be open at a time. Switching between versions (for 
cut&paste for example) is a tedious sequence of open-cut-close-open-find 
your place again-paste etc, etc. etc.
  Is this a bug? If not, it's a very annoying "feature"!

-- 
Frank Owen (fjo@ttrdf)  312-982-2182
AT&T Bell Laboratories 
5555 Touhy Ave., Skokie, IL  60077
PATH:  ...!att!ttrdf!fjo

siegel@endor.harvard.edu (Rich Siegel) (08/29/89)

In article <2741@cbnewsc.ATT.COM> fjo@cbnewsc.ATT.COM (frank.j.owen) writes:
>
>   I just ran across something strange while using THINK C (4.0).
>I have two copies of a project folder so that I can make changes to 
>one, and retain a copy of my old stuff. Recently, I wanted to view 
>an old version of one of the files, along with the new version. When
>I tried to "Open" the old version, nothing happened. The only way I 
>could look at either version was to explicitly close one, and then 
>open the other. It looks like if you have two files with the same
>name, only one can be open at a time. Switching between versions (for 
>cut&paste for example) is a tedious sequence of open-cut-close-open-find 
>your place again-paste etc, etc. etc.
>  Is this a bug? If not, it's a very annoying "feature"!

	It's neither. I'm willing to bet cash that the two files in question
are in different subdirectories of the directory tree rooted at one of
your project documents, or that both project documents are in subdirectories
of the tree rooted at THINK C itself.

	Either way, this behavior is a side effect of THINK C's tree scheme;
because both files come from the same tree, THINK C thinks that the file
you're trying to open is already open.

	For this reason, it's wise not to put your works in progress in the
tree rooted at THINK C, a fact which is documented. I think.

R.




~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

"There is no personal problem which cannot be solved by sufficient
application of high explosives."

~~~~~~~~~~~~~~~

jpd00964@uxa.cso.uiuc.edu (09/01/89)

>       Either way, this behavior is a side effect of THINK C's tree scheme;
>because both files come from the same tree, THINK C thinks that the file
>you're trying to open is already open.
>      For this reason, it's wise not to put your works in progress in the
>tree rooted at THINK C, a fact which is documented. I think.
>Rich Siegel
> Staff Software Developer
> Symantec Corporation, Language Products Group
> Internet: siegel@endor.harvard.edu
> UUCP: ..harvard!endor!siegel

Is side effect the new term for bug?  I still like documented feature.

BTW- Rich, where is this "side effect" (bug to the rest of us) documented?
It's not in the tutorial about projects, and I cannot find it in the overview.
I've also skimmed through the entire chapter devoted to setting up projects,
and they say that you only need a folder.  I cannot find where your lovely
"side effect" (still bug and becomming undocumented feature for the rest of us).

Michael Rutman

gixb@prism.cs.orst.edu (Brian Gerard Gix) (09/02/89)

In article <227700039@uxa.cso.uiuc.edu> jpd00964@uxa.cso.uiuc.edu writes:
>
>>       Either way, this behavior is a side effect of THINK C's tree scheme;
>>because both files come from the same tree, THINK C thinks that the file
>>you're trying to open is already open.
>>      For this reason, it's wise not to put your works in progress in the
>>tree rooted at THINK C, a fact which is documented. I think.
>>Rich Siegel
>
>Is side effect the new term for bug?  I still like documented feature.
>
>BTW- Rich, where is this "side effect" (bug to the rest of us) documented?
>It's not in the tutorial about projects, and I cannot find it in the overview.
>I've also skimmed through the entire chapter devoted to setting up projects,
>and they say that you only need a folder.  I cannot find where your lovely
>"side effect" (still bug and becomming undocumented feature for the rest of us).
>
>Michael Rutman

Funny, I found the documentation on this bug/feature... it's at the end of
chapter 9 pg 108... :
"Just as you can't have two files with the same name in the same folder, you
shouldn't have duplicate file names in different folders within the project or
THINK C Tree. If you do, THINK C won't know which file to use."

gotcha Michael :-)

--Brian


////////////////////////////////|\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
////// Brian Gix		| gixb@prism.cs.orst.edu              \\\\\\
////// 717 SW 4th #6		|\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
////// Corvallis, OR 97333	| to C or not to C.. -apologies to WS \\\\\\
////////////////////////////////|\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

siegel@endor.harvard.edu (Rich Siegel) (09/02/89)

In article <227700039@uxa.cso.uiuc.edu> jpd00964@uxa.cso.uiuc.edu writes:
>
>BTW- Rich, where is this "side effect" (bug to the rest of us) documented?
>It's not in the tutorial about projects, and I cannot find it in the overview.
>I've also skimmed through the entire chapter devoted to setting up projects,
>and they say that you only need a folder.  I cannot find where your lovely
>"side effect" (still bug and becomming undocumented feature for the rest of us).

	[As he bravely suppresses the urge to post an obnoxious response
to an obnoxious question...]

	The entire tree scheme is described in excruciating detail in
chapter 9 of the THINK C User's Manual: "Files & Folders". It begins on
page 105 and ends on page 109.

	In particular, the duplicate-file issue is described on page
108, fifth paragraph from the top of the page: "Avoid Duplicate file
names in trees":

	"Just as you can't have two files with the same name in the same
folder, you shouldn't have duplicate file names in different folders
within the project or THINK C tree. If you do, THINK C won't know
which file to use. Duplicate file names won't lead to any explicit errors,
but you may end up using the wrong file."

	Note that if you want to know exactly where a file resides, you
can choose "Full Titles" from the Windows menu.

	[The chapters and page numbers I'm quoting are from the version 3.0
user's manual; the numbers will be different in the 4.0 manual, but the
contents and names are the same.]

		R.


~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

"There is no personal problem which cannot be solved by sufficient
application of high explosives."

~~~~~~~~~~~~~~~

ts@cup.portal.com (Tim W Smith) (09/03/89)

Try chapter 1 or so.  The section on installing Think C tells you not
to have the project in the tree rooted at the folder the compiler is
in, I believe ( my manual is at home right now ).

I suppose one could miss this if one installed without reading the
installation instructions, but in that case you deserve what you get.


						Tim Smith

jpd00964@uxa.cso.uiuc.edu (09/05/89)

>Funny, I found the documentation on this bug/feature... it's at the end of
>chapter 9 pg 108... :
>"Just as you can't have two files with the same name in the same folder, you
>shouldn't have duplicate file names in different folders within the project or
>THINK C Tree. If you do, THINK C won't know which file to use."
>
>gotcha Michael :-)
>
>--Brian


Guess this makes it a documented bug then.  Still seems silly and asinine to me.

Michael Rutman