Yeah, it took me a while, but I traced my way through the source of
RequestPlugins() and figured that out... if you want to see the fruits
of my labor, the code is here:

https://adidas.servegame.org/projects/precursors/browser/precursors/trunk/src/Common/ContentLoader/ContentLoader.cpp#L224

Dave

On 3/16/06, Jorrit Tyberghein <[EMAIL PROTECTED]> wrote:
> csLoadPlugin does not automatically put things in the object registry.
> If you load plugins using RequestPlugins() then it will be in the
> object registry. Otherwise you have to register it manually.
>
> Greetings,
>
> On 3/16/06, David Bronke <[EMAIL PROTECTED]> wrote:
> > Ok, I got it working... for a bit.
> >
> > Apparently the problem was due to the fact that the implementation
> > (celClientNetworkLayer) was attempting to register a callback by
> > casting itself to an iCelTimerListener, even thought it didn't inherit
> > from iCelTimerListener. (celPcCommon had taken care of that
> > previously, but when I decided to not make it a property class, I
> > didn't notice that part)
> >
> > My next task was to change the application from loading it on startup
> > with RequestPlugins() to loading it later in a function. To do this, I
> > used the following code:
> >
> > nlclient = csLoadPlugin<iClientNetworkLayer> (plugmgr,
> > "cel.networklayer.client");
> >
> > which works fine. (iClientNetworkLayer is a new subclass of
> > iNetworkLayer that I created to take care of client-side
> > functionality) The problem comes when I try to get the iNetworkLayer
> > interface from within another module:
> >
> > netlayer = csQueryRegistry<iNetworkLayer> (object_reg);
> >
> > This returns NULL when I run it. Am I doing something wrong here? When
> > loading with csLoadPlugin, is there something special I need to do to
> > get the plugin's interfaces into the object registry?
> >
> > TIA,
> > Dave
> >
> >
> > On 3/15/06, David Bronke <[EMAIL PROTECTED]> wrote:
> > > oh, sorry... csQueryRegistry<>()
> > >
> > > On 3/15/06, Andrew Mann <[EMAIL PROTECTED]> wrote:
> > > >         I don't think csQueryInterface<>() exists. Did you mean
> > > > csQueryRegistry<iNetworkLayer> (object_reg) or
> > > > scfQueryInterface<iNetworkLayer> (object_reg) ?
> > > >
> > > > Rhad/Andrew
> > > >
> > > > David Bronke wrote:
> > > > > I've built a custom plugin around an interface I wrote, and I got the
> > > > > plugin to load with no errors or warnings, but when you try to query
> > > > > the interface from it, (csQueryInterface<iNetworkLayer> (object_reg))
> > > > > it gives the following error:
> > > > >
> > > > > WARNING! Suspicious: object with tag 'iNetworkLayer' does not
> > > > > implement interface 'iNetworkLayer'!
> > > > >
> > > > > and then returns NULL. I have been in the CS IRC channel a number of
> > > > > times and have had thebolt look over my code, which seems to be
> > > > > kosher... i've done jam distclean on CS, CEL, and my app, checked
> > > > > against the CSEP and against other plugin examples in CS, and run our
> > > > > app with -verbose to try to diagnose the problem, and I can't figure
> > > > > out what's going wrong. (i've even tried debugging it in gdb, but
> > > > > since the csQueryInterface is done in a constructor i can't get a
> > > > > breakpoint to trigger there)
> > > > >
> > > > > Here are links to the related source files in our SVN repository:
> > > > > iNetworkLayer (the custom interface):
> > > > > https://adidas.servegame.org/projects/precursors/browser/precursors/trunk/include/util/iNetworkLayer.h
> > > > > celClientNetworkLayer.h (the implementation header):
> > > > > https://adidas.servegame.org/projects/precursors/browser/precursors/trunk/plugins/network/celClientNetworkLayer/celClientNetworkLayer.h
> > > > > celClientNetworkLayer.cpp (the implementation source):
> > > > > https://adidas.servegame.org/projects/precursors/browser/precursors/trunk/plugins/network/celClientNetworkLayer/celClientNetworkLayer.cpp
> > > > > nlclient.csplugin:
> > > > > https://adidas.servegame.org/projects/precursors/browser/precursors/trunk/plugins/network/celClientNetworkLayer/nlclient.csplugin
> > > > >
> > > > > Precursors.cpp (our main application):
> > > > > https://adidas.servegame.org/projects/precursors/browser/precursors/trunk/src/Client/Precursors.cpp
> > > > >
> > > > > I'm really unsure of where to look next, so any help at all is 
> > > > > welcome.
> > > > >
> > > > > TIA,
> > > > > Dave
> > > > >
> > > > > --
> > > > > Lead Programmer
> > > > > G33X Nexus Entertainment
> > > > > http://games.g33xnexus.com/precursors/
> > > > >
> > > > >
> > > > > -------------------------------------------------------
> > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting 
> > > > > language
> > > > > that extends applications into web and mobile media. Attend the live 
> > > > > webcast
> > > > > and join the prime developer group breaking into this new coding 
> > > > > territory!
> > > > > http://sel.as-us.falkag.net/sel?cmd_______________________________________________
> > > > > Crystal-main mailing list
> > > > > [email protected]
> > > > > https://lists.sourceforge.net/lists/listinfo/crystal-main
> > > > > Unsubscribe: mailto:[EMAIL PROTECTED]
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting 
> > > > language
> > > > that extends applications into web and mobile media. Attend the live 
> > > > webcast
> > > > and join the prime developer group breaking into this new coding 
> > > > territory!
> > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> > > > _______________________________________________
> > > > Crystal-main mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/crystal-main
> > > > Unsubscribe: mailto:[EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > Lead Programmer
> > > G33X Nexus Entertainment
> > > http://games.g33xnexus.com/precursors/
> > >
> >
> >
> > --
> > Lead Programmer
> > G33X Nexus Entertainment
> > http://games.g33xnexus.com/precursors/
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> > that extends applications into web and mobile media. Attend the live webcast
> > and join the prime developer group breaking into this new coding territory!
> > http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> > _______________________________________________
> > Crystal-main mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/crystal-main
> > Unsubscribe: mailto:[EMAIL PROTECTED]
> >
>
>
> --
> Project Manager of Crystal Space (http://www.crystalspace3d.org)
> and CEL (http://cel.crystalspace3d.org)
> Support Crystal Space. Donate at
> https://sourceforge.net/donate/index.php?group_id=649
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> _______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: mailto:[EMAIL PROTECTED]
>


--
Lead Programmer
G33X Nexus Entertainment
http://games.g33xnexus.com/precursors/


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to