Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Plugin scripts - accessing local context data
beldaz:
Out of interest, GetEditorWordAtCaret makes no use of member data (The only thing accessed is Manager::Get(), which is a global or singleton, I think), so it would be better off as a non-member function. Maybe it would be better to expose a library of such useful functions, rather than (or in addition to) an additional class (cbStyleTextCtrl).
oBFusCATed:
Yes, I have the same idea, just have to implement it:)
beldaz:
:-)
Well, I'm up for getting involved in pulling out this particular function and working from there, so maybe I can help. I've struggled to compile C::B from source properly yet (my poor little netbook is puffing along trying to compile the wxWidgets library for about the 3rd time after numerous problems), so hopefully I'll be able to contribute soon...
beldaz:
Neil: You mentioned a code refactoring menu. I wanted to look at what this did, but couldn't see it in the SVN trunk. Could you point me to it?
[EDIT]: Found it within the code completion plugin code.
beldaz:
--- Quote from: oBFusCATed on December 06, 2011, 10:43:27 am ---[...]
Looking here it seems that the cbStyleTextCtrl is missing from the binding.
I guess you can try to add the bindings yourself and then send us a patch, because I think I don't have time to do it now. It should be pretty easy, look at the wiki for the documentation of the process.
http://wiki.codeblocks.org/index.php?title=Script_bindings
If you have problems don't hesitate to ask.
--- End quote ---
I've had a go at adding appropriate bindings for cbStyleTextCtrl. The trouble is that the GetSelectedText method that I'm interested in is inherited from wxScintilla, which does not have the copy assignment operator required by the binding. For cbStyleTextCtrl I just followed the example of cbEditor and provided a not-to-use assignment method that calls cbThrow, but it would take a very ugly hack to do this within wxScintilla. Any suggestions? Perhaps there's a way to bind an inherited method without providing a binding to the base class (crossing fingers...).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version