Author | Topic: SubscribeEvent / COMDEFAULTHANDLER | |
---|---|---|
AUGE_OHR | SubscribeEvent / COMDEFAULTHANDLER on Sat, 18 Oct 2008 02:09:37 +0200 hi, i do use Xbase++ activeX with M$ MapPoint (2004 Europa) on my Dialog i have a SLE where i can enter a Customer ID and it will use FindPushPin to search for a PushPin, center it and display other PushPin Nearby. this all work. now i try to SubscribeEvent *** snip *** cEventName := "SelectionChange" xVar := oApp:oMap:isEventPublished(cEventName) IF xVar <> Nil lSuccess := oApp:oMap:SubscribeEvent(xVar,{| NewSelection, OldSelection |; oApp:MPSelectionChange(NewSelection,OldSelection) }) ENDIF *** eof this Event is fired when i click on a other PushPin. It will get its Location and store its :name = Customer ID into SLE *** snip *** METHOD XbMap:MPSelectionChange(NewSelection, OldSelection) LOCAL oLoc LOCAL cName oLoc := NewSelection:Location() oLoc:GoTo() cName := oLoc:Name() ::oDlgMap:oSeek:setdata( cName ) RETURN self *** eof *** this also work as expected, but now if i press my OK Button it crash *** snip *** oError:args : -> VALTYPE: U VALUE: NIL oError:canDefault : N oError:canRetry : N oError:canSubstitute: J oError:cargo : NIL oError:description : Parameter hat falschen Typ oError:filename : oError:genCode : 2 oError:operation : Location oError:osCode : 0 oError:severity : 2 oError:subCode : 1025 oError:subSystem : BASE oError:thread : 4 oError:tries : 0 ----------------------------------------------------- CALLSTACK: ----------------------------------------------------- Called from XBMAP:MPSELECTIONCHANGE(3494) Called from (B)JOBMAP(192) Called from ACTIVEXOBJECT:COMDEFAULTHANDLER(702) Called from XBPACTIVEXCONTROL:COMDEFAULTHANDLER(3094) Called from AUTOMATIONOBJECT:NOMETHOD(961) Called from XBMAP:SHOWRADIUS(3174) Called from (B)XBMAP:MAPINIT(1934) Called from JOBMAP(214) Called from OPENMP1THREAD(1627) *** eof *** i realise that i might have made a "recursion" and got a Error, but what i like to know where COMDEFAULTHANDLER is comeing from ? i did not see it before when i have not SubscribeEvent any Event ? i did have try my own COMDEFAULTHANDLER before ( without any SubscribeEvent ) but i did not "reach" it. so my Question is : do i NEED to SubscribeEvent at least 1 Event to "reach" my own COMDEFAULTHANDLER ? greetings by OHR Jimmy |