Sign in to follow this  

looks like bug with namespaces in revision 1380

This topic is 1957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi

I recently try revision 1380 and found follow bug - if call engine->SetDefaultNamespace then register property with RegisterGlobalProperty then i got error - 'Identifier ".." not is data type'. If I remove call engine->SetDefaultNamespace than property registered are corectly. I hope this is bug not feature.

Share this post


Link to post
Share on other sites
There was a bug, which I've fixed in revision 1381. However, AngelScript probably still doesn't work like you expect.

Currently AngelScript doesn't search for symbols in parent namespaces, so even if the type is declared for example in the global namespace you'll have to explicitly tell AngelScript to look there with the scope operator, ::, otherwise you'll get the error "Identifier is not a data type" error.

[code]
RegisterStdString(engine);
engine->SetDefaultNamespace("mynamespace");
engine->RegisterGlobalProperty("::string value", &value);
[/code]

The recursive search in parent namespaces will be implemented in a future release.

Regards,
Andreas

Share this post


Link to post
Share on other sites

This topic is 1957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this