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

cbEvents

<< < (3/6) > >>

oBFusCATed:

--- Quote from: frithjofh on June 01, 2012, 01:43:25 pm ---3. It is not out of context in the sense, that this is the only place in the plugin, where the m_ProjectName member is set.

--- End quote ---
You see the context, but we do not, thus it is out of the context :)

frithjofh:
 ;D well okay. Your more stubborn than I am. I admit it is out of context ;). Do you really need more code, then I'll send? Really the constructor is called without detours by functions taking only a cbEvent, so there is nothing there.

But anyway: what can you tell me about the issue? Any idea?

oBFusCATed:
Looking at it looks normal, but I guess, the availability of the data depends on the events calling the code you've shown.
I doubt there is some secret part, so showing the full code is not a big problem for you. This will allow people to try it. Or to pin-point something.
I'm not proficient with the C::B events and when I have problems with them I use the debugger to see where is the place where they are sent
and what is the code/state around that place.

btw: Is this a part of the real code "ProjectFile* prjf((static_cast<const cbEditor*>(m_pEditor))->GetProjectFile());" (note the missing =)?

frithjofh:
yes, this is the real code:

--- Code: ---ProjectFile* prjf((static_cast<const cbEditor*>(m_pEditor))->GetProjectFile());
--- End code ---
I do this a lot (shame on me for readability), but its not an assignment, but a construction, actually.

I think the issue is that on opening a project cbEVT_EDITOR_OPEN events are sent before the project actually exists. I will use the trailing cbEVT_PROJECT_OPEN to set the name of those editors afterward. This is a bit ugly, and not very intuitive, but I recon nobody (not me for sure) will change the way these events are fired.

For the moment I stay put. When the plugin is in any presentable shape, I'll post it. Its function will combine the OpenFileList and the ClosedFileList in one and add a visual history of files. The most of it is working already, but I not satisfied yet.

Thanks for all the attention and greetings from Asturias  :)

oBFusCATed:
Then can you show the callstack for the non-working case a?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version