Author Topic: see two files  (Read 10949 times)

Offline Joerg

  • Multiple posting newcomer
  • *
  • Posts: 100
see two files
« on: October 27, 2006, 04:24:50 pm »
Hi,

I wonder what is the best way to work on two files in C::B?
I often have to compare files and copy content from one to the other.
With other editors I can arrange windows so that I can see both files.
The split function in C::B is for one file only?
Regards,
It's never too late to fail!

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: see two files
« Reply #1 on: October 27, 2006, 05:08:48 pm »
Quote
The split function in C::B is for one file only?

Yes.
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2775
Re: see two files
« Reply #2 on: October 27, 2006, 05:32:25 pm »
You can create a tool from the Tool menu like the following:



This particular tool passes the current file to an external editor. CB will ask to reload the file when it finds the external tool has changed the source.

See Also:
Wiki article




« Last Edit: October 27, 2006, 05:44:49 pm by Pecan »

takeshimiya

  • Guest
Re: see two files
« Reply #3 on: October 28, 2006, 12:17:58 am »
And it'll be possible all inside C::B in future versions of wxFlatNotebook :D

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: see two files
« Reply #4 on: October 29, 2006, 08:11:19 am »
And it'll be possible all inside C::B in future versions of wxFlatNotebook :D

So its wxFlatNotebook that is limiting the split functionality to only one file?  I hope a the two file split feature gets into the 1.0 release of Code::Blocks, other wise I think many people will be left scratching their heads when they figure out they can't show two files (like I did).  Don't get me wrong, it does come in handy when I have a large file that I need information from, but you almost always want that header/source combination instead.

That said, it hasn't stopped me enjoying Code::Blocks, its still very usable(and a joy to use) in its current form.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: see two files
« Reply #5 on: October 29, 2006, 08:52:54 am »
And it'll be possible all inside C::B in future versions of wxFlatNotebook :D

Takeshi, please stop spreading wrong information.
C::B's design currently associates one editor page with a single editor. So currently what you 're asking is not possible. And certainly it's not wxFNB's limitation...

So its wxFlatNotebook that is limiting the split functionality to only one file?

No, it's not wxFNB's functionality. wxFNB just manages pages. What these pages do or contain, is not (and should not) be its job...
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Re: see two files
« Reply #6 on: October 29, 2006, 11:02:59 am »
And it'll be possible all inside C::B in future versions of wxFlatNotebook :D

Takeshi, please stop spreading wrong information.
Please think before saying things like that... :(

C::B's design currently associates one editor page with a single editor.
So? It doesn't matter if you can achieve the same effect as "splitting", by having two (or more) notebooks open at the same time.

So currently what you 're asking is not possible. And certainly it's not wxFNB's limitation...
It's not a current limitation of FNB from the current "split file" point of view. But the same can be achieved by the in-development "draggable tabs" feature of wxFNB, so again, it depends on the way you see it.

No, it's not wxFNB's functionality. wxFNB just manages pages. What these pages do or contain, is not (and should not) be its job...
And certainly it isn't, but it doesn't matters with draggable tabs.

Please try this before posting furthermore, and you'll understand why "it'll be possible with future versions of wxFNB"
http://www.eistware.com/fnb_aui/wxFlatNotebookTest.zip

EDIT: Usage:
- First you have to enable notebook dragging by Edit->Allow Drag and drop (2 flags, for the FOREIGN & the other flag)
- Pull one tab from the main notebook, and leave (left up) the mouse
- Position it anywhere
- pull another one
- you got the idea

Thanks.
« Last Edit: October 29, 2006, 11:11:42 am by Takeshi Miya »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: see two files
« Reply #7 on: October 29, 2006, 01:03:45 pm »
Quote
Please think before saying things like that...

If you explained better what you were saying in the first place...

Quote
It's not a current limitation of FNB from the current "split file" point of view. But the same can be achieved by the in-development "draggable tabs" feature of wxFNB, so again, it depends on the way you see it.

Draggable tabs exist in wxFNB for quite some time now. What I saw in the demo was just wxAUI being used in addition.
Like we have now disabled dragging tabs around (except within the same notebook), we 'll probably disable any such exotic functionality in the future (regarding the editor and message tabs, at least). And this is just because such functionality doesn't fit C::B's design point of view. And if you 're wondering why not, then simply think that wxFNB (and wxAUI for that matter) reparent the controls when dragging and dropping. This is correct behaviour from their point of view, but not in the C::B context and the way it manages its resources (at least for now)...

If C::B is ever going to allow splitting a view with different files, this will be an internal implementation.
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: see two files
« Reply #8 on: October 29, 2006, 01:21:37 pm »
Yiannis, why can't you just accept it... Takeshi knows better than you...
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

takeshimiya

  • Guest
Re: see two files
« Reply #9 on: October 29, 2006, 01:38:16 pm »
Quote
Please think before saying things like that...

If you explained better what you were saying in the first place...
Yes, my bad, I sometimes think speaking the way most shortly possible would be enough, but is not.

Draggable tabs exist in wxFNB for quite some time now. What I saw in the demo was just wxAUI being used in addition.
Yes that's what I meant, in conjunction with wxAUI.

Like we have now disabled dragging tabs around (except within the same notebook), we 'll probably disable any such exotic functionality in the future (regarding the editor and message tabs, at least). And this is just because such functionality doesn't fit C::B's design point of view. And if you 're wondering why not, then simply think that wxFNB (and wxAUI for that matter) reparent the controls when dragging and dropping. This is correct behaviour from their point of view, but not in the C::B context and the way it manages its resources (at least for now)...
Yes you're right, I've taken lot's of things for granted in one shot. With the current way C::B manages it's panels it wouldn't be possible.

I was thinking to do in a similar fashion as "the other IDE" or wxIFM does, which is more or less, admit to drag any tab at any panel, with some exceptions.
This can be crazy if you're not used to it, but just think an example: dragging the Build log to the Editor panel, or as a floating window, so you can read it more comfortably.

I have in mind something like this:


takeshimiya

  • Guest
Re: see two files
« Reply #10 on: October 29, 2006, 01:41:02 pm »
Yiannis, why can't you just accept it... Takeshi knows better than you...
I don't know you, but I at least prefer to discuss things in community. You seems not, but each to his own.

Thomas, accept that Yiannis haves extremely more knowledge and experience than I do, so the joke is over.
The thing is that you blame everything you can, me, other people, wxWidgets, CodeCompletion, ... so I find it rather difficult to discuss anything with you.

Anyways, let's try to not get personal and keep it back on topic.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: see two files
« Reply #11 on: October 29, 2006, 01:48:05 pm »
one of the good things about this project is that the sources are available. Takeshi, you can always experiment, and see if you can make it work with the things you have in mind. I remember that's how I did my first coding for CB also, and the moment I got stuck (sometimes rather quickly since there was a lot to learn ;-) ), you can always ask Yiannis or Thomas for some more insights. Once you have something working we can have a look at it, and then see if it can be incorporated or not, and if yes with or without some modifications since most of the time there's always something we forgot to think about in the first place.


takeshimiya

  • Guest
Re: see two files
« Reply #12 on: October 29, 2006, 01:53:22 pm »
one of the good things about this project is that the sources are available. Takeshi, you can always experiment, and see if you can make it work with the things you have in mind. I remember that's how I did my first coding for CB also, and the moment I got stuck (sometimes rather quickly since there was a lot to learn ;-) ), you can always ask Yiannis or Thomas for some more insights. Once you have something working we can have a look at it, and then see if it can be incorporated or not, and if yes with or without some modifications since most of the time there's always something we forgot to think about in the first place.
Lieven, that's why I'm still here :), I've already provided patches, you've applied them, so that's not an issue. The problem lies when "changing paradigms" only (design stage), because we need to discuss how to do things before implement them.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: see two files
« Reply #13 on: October 29, 2006, 02:11:27 pm »
Yiannis, why can't you just accept it... Takeshi knows better than you...
I don't know you, but I at least prefer to discuss things in community. You seems not, but each to his own.

Thomas, accept that Yiannis haves extremely more knowledge and experience than I do [...]
I think everybody except you understood the message...

You see, most of the devs have a good laugh or say to themselves "bah, ignore him..." whenever you come up with blatant nonsense and tell someone who really knows what he is doing that you know it better.
Personally, I just find it annoying, and I still feel urged to reply to it from time to time.

During the last 12-15 months, I have been trying to tell you politely, politely again, less politely, even less politely, impolitely, quite impolitely, outright offensively, and ironically.
However, you just seem to be unable to understand it, or you are not willing to. I don't know, do we not speak a compatible language? Tiwag explained it to you more or less politely but nevertheless straight, too, but you did not listen to him either.

Granted, everybody errs from time to time. I would be a fool to claim that I never make a mistake.
However, your statements are wrong 99.9% of the time. And worse, they are not just wrong, they are wrong because you make a bold statement about everything, and you don't care to even have thought about it or to get informed how the internals work.

Many times, several of us have been banging our heads on the tables in despair after your comments. More than once, your unfounded claims have cost us weeks of development time. At least in one istance, an unfounded claim of yours has not only cost weeks of developer time, but literally weeks of user time.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

takeshimiya

  • Guest
Re: see two files
« Reply #14 on: October 29, 2006, 02:31:18 pm »
I have only one thing to say, Thomas, I have exactly the same feelings towards you (and only you), what you say and what you do. We have something in common, at least.

I think we can stop this now.