Hi, I'm trying to do some searching using the nsISearchSession interface 
and I've set a SearchTerm and a SearchScope and every time I run the 
search I never get results.  What I've narrowed it down to is the fact 
that I'm not actually setting the search string properly in the searchterm.

To hopefully make this a little more clear I've called createTerm on an 
nsISearchSession.  In that SearchTerm I've set the attrib to 
nsMsgSearchAttrib.Subject, and the op to nsMsgSearchOp.Contains.  I then 
set the SearchTerm.value.attrib to nsMsgSearchAttrib.Subject and I've 
been trying to set the SearchTerm.value.str to a js string.  That does 
not work since it is of type wstring.  I then append the searchTerm, 
check the length, add a scope term (the default accounts INBOX), 
register an nsIMsgSearchNotify listener and finally call 
SearchSession.search(null).  I get no js errors and the dumps in my 
listener for onNewSearch and onSearchDone trigger properly, there is 
never an onSearchHit.  I know the subject I'm looking for exists, I 
checked before doing the search.

Any help is greatly appreciated,
Dan


Reply via email to