On Nov 13, 2005, at 9:11 AM, rod kay wrote:
i think i have found my problem. i was storing a local 'convenience'
pointer to the object_registry with ...
  object_reg = csInitializer::CreateEnvironment (1, my_args);
... just before creating my main CS applet class, and using this
object_reg, when getting the global strings set.
    when instead of this object_reg, i use ...
  csRef<iStringSet>       strings = CS_QUERY_REGISTRY_TAG_INTERFACE
                                      (Applet->GetObjectRegistry (),
"crystalspace.shared.stringset",
                                       iStringSet);
... i get the correct strings set (the same one which simpleformer
access's). so all works as expected now :).

Yes, that's a problem. You are getting two distinct CS "instantiations" this way because csApplicationFramework itself invokes CreateEnvironment(), thus two distinct registries.

    i will dispose of the convenience pointer, and replace it with
Applet->GetObjectRegistry (), throughout my code, as i guess this is a
better way of accessing the registry.

You can still maintain a convenience pointer but, rather than invoking CreateEnvironment() yourself, do set up your convenience pointer by asking for it via csApplicationFramework::GetObjectRegistry () after its Initialize() method has been invoked.

-- ES



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to