Author Topic: Work on Scripting Console  (Read 8064 times)

arst

  • Guest
Work on Scripting Console
« on: January 30, 2007, 08:30:43 pm »
Hello,

I've been working quite a bit developing the scripting console
component of CodeBlocks. Now the whole thing works OK, and
I think it could be useful for others. There is still a lot to do.


Description:
The aim has been to make developing scripts inside CodeBlocks
easier. To reduce the amount of typing a bit. One part has been
to provide command line history (up and down arrows).

Another to develop a macro facility that expands the command
Squirrel line in a flexible way. This happens almost 100% on the
Squirrel side, so it is quite flexible and one can edit/add/remove
macros without leaving CodeBlocks or compiling.

To do more work from inside the Squirrel language, I found I
had to develop a some small basic libraries (that don't call
native code). Given the dynamic typing in the language,
good internal strings, arrays & tables, it was rather straight-
forward and enjoyable work.

I also exposed a bit more of CB functionality to scripts. In
particular, I wanted to be able to have scripts that add/modify
C++ source code in open editors, so I exposed quite a bit of the
wxScintilla class (through cbEditor).


Questions:
I really hope it is possible to merge this into CB. I've been working
with a rather recent CB rev (3538) and there are a few files I've
been modifying (5..10 files). I also need to add some new files to
the project.

How to go about this in a sensible way?

Who should I speak to about this?

I'm happy to provide a binary some instructions to those who
want to try it out.

I attach an image of the thing in action.

Take care,
// Arst

[attachment deleted by admin]

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Work on Scripting Console
« Reply #1 on: January 30, 2007, 08:45:29 pm »
Just update your working copy to the latest SVN, fix any issues that may be broken.  Then run a diff with subversion and submit the patch to codeblocks project on berlios.  You should also describe the reason for any changes you made to the CB core.
« Last Edit: January 31, 2007, 08:35:03 am by Game_Ender »

arst

  • Guest
Re: Work on Scripting Console
« Reply #2 on: January 30, 2007, 09:47:48 pm »
OK, I can do that.

The reason I ask is that it's basically replacing the existing scripting
console with a new one, and I have to do a small modification in
main.cpp, to create an object of the new class.

So I take it can go ahead with that.

Regards
// Arst

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Work on Scripting Console
« Reply #3 on: January 31, 2007, 08:35:40 am »
Its up to the devs to decide whether or not to accept the patch.  But if you haven't lost anything and it has become more functional I am for it.

arst

  • Guest
Re: Work on Scripting Console
« Reply #4 on: January 31, 2007, 06:41:15 pm »
OK, after a lot of work with svn and patch creation, it's been done.

To understand what to do at the modified scripting console, I think some doc is needed (it works like before but adds a shell layer). I could not find any place to attach comments like that in patch submission page.

I would like the person who looks at it to have some explanation available.

Regards,
Arst

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Work on Scripting Console
« Reply #5 on: January 31, 2007, 07:00:46 pm »
You can explain here and put a link to this explanation in the patch.
Be patient!
This bug will be fixed soon...

arst

  • Guest
Re: Work on Scripting Console
« Reply #6 on: January 31, 2007, 07:58:26 pm »
Hello again,

I put together a small HTML document describing the Squirrel shell. I can add that document to the patch and repost it. The document comes with this posting.

All the things in the HTML doc will not work, since some of it uses script bindings I want to submit in a separate patch (in particular bindings with wxScintilla).

The basic idea is anyway to have a layer between the console and the Squirrel compiler that allows for things like looking at variables, expanding repetetive typing and similar things.

I notice now that I started using the scripting console for opening files after I added an "edit" command to it.

Best Regards,
Arst



[attachment deleted by admin]