From: Doug M. <mc...@ia...> - 2009-09-14 14:54:53
|
Patrick Hartling wrote: > Doug McCorkle wrote: > >> Patrick Hartling wrote: >> >>> Doug McCorkle wrote: >>> >>> >>>> Hello Patrick, >>>> >>>> On Aug 9, 2009, at 8:35 PM, Doug McCorkle wrote: >>>> >>>> [snip] >>>> >>>> >>>> >>>>>>> Try r21120. It ended up being pretty easy to add. >>>>>>> >>>>>>> >>>>>> Thanks Patrick! You beat me to the punch. We will give this a try >>>>>> with >>>>>> what we are trying to do and report back. We should have results from >>>>>> our testing on various hardware platforms by the end of next week. >>>>>> >>>>>> >>>>>> >>>>> This is working for our various hardware configurations. Thanks for >>>>> adding this support. >>>>> >>>>> >>>> I am using this code and am trying to determine if a window that is >>>> receiving input is an InputWindow or a display Window and I am unable >>>> to use a dynamic cast to do this. I am getting this compile error on >>>> Mac OS 10.5: >>>> >>>> error: cannot dynamic_cast ‘inputArea’ (of type ‘class >>>> gadget::InputArea*’) to type ‘class gadget::InputWindowCocoa*’ (source >>>> type is not polymorphic) >>>> error: cannot dynamic_cast ‘inputAreaCocoa’ (of type ‘class >>>> gadget::InputAreaCocoa*’) to type ‘class >>>> vrj::opengl::WindowCocoa*’ (source type is not polymor >>>> >>>> Do you know why this would be the case? I am not understanding why I >>>> cannot dynamic cast to different Input Areas. Thanks for the help. >>>> >>>> >>> vrj::opengl::WindowCocoa and gadget::InputWindowCocoa do not have a >>> derived/base relationship; they are sibling types. Both derive from >>> gadget::InputAreaCocoa, which in turn derives from gadget::InputArea. >>> >>> >>> >> Right, so it seems I should be able to dynamic cast an InputArea to an >> InputAreaCocoa and/or an InputWindowCocoa correct? >> > > If you have included gadget/Devices/KeyboardMouseDevice/InputAreaCocoa.h > and/or gadget/Devices/KeyboardMouseDevice/InputWindowCocoa.h, then yes. > I have but I still get the above error. Doug |