Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

cbEvents

<< < (5/6) > >>

frithjofh:
I thought these events were meant only if files were added or removed from a project, not when a file belonging to a project was opened??

For my issue: even if the plugin is attached and a project is open already, every file I then open (a file belonging to a project) does not show its projects name. I think the problem really is what you found: the cbEVT_EDITOR_OPEN does not contemplate the project the file belongs to.

MortenMacFly:

--- Quote from: frithjofh on May 31, 2012, 05:13:44 pm ---In the end: I'm not really criticizing anyone. In the end I just have to admit that c::b is fun and a great tool to work with, so just don't mind too much about my complaint.

--- End quote ---
Don't worry, we listen and we like discussions. Again, just try to implement it in a way it fits your needs by introducing additional events to the core and provide us with patches. In the end if your plugin works fine and requires them we have no other choice than to apply those, aren't we?! ;-)


--- Quote from: frithjofh on May 31, 2012, 05:13:44 pm ---By the way: is there some, one, place where all those events are really explained, as to when they fire, and what was the idea behind their implementation, and so ...

--- End quote ---
I'm afraid only in the heads of us for the moment. I recall a WiKi article on that topic but it seems gone, or at least a quick search didn't reveal it for me.


--- Quote from: frithjofh on May 31, 2012, 05:13:44 pm ---And for that thing which is the idea behind the EditorBase, and the cbEditor, and what more implications lurk there?

--- End quote ---
Sure: Have a look at wxSmith and ByoGames, also HexEditor and the NassiShneiderman plugin for example: They all use not a classical cbEditor which means editing text (source code), but an EditorBase. EditorBase it intended to be the minimal set of function relevant to all basically "notebooks" C::b will handle. However, "specialisations" for source code, which is the #1 use case are done in cbEditor. You can also see EditorBase as an interface class, if you want to.

(Now I'll continue to read the other million posts in this thread... ;D).

MortenMacFly:

--- Quote from: oBFusCATed on June 01, 2012, 05:45:20 pm ---Looking at the code:
1. In EditorManager::New there is not mentioning of a project, probably it has not created here or it is just an omission. No time to dig if the project can be made available in this method.

--- End quote ---
Sure it is not, because an editor does not require a project. However, the IDE will ask in the case you create a new file (editor) if you want to attach this to a project. In that case, you'll see it in the project changed event (or similarly called). In fact, if an editor is created there should not be a ned fr a project to keep it decoupled. Again, think about specific editors like ByoGames... there will never be a project nor should be.

MortenMacFly:

--- Quote from: frithjofh on June 01, 2012, 05:53:12 pm ---For my issue: even if the plugin is attached and a project is open already, every file I then open (a file belonging to a project) does not show its projects name. I think the problem really is what you found: the cbEVT_EDITOR_OPEN does not contemplate the project the file belongs to.

--- End quote ---
For all these test cases, can you do me a favour and disable the CC plugin to check if that changes things?

frithjofh:
disabling the code completion plugin does not change the behavior.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version