Author Topic: SDK API changes  (Read 17433 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
SDK API changes
« on: December 14, 2005, 10:31:55 am »
OK, so I was thinking of what are the major changes that need to be done before RC3 (which will bring a complete feature-freeze until 1.0 is out).
I 'm talking about major changes regarding the SDK. Specifically, the managers and plugins interfaces.
Not much I could think of. Actually, none.

So I started thinking of what will follow after 1.0 is out. And I discovered quite a few major changes that will have to be done then.
For example, I evaluated wxIFM.
wxIFM is a docking library which is sooo much better than wxDockit (the one we 're using now), except it doesn't handle toolbars (at least not yet).
Evaluating wxIFM made me change some things and found out that it was actually better this way.

One thing was the MessageManager. Currently it is a wxNotebook managing its pages. With wxIFM, each page is a different window managed by wxIFM. So, no more wxNotebook for MessageManager. That's a goot thing actually. We could change this now.

Another thing was the toolbars. As said above, wxIFM doesn't handle toolbars yet. So we would either have to use one big toolbar (like in earlier versions) or make our custom toolbars using wxPanels etc. Anyway this will be left for when that time comes. It's in the application, not in the SDK, so it can change any time. *But* what will need to change is the cbPlugin::BuildToolbar(). Instead of manipulating a wxToolbar directly, it could return an array of a special struct describing each tool to be added.
Then, it makes sense to change cbPlugin::BuildMenu() to work in a similar way...

About the cbPlugin::BuildToolbar() and cbPlugin::BuildMenu() changes, they will have to be performed anyway when we implement the ActionManager we 've been discussing of adding.

So, we have two options:
  • Leave the SDK as it is now and change it when needed, after 1.0 is out.

This will of course completely break the SDK but will allow us to reach RC3 soon.
  • Make these important changes in the SDK now.

This will allow the SDK to remain consistent before and after 1.0 is out. Of course it will change but changes will be minor and easy to update plugins. If the changes are major (like in option 1) then plugin-devs would have to maintain two versions of their plugins (one for 1.0 and one for post-1.0 releases).
But this option will set us back a while...
[/list]

Which option do you think is better?
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SDK API changes
« Reply #1 on: December 14, 2005, 10:51:52 am »
So, we have two options:
  • Leave the SDK as it is now and change it when needed, after 1.0 is out.

This will of course completely break the SDK but will allow us to reach RC3 soon.
  • Make these important changes in the SDK now.

This will allow the SDK to remain consistent before and after 1.0 is out. Of course it will change but changes will be minor and easy to update plugins. If the changes are major (like in option 1) then plugin-devs would have to maintain two versions of their plugins (one for 1.0 and one for post-1.0 releases).
But this option will set us back a while...
[/list]

Which option do you think is better?

IMHO, I think that the second option would be better. Another advantage I see, is that it would be easier for new developers (e.g., of plugins) to get in touch with C::B. If not they would have to learn how plugins are deveoloped now and how they will be later (with the new changes). It is better to keep consistency.

Moreover, I can wait a bit for RC3 :). In case of need, I can just compile a SVN version or use an already-compiled-Therion-version.

Best wishes,
Michael

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: SDK API changes
« Reply #2 on: December 14, 2005, 10:53:25 am »
i think it is better to make these changes now because not soo much plugins are existing by 3rd parties till now.

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: SDK API changes
« Reply #3 on: December 14, 2005, 10:57:12 am »
IMHO, I think that the second option would be better. Another advantage I see, is that it would be easier for new developers (e.g., of plugins) to get in touch with C::B. If not they would have to learn how plugins are deveoloped now and how they will be later (with the new changes). It is better to keep consistency.

Moreover, I can wait a bit for RC3 :). In case of need, I can just compile a SVN version or use an already-compiled-Therion-version.

Took the words right out of my mouth keyboard :).

Make the changes now, so any new plugins made to work with version 1.0 won't need a lot of changes to work with post-1.0 builds. I'm likely to keep using the SVN version, so if any interesting new plugins pop up I'd like them to be compatible with that ;).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: SDK API changes
« Reply #4 on: December 14, 2005, 11:36:40 am »
I 'm glad you all think option 2 is better. I think so too, I just didn't state it because I didn't want to bias the discussion.
Btw, if you haven't seen the wxIFM demo, do so. It's amazing :)
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SDK API changes
« Reply #5 on: December 14, 2005, 11:41:40 am »
Btw, if you haven't seen the wxIFM demo, do so. It's amazing :)

Thanks for the wxIFM demo link. Yes, it is really amazing :D.

Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SDK API changes
« Reply #6 on: December 14, 2005, 12:01:56 pm »
I also prefer the second option. We are the early adaptors, for us it's no problem. We are svn users ;-)
It was the same with firefox, suddenly all plug-ins break, and the authors have orphaned their plug-ins. This gives a bad user experience. Better to break now, and have everthing nicely up and running at version 1.0, and preferably not break afterwards.

By the way, RC3, I am at RC1508  :P

And now when can still add some features, yipeeeeee.

Lieven

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SDK API changes
« Reply #7 on: December 14, 2005, 12:06:50 pm »
wxIFM : yes yes yes !!!!

Haha, M$ DevStud 2005 also has these kind of functionalities, but now CB will have it to.

I need a special smiley/emoticon here (I think in old icq it would say : killerbot is jumping anxiously up and down )


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: SDK API changes
« Reply #8 on: December 14, 2005, 12:22:27 pm »
Regarding wxIFM, here's part of the mail I sent to its author. This contains the showstoppers for us now.

Quote
1) Add child as a tab of a specific window.
When adding a child, I can specify if it will be created as a tab (data.m_tabify=true). But can I specify which child this tab will be created in? According to wxIFM's docs, it is created as a tab of the last added child. This is not good at all. As you may know, C::B is quite a dynamic environment using plugins. So the order in which windows are created is not predetermined. For example, a plugin might add a message log panel at any time. But I 'd like it to be added as a tab of the "messages" group of tabs, initially. I don't see how this is possible...

2) Loading/saving the layout.
Equally important for obvious reasons and I 'm really surprised you haven't already implemented it. I mean it's nice to give the end-users the kind of freedom they get using wxIFM in customizing their environment, but it's not worth a cent if next time they launch the app they 're back at square zero ;)
I could start writing such a serialization mechanism, but I 'd like a few pointers on where to start. I see I can get the visibility state for each managed window (btw, it 'd be nice if I could access that list of windows) but I don't see how I could get to the child size, orientation, etc.
Any pointers on that?
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: SDK API changes
« Reply #9 on: December 14, 2005, 12:28:20 pm »
Massive changes are best done early. The earlier, the less dependencies that break.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: SDK API changes
« Reply #10 on: December 14, 2005, 12:46:32 pm »
By the way, is there any particular reason Mandrav and Thomas have such confusingly similar (but not, as I just now noticed, identical) avatars all of a sudden? :shock:
It's a lot easier to follow a conversation when people have unique avatars, and "slightly different" doesn't really count ;).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SDK API changes
« Reply #11 on: December 14, 2005, 12:57:46 pm »
I 'm glad you all think option 2 is better. I think so too, [...]
Allthough I'm not a C::B core dev I would vote the same according to experiences.

Btw, if you haven't seen the wxIFM demo, do so. It's amazing :)
This is awsome and already looks like C::B somehow... "Build, "Console", "File", "Classes"... :lol:. I personally like to overlay of the docking option a lot. That really looks professional and is very helpful. Never-ever docking to somewhere you didn't want to dock. Cool!

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: SDK API changes
« Reply #12 on: December 14, 2005, 01:11:35 pm »
By the way, is there any particular reason Mandrav and Thomas have such confusingly similar (but not, as I just now noticed, identical) avatars all of a sudden? :shock:

They 're from the same artist  :lol:

It's a lot easier to follow a conversation when people have unique avatars, and "slightly different" doesn't really count ;).

I see your point, actually I got confused now :)
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: SDK API changes
« Reply #13 on: December 14, 2005, 01:18:34 pm »
Quote from: mandrav
.. actually I got confused now
looks a lot better again when not so jumbledĀ  :lol:

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: SDK API changes
« Reply #14 on: December 14, 2005, 01:57:23 pm »
By the way, is there any particular reason Mandrav and Thomas have such confusingly similar (but not, as I just now noticed, identical) avatars all of a sudden? :shock:

They 're from the same artist  :lol:

Yes, that was rather obvious :P.

Quote
It's a lot easier to follow a conversation when people have unique avatars, and "slightly different" doesn't really count ;).

I see your point, actually I got confused now :)

Ah, I see you changed yours back. Much better :).