Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
cbEvents
frithjofh:
I'll try my best. The call stack I used only inside the debugger till now.
On other thing: in the code I posted the constructor takes a EditorBase pointer as argument. For the case a this pointer I get directly from the event object. Could it be for some reason, that this event object carries a pointer to EditorBase which is not completely initialized? For the case b if retrieve the pointers from the editormanager, these are complete.
oBFusCATed:
What is the event for caseA?
frithjofh:
cbEVT_EDITOR_OPEN. case b works without event: the plugin on attaching retrieves from editormanager whatever editors are open.
just ran a test: after receiving the event, I don't use the editor from the event object, but retrieve the editor by filename (from the editor in the event object) directly from editormanager. same result.
Opening some arbitrary file also does not show the project name. as till now I think the project name is set on the editors only after cbEVT_PROJECT_OPEN.
frithjofh:
Made another test. Tried to retrieve the project name from an Entry which was constructed from an editor retrieved from an cbEVT_EDITOR_CLOSE event object. This does work as expected.
So: cbEVT_EDITOR_CLOSE and cbEVT_EDITOR_OPEN are not symmetric.
oBFusCATed:
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.
2. There are some project events like cbEVT_PROJECT_BEGIN_ADD_FILES, cbEVT_PROJECT_FILE_ADDED have you tried to capture them? When do they happen? Before or after the EDITOR_OPEN event?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version