This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Pages: 1 - Last Post: 23 Jul 21, 21:39 Last Post By: JeffTucker
JeffTucker

Posts: 7,939
Registered: 31-Jan-2006
Excluded objects returned by getChildren(category)
Posted: 23 Jul 21, 17:42
 
  Click to reply to this thread Reply
Not sure I'd call this a bug, but getChildren(category) returns both included and excluded objects. In real-world, in-the-skin use, I can't think of a situation in which you would want the excluded objects. Easy enough to do an isIncluded() test, but maybe you shouldn't have to?
davidekholm

Posts: 3,917
Registered: 18-Oct-2002
Re: Excluded objects returned by getChildren(category)
Posted: 23 Jul 21, 20:10   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
You're probably right. This isn't hard to adjust. This is a convenience method after all, and should enable as little coding as possible. A reason for keeping the current behavior would be symmetry with getChildren...
JeffTucker

Posts: 7,939
Registered: 31-Jan-2006
Re: Excluded objects returned by getChildren(category)
Posted: 23 Jul 21, 21:39   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I had the same thought - symmetry. But sure enough, every place that I'm using getChildren(), the for loop starts with if(obj.isIncluded()). Probably should change both of them.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums