User forums > General (but related to Code::Blocks)

CodeBlocks Scripting abilities

<< < (2/2)

takeshimiya:

--- Quote from: tiwag on January 27, 2006, 07:14:52 pm ---
--- Quote from: Takeshi Miya on January 27, 2006, 07:11:20 pm ---
--- Quote from: tiwag on January 27, 2006, 07:08:38 pm ---most of the answers you'll find in "sdk/as/bindings/scriptbindings.cpp"

--- End quote ---
Sorry, but those are the current bindings, which doesn't answers my questions, please read :P

--- End quote ---
what else than the current bindings do you expect to be working ? ;-)

--- End quote ---

Let's see, my questions aren't about the bindings (which as you've said are in as/bindings).
I've asked other questions (see again, I'm writting them in red).

See here: http://forums.codeblocks.org/index.php?topic=2168.msg17067#msg17067
(I've created an infinite-loop :lol:)

mandrav:

--- Quote ----What on earth is that @?
--- End quote ---
It's a "handle". Handles are reference counted objects.
If it helps you understand it better, think of it as a pointer (it's not, but valid statement in C::B).


--- Quote ----Those wxString needs _T() wrappers to work in unicode mode, right?
--- End quote ---
_T() does not exist in scripts.


--- Quote ----What is exposed from wxWidgets? Everything? only wxString?
--- End quote ---
Whatever we expose ;)
Currently I 've exposed wxString and wxArrayString. Note that I 've only exposed part of them, not fully.


--- Quote ---Would be something at least simmilar to this be possible with XRC+AngelScript?
--- End quote ---
I had created a scripted wizard which would work entirely off scripts and XRC. You know: "Next", "Previous", "Finish" etc.
I guess I could post it as a sample...

tiwag:
ok

then PLEASE look in all files of sdk/as/bindings/*.cpp;*.h   ;-)

seriously, take a look in these files and try to understand it,
when you have a specific problem with the usage of these commands, then post it here,

if you look specifically for the GetBuiltinActiveEditor() method,
you see in the scriptbindings.cpp the following registering for it
    engine->RegisterObjectMethod("EditorManagerClass", "Editor@ GetBuiltinActiveEditor()", asMETHOD(EditorManager, GetBuiltinActiveEditor), asCALL_THISCALL);


as far as i understand it, the @ is obviously part of the declared typename,
used to tell the as-engine, that a custom data object of type "Editor@" is used as returnvalue.

therefore we declare a Editor@ type in order to match the definition for the method GetBuiltinActiveEditor()
it is nothing fancy, PLEASE just take a moment to look in the files i told you
(and i got told to look into from Yiannis ;-) ) 
how it works.

takeshimiya:
Ok, I've answered myself 2)...


--- Code: ---Editor@ type in order to match the definition for the method GetBuiltinActiveEditor()
--- End code ---
Yes, I can see that it matchs the definition... but it doesn't answers why an @ is requiered (both from the binder viewpoint and the scripter viewpoint)...

As for 3), maybe you misunderstood, but I'm NOT asking what can be done with the current bindings, instead, I'm asking what bindings could be added in the SDK without much pain.
I know that the current bindings are wxString, wxStringArray, and the MessageBox's, but it's not what I'm asking.

I really don't know if it would be doable to create wxWidgets widget bindings to create dialogs.
But I guess it would be a very difficult task to do that, anyways...

Navigation

[0] Message Index

[*] Previous page

Go to full version