Author Topic: converting cbeditor to wxnotebook need to have more atention  (Read 17345 times)

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
If you ever look at try to covert cbeditor to notebook it is one big pain.
Alot of problem acure in order to do this just an example.  In order to just add a notebook you have to conver all of the places in code that sayes cbeditor->destrory() to something like wxnotebook->removepage(cbeditor->getindexpage()).   There places in code where they have also deleted cbeditor when it was not nessarry witch cause the program to crash when changeing cbeditor to wxnotebookpage.  Why they called delete when not nessary, I don't know, I Ask see the forms.  I think they just goof and did not see the fact they did not have to use delete in the wxwidget doc please corect me if i wrong).

My point is i realy think that we need to work on fixing problem we got before add new feture.  The new feature like makeing messagemaneger disapper and reaper is nice but is useing mdi wxLayoutAlgorithm interface wich we(in my oppion) need to git away from.  

This project is just to big for one person and i think we need cvs to do it

I think it would be nice if mandrav would create a seperate branch away from the main control so we could do this.

what dose everyone else think?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
converting cbeditor to wxnotebook need to have more atention
« Reply #1 on: May 25, 2005, 08:00:53 pm »
Quote
My point is i realy think that we need to work on fixing problem we got before add new feture. The new feature like makeing messagemaneger disapper and reaper is nice but is useing mdi wxLayoutAlgorithm interface wich we(in my oppion) need to git away from.

Even with wxNotebook instead of MDI, the wxSashLayoutWindow will still remain. Can't you just get over with it?????  :roll:

Quote
This project is just to big for one person and i think we need cvs to do it

Who's the one person??? Last time I checked the project's page at sourceforge, it lists four (4) developers in the project. And we are using CVS  :roll:

Quote
I think it would be nice if mandrav would create a seperate branch away from the main control so we could do this.

Create a separate branch for who to work on it? You? You 're not listed as project developer.
If this is your way of asking for CVS write access, let me point you to my last answer on this topic (incidentally, to you again).

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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
converting cbeditor to wxnotebook need to have more atention
« Reply #2 on: May 25, 2005, 11:09:30 pm »
Anyway, frog-o. Why not do this?

1) List all of the incompatibilities (and when I say list, i mean list with '*''s and everything :) ) from MDI to notebook.

2) Find out which incompatibilities can be emulated with single functions.

Like:

void cbEditor::Activate() { Show(); }

3) Keep a log with the problems that appear as you do the modifications. If you find a problem too big for you, you're welcome to ask for help in a dedicated thread or something.

Also, remember that there's grep which allows you to search-in-files (and subdirectories) for extensive replacements, etc.

4) You're right the conversion may be too difficult to bear by a single person - specially if he wants to do everything at once (sorry, but it's the truth :( Some projects die because of lack of planning.

5) Look, I think there's no need to ask for CVS access. Instead of doing an update, do an EXPORT so you get a fresh cvs tree of codeblocks. Then, you can create your own repository in your machine. It's equivalent to opening a branch in CVS. As long as you keep a log of your changes and what you did to make it work, updating the tree should be a no-brainer.

6) Don't give up! If you failed, maybe you took the wrong path. I'm sure that if you do it in an organized way you'll do it. Good luck!  8)

DreadNot

  • Guest
converting cbeditor to wxnotebook need to have more atention
« Reply #3 on: May 25, 2005, 11:54:10 pm »
I'm with Rick on this, especially (4)--lack of planning. And I'd like to help with this effort as well, so (1), (2), and (3) are very important. Let's see your code and complete reasoning so we can be clear about the problems.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
converting cbeditor to wxnotebook need to have more atention
« Reply #4 on: May 26, 2005, 12:26:47 am »
I realized that we may need some *extra* functions in EditorManager. For example, to mimick (or wrap) some functions of wxMDIParentFrame.

This way, we only have to make the conversion ONCE. This is to replace the mdi specific functions to EditorManager functions. And then each of this will have a simple #ifdef around it. Opinions?

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
converting cbeditor to wxnotebook need to have more atention
« Reply #5 on: May 26, 2005, 03:13:15 pm »
thank for getting back with me mandrav .  I was begging to think you are ignore me.  Here are the ansewr to you question.  Thakyou everyone else for also replying.

Quote
Even with wxNotebook instead of MDI, the wxSashLayoutWindow will still remain. Can't you just get over with it?????
 

I had no problem leaving wxSashLayoutWindow in it.  I just did not know you wanted to keep it I think it crap and was i side efect of mdi i did not know any better.   I will just say the following on why i want to get rid of it and leave it go at that.   wxSashLayoutWindow seem messy for the folowing reson.  I mite be wrong if so please correct me if i am.

1.  It need an onsizeevent
2.  you need to manualy place all windows.
3.  you need to call doupdatelayout fuction or equivilent. evertime something need painted or relayed out.
4. alot more code is add becuse of this.
5 it harder to implement xrc mabe imposible.

Just please let me know if you try to get rid of it.


mandrav most of the time you misunderstand me and with this question it is no diferrent.

I said


Quote
This project is just to big for one person and i think we need cvs to do it  

 
you said

Quote
Who's the one person??? Last time I checked the project's page at sourceforge, it lists four (4) developers in the project. And we are using CVS  



when i say this project I did not mean for codeblock i ment the conversion of cbeditor wxMDIchildwindow to wxnotebook (as my title said).   and the one person is anyone who try
Quote
converting cbeditor to wxnotebook
.  I think it need it own workspace in the cvs tree and is the conversion need, is to big to do all at once . I don't think you want to leave the main source in a broken state so we can't just implement a porstion of are changes to it do you  :?: .  I try #ifdef all of my changes but there where way to many and made the code look messy.  We need a unstable branch for thing like the conversion of  cbeditor to wxnotebook and other covertion we try implementing.  My think is if we get this done we could all then try to convert mainframe to xrc(another conversion) useing this same branch(IF YOU WANT).  If a port of code is to be for one peson you have to split it into part witch i'm try to have you do.  
Quote
Wich you done very well buy implenting plugin
but I think we most go beyound that.  


MANDRAV  here is anter example of mis  understanding.

Quote
Create a separate branch for who to work on it? You? You 're not listed as project developer.


Nope I want a brach where every one can work on if you want to moitor my change to cvs you are weclome to do so in fact i like haveing a pair of eyes on my work It help make sure the code is stable.

PLEASE MANDRAV TRY TO UNDERSTAND ME A LITTLE MORE AND TRY TO LOOK AT THING FROM A DIFFERT POINT OF VIEW.  If something dose not sound right it is probbly not.

I glad you are upto 4 devolper when i start trying to help you had 2.  

 

I don't nessacerly want write access to cvs but what i do one is to put a puase on devolpement of the current one and create i new branch of codeblock for the conversion prosses.  I don't want to add new feature wich in effect introduce more code into the program wich could cause problem with the coversion problem of cbeditor.  



Please note out of respect i did not use  :roll:  :roll:  :roll:  icon on my post like i could to demistrate that some of you comment are off the wall to me to.

Thank again everyone.

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
converting cbeditor to wxnotebook need to have more atention
« Reply #6 on: May 26, 2005, 04:52:49 pm »
The main thing I trying to get at here is that i think we realy need to fix the problem with codeblocks that we have before moveing on and adding more features.

The probblem being......

*we need cbeditor to be a wxnotebook  

*linux crashes with wxwidgets 2.6 or have some type of problem i have not run CB with linux

*not really a probblem but sould be look into.  Be able to use xrc(or other way for theme support) to  custime the ide.  This would eliminate the need for custmizeing opttion in the menu wich add cluter.



The more code we add the harder it will be to fix!!!!!!!!!!!!!!!!!!!!!!!!!

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
converting cbeditor to wxnotebook need to have more atention
« Reply #7 on: May 26, 2005, 05:18:42 pm »
OK I think this might be bold, but here's a question to Mandrav.
Pick one of two:

a) Declare a 'bug and feature freeze' and don't work on ANYTHING until the conversion to notebook is done. Note that sooner or later we'll end up having to do this, that's unavoidable. And I agree with Frog-o that the sooner, the better.
b) Declare a 'don't-do-mdi-to-notebook freeze' and wait until v1.0 is released to start working on it.
c) Any other idea?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
converting cbeditor to wxnotebook need to have more atention
« Reply #8 on: May 26, 2005, 06:11:39 pm »
frog-o,

I 'm really having a hard time to understand your posts. Maybe it's not your fault but my poor English. Nevertheless, I can't understand much of what you 're saying OR you can't understand much of what I 'm saying.

This will be my last post on the subject. I 'm tired of explaining it in so many different threads AND in the mail I sent you.
Here goes then:

Quote from: frog-o
I had no problem leaving wxSashLayoutWindow in it. I just did not know you wanted to keep it I think it crap and was i side efect of mdi i did not know any better. I will just say the following on why i want to get rid of it and leave it go at that. wxSashLayoutWindow seem messy for the folowing reson. I mite be wrong if so please correct me if i am.

1. It need an onsizeevent
2. you need to manualy place all windows.
3. you need to call doupdatelayout fuction or equivilent. evertime something need painted or relayed out.
4. alot more code is add becuse of this.
5 it harder to implement xrc mabe imposible.

The creation happens in CreateIDE(), just a small function.
DoUpdateLayout() is called when the frame is resized.
Now, why you keep thinking this is a lot of work is beyond me...

XRC is good for dialogs that don't change, like all dialogs in C::B. But the main frame needs to be customizable at run-time, like the recently added feature of repositioning the manager tree (how would you do that with XRC without too much effort???).
XRC is not good for dialogs that change at run-time. Is there something obvious I 'm missing?

Example: Launch C::B and press F2 and then Shift-F2. Wow! An empty frame! What do I need the XRC for???
That's what I mean when I say "change at run-time".

And when a docking library is added, XRC will have no place in the main frame anyway...

That's all I 'm going to say about using XRC in the main frame. Please don't ask me again on this subject. Unless you have a good explanation of what (and how) we 'll gain.

Quote from: frog-o
Quote
This project is just to big for one person and i think we need cvs to do it

when i say this project I did not mean for codeblock i ment the conversion of cbeditor wxMDIchildwindow to wxnotebook (as my title said). and the one person is anyone who try

When *I* read "project", I think of C::B. But I guess that's just me.

Quote from: frog-o
Quote
converting cbeditor to wxnotebook

. I think it need it own workspace in the cvs tree and is the conversion need, is to big to do all at once

For someone who doesn't know the codebase as well as I do, it may be hard to do the conversion.
I converted it earlier today, in less than two hours (including debugging it). I will commit my changes tomorrow.

Quote from: frog-o
PLEASE MANDRAV TRY TO UNDERSTAND ME A LITTLE MORE AND TRY TO LOOK AT THING FROM A DIFFERT POINT OF VIEW. If something dose not sound right it is probbly not.

And why exactly are you shouting at me??? This is not polite at all  :evil:

Anyway, I see that Rick is understanding you better than I do, so please ask him any questions you might have. As I said, I seem to misunderstand you too often and then you shout at me. Thank you very much...

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

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
converting cbeditor to wxnotebook need to have more atention
« Reply #9 on: May 26, 2005, 06:14:21 pm »
Quote from: rickg22
Pick one of two:

a) ...
b) ...
c) ...


LOL! Rick please stop it! :lol:

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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
converting cbeditor to wxnotebook need to have more atention
« Reply #10 on: May 26, 2005, 07:14:36 pm »
Yiannis: The c) was only if you had any other idea, since not always my suggestions are good.

Anyway, I had halted development in the hopes that Frog-o might have one of these days come up with a tabbed implementation. So, I suppose development is still on and conversion to tabs is postponed from the CVS tree until further notice (not that we won't still work on it).

Frog-o: OK let's do this. Instead of trying to change the layout etc etc, do this: Create a wxMDIChildFrame which will contain the tabs. That should be enough to make the necessary changes in the layout. When you finish doing the change to tabs, replace that window for a panel. Ta-da.

And please, go on with the steps i mentioned earlier. I still trust you, and know you can do it (unless you give up and pass the task to someone else). We'll be expecting your feedback in this blogoid thread.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
converting cbeditor to wxnotebook need to have more atention
« Reply #11 on: May 26, 2005, 09:18:56 pm »
Quote
Anyway, I had halted development in the hopes that Frog-o might have one of these days come up with a tabbed implementation. So, I suppose development is still on and conversion to tabs is postponed from the CVS tree until further notice (not that we won't still work on it).

I mentioned it in my reply to frog-o:
I have converted C::B from MDI to wxNotebook, I just haven't commited it yet. I will do it tomorrow...

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

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
converting cbeditor to wxnotebook need to have more atention
« Reply #12 on: May 27, 2005, 01:59:42 pm »
mandrav i guess I owe you alot of appologize today.  I never ment for you to take my quote
that was  

Quote
PLEASE MANDRAV TRY TO UNDERSTAND ME A LITTLE MORE AND TRY TO LOOK AT THING FROM A DIFFERT POINT OF VIEW. If something dose not sound right it is probbly not.


as shouting at you.  I just wanted to make it sould like a desprite plea for help.  It like I say for some reson we can't comunticate.   This is not your bad english is more of my bad knowlange of the langues on the forms amd again I will say I soory I offened you.

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
converting cbeditor to wxnotebook need to have more atention
« Reply #13 on: May 27, 2005, 02:12:34 pm »
I emage even thou I have not tryed it it would be real ezzay to load changes of main frame at run time just reload the xrc into main fraim after changes.  Even tho I don't understand why you need to make changes to the ide at runtime.  You can make all the changes at devolpment that you want to with xrc.  I was think if they finished with wxsmith we could make all changes that we want ower ide to have in it and then reload it into the mainframe.  Just to make sure you understand me this would me that we would have to add control for wxdockkit libbary to wxsmith.    There are many comands for wxwindow that can also help like wxWindow::Reparent.  There are way to make the window disappare and repaire also you can read about it somewhere in the wxwindow doc.  I play around with this a bit.  Xrc is more flexible then what you may think.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
converting cbeditor to wxnotebook need to have more atention
« Reply #14 on: May 27, 2005, 02:23:18 pm »
Quote
I emage even thou I have not tryed it it would be real ezzay to load changes of main frame at run time just reload the xrc into main fraim after changes.

I guess you have tried it and know that it works?

Keep in mind this one really important thing (that I think you keep missing): C::B is not an average monolithic app. The app knows almost nothing about the loaded plugins and the plugins know almost nothing about the host app.
The code needed to notify plugins that the XRC of the main app changed and they (i.e. those who add things in the main frame) should reparent themselves etc, is much more difficult to write, not to mention bugs-inviting.
It's really simpler to have 2 functions in the main frame, around 30 lines of code both, to create and update the IDE layout. It's there, it works and I don't see any reason to change it.

Quote
Even tho I don't understand why you need to make changes to the ide at runtime.

I 'm sorry but I 'm tired of explaining the same thing over and over. Let's just accept the fact that you cannot understand it.

Quote
Xrc is more flexible then what you may think.

Sure it is. For dialogs that do not change at run-time.

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