totalMessageCount: and unreadMessageCount: usage #83

raneri opened this Issue Mar 17, 2013 · 3 comments


None yet

3 participants


Hello, I don't understand how to use these two methods:

  • (BOOL)totalMessageCount:(NSUInteger *)totalCount;
  • (BOOL)unreadMessageCount:(NSUInteger *)unseenCount;

They return BOOL and expect a NSUInteger as argument, but I'm expecting them to RETURN the count of messages in the folder, can you explain the logic between this?

I've tried to do:
[inbox totalMessageCount:nil];
where inbox is CTCoreFolder that I got with folderWithPath:

But I receive a EXC_BAD_ACCESS from the method, on line:
*totalCount = [self imapSession]->imap_selection_info->sel_exists;


@gmaletic Thank you very much, it works!!!!

I think it would be better to fix the comments inside CTCoreFolder.h -- it currently says:
-- Returns the number of messages in the folder.
-- @return Return YES on success, NO on error.
It is a little ambiguous.


hah,it is a point should pass a &totalCount.

@mronge mronge closed this in 8e7d1c5 Mar 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment