- wxString resstring = prop->GetContent() ;
- wxInt32 pos = resstring.Find('.') ;
- assert( pos != wxNOT_FOUND ) ;
- int sinkOid = atol(resstring.Left(pos).ToAscii()) ;
- wxString handlerName = resstring.Mid(pos+1) ;
- wxClassInfo* sinkClassInfo = GetObjectClassInfo( sinkOid ) ;
-
- callbacks->SetConnect( objectID , classInfo , pi , sinkClassInfo ,
- sinkClassInfo->FindHandlerInfo(handlerName) , sinkOid ) ;
+ wxString resstring = prop->GetContent();
+ wxInt32 pos = resstring.Find('.');
+ if ( pos != wxNOT_FOUND )
+ {
+ int sinkOid = atol(resstring.Left(pos).ToAscii());
+ wxString handlerName = resstring.Mid(pos+1);
+ wxClassInfo* sinkClassInfo = GetObjectClassInfo( sinkOid );
+
+ callbacks->SetConnect( objectID, classInfo, pi, sinkClassInfo,
+ sinkClassInfo->FindHandlerInfo(handlerName.c_str()), sinkOid );
+ }
+ else
+ {
+ wxLogError( _("incorrect event handler string, missing dot") );
+ }