Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

SVNInside : development of another SVN plugin for CodeBlocks

<< < (7/31) > >>

JGM:
I was just reading the wxWidgets wiki and I found these links to be of interest:

http://libexecstream.sourceforge.net/
http://www.netbsd.org/~jmmv/process/

This was the url for reference:
http://www.wxwidgets.org/wiki/index.php/WxExecute

orel:
Thank you for the links.

For information, i had tried wxExecute synchronously : no problem.
and asynchronously too : the coupling with a wxProcess could be a great thing in order to, for example, run a command taking a long time and using the wxProcess::OnTerminate() inherited function to refresh the GUI when that command end.  All my tries worked.

But, given the bad feedback about wxExecute from Thomas, i will keep for the moment my old windows C code in the SVN repository and will change it to something else if needed. I'll keep my wxExecute tries closer in case of...

For the moment, i will concentrate my effort into other aspects and features of the projects, making the code more robust, etc.

And for wxExecute, the question stays open !!

dmoore:
IMO, you should use wxExecute (and wxProcess when needed) as your standard implementation (Despite the justified misgivings of Thomas). That way your code will *mostly* work on all platforms with minimal changes (my Shell Extensions plugin and Python Debugger plugin work on both Linux and Win32 and both use asynchronous processes with redirected output courtesy of wxProcess).  The best way to do this would be to write a class wrapper around wxExecute/wxProcess or extend the incomplete Process implementation in the C::B SDK. Then if you feel the need, you can later add platform specific implementations for process handling without having to modify the SVN specific code in your plugin.

orel:

--- Quote from: Biplab on October 10, 2007, 05:32:41 am ---EditorBase::Undo() is an empty virtual function which has been implemented in cbEditor. Try the following code.

--- Code: ---// Code to catch cbEVT_EDITOR_MODIFIED event
void foo::OnEditorModified(CodeBlocksEvent& event)
{
    cbEditor* ed = (cbEditor*)event.GetEditor();
    ed->Undo();
}
--- End code ---

Or


--- Code: ---cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
ed->Undo();
--- End code ---

HTH. :)

--- End quote ---

No one of those code snippets is working. I simply don't understand how to do that.

stahta01:
Patch to for building under windows without pre-compiled headers.

Tim S


--- Code: ---Index: src/Dialogs/wxSVNTreeCtrl.cpp
===================================================================
--- src/Dialogs/wxSVNTreeCtrl.cpp (revision 8)
+++ src/Dialogs/wxSVNTreeCtrl.cpp (working copy)
@@ -1,6 +1,7 @@
 #include <sdk.h> // Code::Blocks SDK
 #ifndef CB_PRECOMP
     #include <configmanager.h>
+    #include <cbeditor.h>
     #include <cbproject.h>
 #endif
 #include <wx/menu.h>

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version