mozilla

Compare Revisions

Gloda examples

Change Revisions

Revision 287513:

Revision 287513 by jenzed on

Revision 293256:

Revision 293256 by One on

Title:
Gloda examples
Gloda examples
Slug:
Thunderbird/Gloda_examples
Thunderbird/Gloda_examples
Tags:
thunderbird, "Thunderbird 3"
thunderbird, Thunderbird 3
Content:

Revision 287513
Revision 293256
n20<br> aListener={<br>           /* called when new items are return20aListener = {
>ned by the database query or freshly indexed */<br>           onI 
>temsAdded: function _onItemsAdded(aItems, aCollection) {<br>      
>      },<br>           /* called when items that are already in o 
>ur collection get re-indexed */<br>           onItemsModified: fu 
>nction _onItemsModified(aItems, aCollection) {<br>           },<b 
>r>           /* called when items that are in our collection are  
>purged from the system */<br>           onItemsRemoved: function  
>_onItemsRemoved(aItems, aCollection) {<br>           },<br>       
>     /* called when our database query completes */<br>           
> onQueryCompleted: function _onQueryCompleted(conversation_coll)  
>{<br>               try {<br>                 for (var conv in co 
>nversation_coll)<br>                     //do something with the  
>Conversation here<br>                     alert(conv.subject);<br 
>>                 }<br>             } catch (e) {}    <br>        
>    } 
21    /* called when new items are returned by the database query o
 >r freshly indexed */
22    onItemsAdded: function _onItemsAdded(aItems, aCollection) {
23    },
24    /* called when items that are already in our collection get r
 >e-indexed */
25    onItemsModified: function _onItemsModified(aItems, aCollectio
 >n) {
26    },
27    /* called when items that are in our collection are purged fr
 >om the system */
28    onItemsRemoved: function _onItemsRemoved(aItems, aCollection)
 > {
29    },
30    /* called when our database query completes */
31    onQueryCompleted: function _onQueryCompleted(conversation_col
 >l) {
32        try {
33            for (var conv in conversation_coll) {
34                //do something with the Conversation here
35                alert(conv.subject);
36            }
37        } catch (e) {}
38    }
39}
n22<br>glodaMessage.conversation.getMessagesCollection(aListener)n41glodaMessage.conversation.getMessagesCollection(aListener)
n32    <h2 id="Show_all_messages_where_the_from,_to_and_CC_values_inn51    <h2 id="Show_all_messages_where_the_from.2C_to_and_CC_values_
>clude_a_specified_email_address">>include_a_specified_email_address">
t42   //First take an email address and turn it into an identity objt61          //First take an email address and turn it into an ident
>ect>ity object

Back to History