OK, My split problems have now turned into grouping problems. Can someone please explain? ;-)
It seems there may be a bug here somewhere because this defies logic. How can an event that is in its own group not compare to itself? The following code should return TRUE but it doesn’t:
Here is the function that should work:
~jr
It seems there may be a bug here somewhere because this defies logic. How can an event that is in its own group not compare to itself? The following code should return TRUE but it doesn’t:
Here is the function that should work:
/*Now if I pass in an event that is known to be in a group and I also pass in its group, the results should always be true but its not. Here is the calling code:
* This function compares the event that is passed in to every event in the group for equality.
*/
function isEventInGroup(evnt : TrackEvent, group : TrackEventGroup) : Boolean
{
for (var groupEvent in group)
{
if (groupEvent.Equals(evnt))
{
return true;
}
}
return false;
}
. . .Can someone please explain what’s going on here? This doesn’t make sense to me. Are you making a copy of the event when you place it in a group? Because that would explain why the instances don’t compare. But why would you not just store a pointer to it? How do you know if an event is in a group?
if (evnt.IsGrouped) // we establish that the event is in a group
{
// the event should be in its own group?
MessageBox.Show(isEventInGroup(evnt, evnt.Group));
}
. . .
~jr