Message 1 of 5
isKindOf()
Not applicable
03-13-2002
12:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a class that is derived from a combination of AcDbPolyline and a base
class that i've made. Up until today it seemed like everything was working
great. I have an extremely extensive application here, and I'm getting
really frustrated right now because functions that were working yesterday
seem to be returning information that is not correct. Before, i was using
the following code to determine if an object selected is one of my custom
entities:
MyPolyline *pLine = NULL;
pLine = MyPolyline::cast(pObj);
if(pLine)
acutPrintf("\nThis is one of my polylines.");
Foolproof, right? Well, now AutoCAD has decided that every polyline i click
on is actually one of mine. No idea why. I have restored backups of my
app, and it works just fine. How could this possibly be happening? The
same basic problem results results from this:
if(pObj->isKindOf(MyPolyline::desc()))
acutPrintf("\nThis is one of my polylines.");
It's lying to me again. Even stranger is that when i use the
AcRxObject::comparedTo( ) function, it returns a "Not Orderable" value.
So it thinks it is already one of mine, and when it returns and tries to
access members of my class, it obviously dies immediately, because it is in
fact NOT one of my entities. What do i do, short of backtracking a few days
and starting over? I'm totally lost as to how this could be happening.
class that i've made. Up until today it seemed like everything was working
great. I have an extremely extensive application here, and I'm getting
really frustrated right now because functions that were working yesterday
seem to be returning information that is not correct. Before, i was using
the following code to determine if an object selected is one of my custom
entities:
MyPolyline *pLine = NULL;
pLine = MyPolyline::cast(pObj);
if(pLine)
acutPrintf("\nThis is one of my polylines.");
Foolproof, right? Well, now AutoCAD has decided that every polyline i click
on is actually one of mine. No idea why. I have restored backups of my
app, and it works just fine. How could this possibly be happening? The
same basic problem results results from this:
if(pObj->isKindOf(MyPolyline::desc()))
acutPrintf("\nThis is one of my polylines.");
It's lying to me again. Even stranger is that when i use the
AcRxObject::comparedTo( ) function, it returns a "Not Orderable" value.
So it thinks it is already one of mine, and when it returns and tries to
access members of my class, it obviously dies immediately, because it is in
fact NOT one of my entities. What do i do, short of backtracking a few days
and starting over? I'm totally lost as to how this could be happening.