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


Permlink Replies: 3 - Pages: 1 - Last Post: 5 Jun 23, 13:20 Last Post By: davidekholm Threads: [ Previous | Next ]
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Object counter error
Posted: 3 Jun 23, 15:10
 
  Click to reply to this thread Reply
Ran into this one while tinkering with something else. Very intriguing.

Create a folder with 3 images in it. Then:
cc = JAlbumUtilities.countCategories(currentObject, true);
cc.getTotalCount();
As expected, this returns 3. Now add a web location to that folder. This code now returns 5. In short, it's double-counting the web locations. It doesn't make this mistake if the counting isn't recursive: countCategories(currentObject, false)
davidekholm

Posts: 3,432
Registered: 18-Oct-2002
Re: Object counter error
Posted: 5 Jun 23, 13:07   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Thanks for reporting. This should be fixed now in v31.0.3 (core update)
JeffTucker

Posts: 7,994
Registered: 31-Jan-2006
Re: Object counter error
Posted: 5 Jun 23, 13:09   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
That's better. :)

I figured this one would be easy, since it was very easy to reproduce, and totally consistent.
davidekholm

Posts: 3,432
Registered: 18-Oct-2002
Re: Object counter error
Posted: 5 Jun 23, 13:20   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
That's better. :)

I figured this one would be easy, since it was very easy to reproduce, and totally consistent.


Yes indeed :-)
Legend
Forum admins
Helpful Answer
Correct Answer

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