Board index » cppbuilder » Editor hides files

Editor hides files


2005-11-03 11:01:07 PM
cppbuilder19
I'm new to the Borland C++ 6.0 IDE, so sorry if this is a simple problem, but I can't understand why I can't have both my .cpp AND .h file loaded at the same time. There are three tabs ("pages") on my editor now: UPMQ.cpp, UPMQProject.cpp, and CSPIN.h. I can't view UPMQ.h unless I do a find in files and click one one of the found items at the bottom, or I can hit CTRL-F6. But when I do get the .h file open, the .cpp file disappears!! CTRL-F6 toggles between the two, but that's a wierd work-around - I just want them both to be available pages like the three already there. I've tried adding the .h file to the project, to no avail.
HELP!
Thanks,
Rudy
 
 

Re:Editor hides files

Gene Norris < XXXX@XXXXX.COM >wrote:
Quote
Rudy wrote:
>I'm new to the Borland C++ 6.0 IDE, so sorry if this is a simple problem, but I can't understand why I can't have both my .cpp AND .h file loaded at the same time. There are three tabs ("pages") on my editor now: UPMQ.cpp, UPMQProject.cpp, and CSPIN.h. I can't view UPMQ.h unless I do a find in files and click one one of the found items at the bottom, or I can hit CTRL-F6. But when I do get the .h file open, the .cpp file disappears!! CTRL-F6 toggles between the two, but that's a wierd work-around
- I just want them both to be available pages like the three already there. I've tried adding the .h file to the project, to no avail.
>
>HELP!
>
>Thanks,
>Rudy
There are more tabs at the bottom of the source editor window. Click
there to switch between .cpp and .h (and diagram whatever that is)

Gene
There is only one tab at the bottom, "Build". When I do a Find in Files, another one appears, "Search for XXX". There are no tabs for files down there, and no apparent way to add them via right-click.
Rudy
 

Re:Editor hides files

"Vladimir Stefanovic" < XXXX@XXXXX.COM >wrote:
Quote
Hi,

Not sure if I understoud the question, but I think that
you must have this structure if you want the files to
be wired via IDE /please correct me if I'm wrong/

(let's say the files name is IPEdit.h/IPEdit.cpp)

--- IPEdit.h ---
#ifndef IPEditH
#define IPEditH

// class body

#endif

--- IPEdit.cpp ---

// as usual ...




--
Best regards,
Vladimir Stefanovic


Yes, I have those defines already in my header file. Thanks anyway.
Rudy
 

{smallsort}

Re:Editor hides files

Rudy wrote:
Quote
I'm new to the Borland C++ 6.0 IDE, so sorry if this is a simple problem, but I can't understand why I can't have both my .cpp AND .h file loaded at the same time. There are three tabs ("pages") on my editor now: UPMQ.cpp, UPMQProject.cpp, and CSPIN.h. I can't view UPMQ.h unless I do a find in files and click one one of the found items at the bottom, or I can hit CTRL-F6. But when I do get the .h file open, the .cpp file disappears!! CTRL-F6 toggles between the two, but that's a wierd work-around - I just want them both to be available pages like the three already there. I've tried adding the .h file to the project, to no avail.

HELP!

Thanks,
Rudy
There are more tabs at the bottom of the source editor window. Click
there to switch between .cpp and .h (and diagram whatever that is)
Gene
 

Re:Editor hides files

Hi,
Not sure if I understoud the question, but I think that
you must have this structure if you want the files to
be wired via IDE /please correct me if I'm wrong/
(let's say the files name is IPEdit.h/IPEdit.cpp)
--- IPEdit.h ---
#ifndef IPEditH
#define IPEditH
// class body
#endif
--- IPEdit.cpp ---
// as usual ...
--
Best regards,
Vladimir Stefanovic
 

Re:Editor hides files

"Vladimir Stefanovic" < XXXX@XXXXX.COM >wrote:
Quote
>Yes, I have those defines already in my header file.
>Thanks anyway.

Hm... I'v tested this now:

I created:

--- Document1.H ---

class TSomeClass
{
void Foo();
};

--- Document1.CPP ---
TSomeClass::Foo()
{
}

When Project / Add to project:
Document1.CPP

Header file wasn't listed in bottom TAB.

Then I added this to Document1.H:

--- Document1.H ---

#ifndef Document1H
#define Document1H
class TSomeClass
{
void Foo();
};
#endif


This time, header in the bottom TAB *was* visible!

Try maybe to *remove* from project the issue module
and then add it again to project.



--
Best regards,
Vladimir Stefanovic


I tried all of this, again with no luck. Perhaps I have a different version or preferences. I'm using 6.0, Personal Edition. I have the ifdefs as you say. I've removed and re-added all files, with no luck. Thanks anyway,
Rudy
 

Re:Editor hides files

Quote
Yes, I have those defines already in my header file.
Thanks anyway.
Hm... I'v tested this now:
I created:
--- Document1.H ---
class TSomeClass
{
void Foo();
};
--- Document1.CPP ---
TSomeClass::Foo()
{
}
When Project / Add to project:
Document1.CPP
Header file wasn't listed in bottom TAB.
Then I added this to Document1.H:
--- Document1.H ---
#ifndef Document1H
#define Document1H
class TSomeClass
{
void Foo();
};
#endif
This time, header in the bottom TAB *was* visible!
Try maybe to *remove* from project the issue module
and then add it again to project.
--
Best regards,
Vladimir Stefanovic
 

Re:Editor hides files

Rudy wrote:
Quote
Gene Norris < XXXX@XXXXX.COM >wrote:

>Rudy wrote:
>
>>I'm new to the Borland C++ 6.0 IDE, so sorry if this is a simple problem, but I can't understand why I can't have both my .cpp AND .h file loaded at the same time. There are three tabs ("pages") on my editor now: UPMQ.cpp, UPMQProject.cpp, and CSPIN.h. I can't view UPMQ.h unless I do a find in files and click one one of the found items at the bottom, or I can hit CTRL-F6. But when I do get the .h file open, the .cpp file disappears!! CTRL-F6 toggles between the two, but that's a wierd work-around
>
>- I just want them both to be available pages like the three already there. I've tried adding the .h file to the project, to no avail.
>
>>HELP!
>>
>>Thanks,
>>Rudy
>
>There are more tabs at the bottom of the source editor window. Click
>there to switch between .cpp and .h (and diagram whatever that is)
>
>Gene


There is only one tab at the bottom, "Build". When I do a Find in Files, another one appears, "Search for XXX". There are no tabs for files down there, and no apparent way to add them via right-click.

Rudy
Do you see where the line number and column information is ? what other
information is on that status bar (insert) and what is to the right of that?
 

Re:Editor hides files

I am sorry I fail to see your problem. At the editor's status-line there is
tabs to switch between the .cpp and .h. and as you rightfully say you press
ctrl-F6. What will you gain by having separate tabs at the top?
Unless you open a new editor window you will not be able to watch both
sources simultaneously anyway and again that is already possible as is. The
way I see it, you will not gain anything by having them as separate tabs at
the top.
/Palle
 

Re:Editor hides files

"Palle Meinert" < XXXX@XXXXX.COM >wrote:
Quote
I am sorry I fail to see your problem. At the editor's status-line there is
tabs to switch between the .cpp and .h. and as you rightfully say you press
ctrl-F6. What will you gain by having separate tabs at the top?

Unless you open a new editor window you will not be able to watch both
sources simultaneously anyway and again that is already possible as is. The
way I see it, you will not gain anything by having them as separate tabs at
the top.

/Palle


My issue is that while I am viewing the .cpp file, the .h tab is NOT visible. While I am viewing the .h file, the .cpp tab is NOT visible. It took me a long time to find the magic Ctrl-F6 to swap between them. It would just be nice if both tabs were at the top at the same time. It's odd that other file tabs are visible, like other .cpps and other .h's. I think that once the IDE identifies two files as a "Unit" it only lets you have access to either the .h or the .cpp. Or perhaps if you have two files with the same base name, MyFile.h and MyFile.cpp, it keeps one hidden while you view the other one.
In general, an editor should allow me to work the way I want to work, and not try to be smarter than me, hide things or make me do funny key combos to view a file.
Randy
 

Re:Editor hides files

Rudy wrote:
Quote
"Palle Meinert" < XXXX@XXXXX.COM >wrote:

>I am sorry I fail to see your problem. At the editor's status-line there is
>tabs to switch between the .cpp and .h. and as you rightfully say you press
>ctrl-F6. What will you gain by having separate tabs at the top?
>
>Unless you open a new editor window you will not be able to watch both
>sources simultaneously anyway and again that is already possible as is. The
>way I see it, you will not gain anything by having them as separate tabs at
>the top.
>
>/Palle
>
>

My issue is that while I am viewing the .cpp file, the .h tab is NOT visible. While I am viewing the .h file, the .cpp tab is NOT visible. It took me a long time to find the magic Ctrl-F6 to swap between them. It would just be nice if both tabs were at the top at the same time. It's odd that other file tabs are visible, like other .cpps and other .h's. I think that once the IDE identifies two files as a "Unit" it only lets you have access to either the .h or the .cpp. Or perhaps if you have two files with the same base name, MyFile.h and MyFile.cpp, it keeps one hidden while you view the other one.

In general, an editor should allow me to work the way I want to work, and not try to be smarter than me, hide things or make me do funny key combos to view a file.

Randy


Look at the bottom of the _source_ editor window
Do you see where the line number and column information is ? what other
information is on that status bar (insert) and what is to the right of
that?
 

Re:Editor hides files

I believe that if you change the header 'Sentries' at the top of the header
file that BCB will allow this top happen.
FWIW, I think BCB4 used to do what you want but Borland changed it as you
could end up with too many tabs on the page and you couldn't find what you
wanted.
I understand what you want, but unless you change the sentries (#define
xxxx_h) it will keep them together.
HTH Pete
"Rudy" < XXXX@XXXXX.COM >wrote in message
Quote

My issue is that while I am viewing the .cpp file, the .h tab is NOT
visible. While I am viewing the .h file, the .cpp tab is NOT visible. It
took me a long time to find the magic Ctrl-F6 to swap between them. It
would just be nice if both tabs were at the top at the same time. It's
odd that other file tabs are visible, like other .cpps and other .h's. I
think that once the IDE identifies two files as a "Unit" it only lets you
have access to either the .h or the .cpp. Or perhaps if you have two
files with the same base name, MyFile.h and MyFile.cpp, it keeps one
hidden while you view the other one.
 

Re:Editor hides files

Quote
My issue is that while I am viewing the .cpp file, the .h tab is NOT
visible. While I am viewing the .h file, the .cpp tab is NOT visible.
I don't have the personal edition, but in the professional edition they ARE
visible, but are just located at the BOTTOM of the editor (not the
message-view which you referred to in your response to Gene Norris, that is
located below the editor). I would imagine the personal edition to be same
in this regard. Please check again!
What makes the ide join the .cpp, .h and place the tabs at the bottom, have
been discussed earlier in this newsgroup and you might try a search in
groups on google. Normally this come up, when the editor is not joining .cpp
and .h files, but people want it to. Without looking into the matter, I
would think it is something about the header guards Vladmir talked about.
/Palle
 

Re:Editor hides files

Gene Norris < XXXX@XXXXX.COM >wrote:
Quote
Rudy wrote:
>"Palle Meinert" < XXXX@XXXXX.COM >wrote:
>
>>I am sorry I fail to see your problem. At the editor's status-line there is
>>tabs to switch between the .cpp and .h. and as you rightfully say you press
>>ctrl-F6. What will you gain by having separate tabs at the top?
>>
>>Unless you open a new editor window you will not be able to watch both
>>sources simultaneously anyway and again that is already possible as is. The
>>way I see it, you will not gain anything by having them as separate tabs at
>>the top.
>>
>>/Palle
>>
>>
>
>My issue is that while I am viewing the .cpp file, the .h tab is NOT visible. While I am viewing the .h file, the .cpp tab is NOT visible. It took me a long time to find the magic Ctrl-F6 to swap between them. It would just be nice if both tabs were at the top at the same time. It's odd that other file tabs are visible, like other .cpps and other .h's. I think that once the IDE identifies two files as a "Unit" it only lets you have access to either the .h or the .cpp. Or perhaps if you have
two files with the same base name, MyFile.h and MyFile.cpp, it keeps one hidden while you view the other one.
>
>In general, an editor should allow me to work the way I want to work, and not try to be smarter than me, hide things or make me do funny key combos to view a file.
>
>Rudy
>
>
Look at the bottom of the _source_ editor window
Do you see where the line number and column information is ? what other
information is on that status bar (insert) and what is to the right of
that?
To the right of the line/column is Modified (if it's been modified), then Insert, then the rest is blank to the right.
Regarding the header "sentry" lines, I've tried removing these completely and the behavior is the same. For some reason it still knows these two files are a unit, and wont show them at the same time.
Rudy
 

Re:Editor hides files

"Pete Fraser" < XXXX@XXXXX.COM >wrote:
Quote
I believe that if you change the header 'Sentries' at the top of the header
file that BCB will allow this top happen.
FWIW, I think BCB4 used to do what you want but Borland changed it as you
could end up with too many tabs on the page and you couldn't find what you
wanted.
I understand what you want, but unless you change the sentries (#define
xxxx_h) it will keep them together.
HTH Pete

Yes I tried removing these defines, and the behavior is the same.
Rudy
Quote
"Rudy" < XXXX@XXXXX.COM >wrote in message
news:436b8913$ XXXX@XXXXX.COM ...
>
>My issue is that while I am viewing the .cpp file, the .h tab is NOT
>visible. While I am viewing the .h file, the .cpp tab is NOT visible. It
>took me a long time to find the magic Ctrl-F6 to swap between them. It
>would just be nice if both tabs were at the top at the same time. It's
>odd that other file tabs are visible, like other .cpps and other .h's. I
>think that once the IDE identifies two files as a "Unit" it only lets you
>have access to either the .h or the .cpp. Or perhaps if you have two
>files with the same base name, MyFile.h and MyFile.cpp, it keeps one
>hidden while you view the other one.