Hello again, this time i have a question about a simple
csBaseEventHandler implementation.
In the walktest.exe demo i've found this code:
class E3DEventHandler : public scfImplementation1<E3DEventHandler,
iEventHandler>
{
private:
WalkTest* parent;
public:
E3DEventHandler (WalkTest* parent) : scfImplementationType
(this), parent (parent)
{ }
virtual ~E3DEventHandler ()
{ }
virtual bool HandleEvent (iEvent& ev)
{
if (parent && (ev.Name == parent->Frame))
{
parent->SetupFrame ();
return true;
}
return false;
}
CS_EVENTHANDLER_PHASE_3D("crystalspace.walktest.frame.3d")
};
csRef<E3DEventHandler> e3DEventHandler;
Now my questions:
1) My problem here is that i don't understand CS_EVENTHANDLER_PHASE_3D()
because i've no idea about the string i should use in my implementation.
I found no other string in the walktest sources that's
"crystalspace.walktest.frame.3d") nor does i found parts of this string
somewhere else (for example "frame.3d"). I know this is to tell when the
event handler is called, so it's very important for my project. I'm
reading the API references the last few days now but found nothing about
this, help !
My project where i've used the simple1 sources to start with, is using
this for the csApplicationFramwork class:
CS_EVENTHANDLER_PHASE_LOGIC("application.rockenc")
So here i have another string... "application.myappname", i'm confused
about the strings, and i found no description, nor a list with the
available strings... again - help!
2) The two macros
CS_EVENTHANDLER_NAMES
<mailbox:///C%7C/Users/stuv/AppData/Roaming/Thunderbird/Profiles/4mwmvhjl.default/Mail/mail5.world4you.com/Sent?number=536092&part=1.2&filename=group__event__handling.html>
and
CS_EVENTHANDLER_NIL_CONSTRAINTS
<mailbox:///C%7C/Users/stuv/AppData/Roaming/Thunderbird/Profiles/4mwmvhjl.default/Mail/mail5.world4you.com/Sent?number=536092&part=1.2&filename=group__event__handling.html>
I know they are used to provide default stuff for the evenhandler
implementation, but i also don't know about the string i should use for
CS_EVENTHANDLER_NAMES("...")
3) I still have no idea what the macro _CS_DECLARE_EVENT_SHORTCUTS _ is
about.
I'm still searching the API references and the manual for a better
explanation,
*I've read the manual part on this topic*, but that doesn't helped me
either (no explanation on the strings...).
best regards,
Steven Truppe
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe:
mailto:[email protected]?subject=unsubscribe