Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
porting c::b to sqrat
BlueHazzard:
Some thoughts about the const thing:
As thomas mentioned in his post, the current implementation of const is a type of "implementing a get and set function, and denying the access on set". But is no binary constnes as expected. You can still do:
--- Code: ---> print(::EXT_WORKSPACE);
workspace
> EXT_WORKSPACE.MakeUpper();
> print(EXT_WORKSPACE);
WORKSPACE
--- End code ---
as you see the constant "EXT_WORKSPACE" is changed, and i think this is a wrong behaviour. Also are consts in squirrel evaluated in compiling time. With this implementation this is not possible.
I would suggest to use the const_table of squirrel instead. But there is obvious not the possibility to use the wxString type, but only the string type witch comes with squirrel. This change could possibly break the api (I'm not sure in witch context this constants are used, but if they are only used with the "+" operator it won't break the api, only with functions witch use a wxString as parameter...)
greetings
Navigation
[0] Message Index
[*] Previous page
Go to full version