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

porting c::b to sqrat

(1/3) > >>

BlueHazzard:
hi.
i have started to try to make a xrc support for the squirrel part. I planed to expose the basics of every wxWidgets Control class to squirrel, but i encountered immediately the copy ctor problem:

--- Quote ---NOTE: Not all bindings should have an emptyCtor(). For example, scripts should not have the ability to create, say, a new "cbProject". Instead, it should go through the standard route: GetProjectManager().NewProject(). Another thing to note about emptyCtor() is that it imposes certain requirements on the C++ class, like that your C++ object must have a public copy constructor (but this is a requirement anyway). Look for an example in all basic classes (e.g., cbEditor). Copy constructors have been added to them which do nothing, just throw an error. They are not used by scripting (SqPlus has been patched for this) but they must exist nevertheless. Anyway, these are some "advanced" scripting issues which will become clearer once the basics are more clear. All of the wxWidgets GUI controls have private copy-ctors btw.
--- End quote ---

sqplus is outdated now since several years, and i think it isn't maintained any more.
http://sourceforge.net/projects/scrat/
sqrat is maintained and it has a interesting feature:

--- Quote ---* NoConstructor
* CopyOnly
* NoCopy

--- End quote ---

so are there any protests against porting c::b?

if not, is there a special technique to provide patches for such big changes? Like branches with git...

greetings

oBFusCATed:
Generally porting the squirrel bindings to something that is supported and up-to-date and understandable is always good.
But there are some requirements:
1. The currently exposed squirrel api MUST not break, so older scripts MUST run without changes
2. It must work on all platforms 32 and 64 bits
3. Someone should do it
4. If 1 is not possible we should probably look for other scripting engines (lua or python), because squirrel is pretty limited in additional libraries.

But on the other hand if I were you I'd try to do higher level binding and won't try to do 1:1 mapping between the wx classes and squirrel binding.

BlueHazzard:
I'm still trying to port c::b to sqart, and in looks good so wide. The only problem i encounter is a bit in the UNICODE section. What is the minimal wx-version it is supported in c::b? If it is >2.8.4 there are no problems because there exists the function wxString::ToUTF8 and wxString::FromUTF8, but with a smaller version i have to look again.

I also try to implement a better way to use XRC Dialogs from squirrel. In my current implementation I use a lot wx2.9 API. Is it somehow acceptable to use this feature only with wx2.9 or should i try to implement it also for wx2.8 (witch would be a little bit of a pain in the ass). The old API would not change. So any script witch runs with the current version of c::b will work also in the new implementation...

greetings

ollydbg:

--- Quote from: BlueHazzard on October 16, 2013, 03:20:26 pm ---I'm still trying to port c::b to sqart, and in looks good so wide. The only problem i encounter is a bit in the UNICODE section. What is the minimal wx-version it is supported in c::b?

--- End quote ---
The minimal wx version to build C::B is 2.8.12.



--- Quote ---I also try to implement a better way to use XRC Dialogs from squirrel. In my current implementation I use a lot wx2.9 API. Is it somehow acceptable to use this feature only with wx2.9 or should i try to implement it also for wx2.8 (witch would be a little bit of a pain in the ass). The old API would not change. So any script witch runs with the current version of c::b will work also in the new implementation...

greetings

--- End quote ---
C::B will finally swith to use wx 3.0+ if wx released and becomes stable, but please note that this will take years to happen as I can expect. You see currently there are many issues when build C::B against wx 2.9.x +, This means C::B will use wx 2.8.x for quite a long time I think. :(

ToApolytoXaos:

--- Quote from: oBFusCATed on September 29, 2013, 07:57:05 pm ---4. If 1 is not possible we should probably look for other scripting engines (lua or python), because squirrel is pretty limited in additional libraries.

--- End quote ---

I use ZeroBrane Studio which is implemented in Lua entirely which uses wxLua as its GUI; it works flawlessly, especially its autocompletion mechanism. I would go for either Lua or Python which I know both for C::B expansion.

Navigation

[0] Message Index

[#] Next page

Go to full version