[Smtk-developers] Q: Either-or combinations of attribute items

David Thompson david.thompson at kitware.com
Tue Nov 11 18:16:57 EST 2014


> I wonder if we need a find method that is template based - like the addItemDefinition method in Definition.h ?

I would have preferred to do things that way but my shiboken-fu was not up to getting the templated method wrapped (last year). I'm happy to switch the API now.

> ... Also note that the above would core dump if the first find fails.

Yes, but for things like the operators where the attribute items are fixed, I am willing to omit the NULL-pointer checking in favor of legibility.

Also, now that I am exploring conditional children, I see that ValueItem.cxx says:

void ValueItem::updateActiveChildrenItems()
{
  ...
  // Note that for the current implementation only value items with 1
  // required value is support for conditional children.
  // Check to see if the index is valid
  ...
}

and sure enough, when I call setDiscreteIndex() on the "Specification Mode" item, it returns success but then shows 0 active children. Is this expected? I've modified all of the items so they have valid defaults... do they have to be non-default to be considered active?

  Thanks,
  David


More information about the Smtk-developers mailing list