[Chandler-dev] [App/Design teams please read] Uncommitted changes and background syncing

Bryan Stearns stearns at osafoundation.org
Tue Mar 28 08:14:18 PST 2006

Katie Capps Parlante wrote:

> Hi Morgen,
> Morgen Sagen wrote:
>> I'm working on background syncing [...]
>> The other related issue is when to make the user's changes available 
>> to the sharing layer.  When the user changes a field in the detail 
>> view, for example, there is no commit( ) performed on the main 
>> repository view and therefore the sharing layer doesn't yet see that 
>> change.  Only after a main view commit( ) happens can the sharing 
>> layer pick up the user's changes.
> In the detail view case, when does the main view commit happen? Is it 
> in a reasonable time frame from the end-user's point of view?

The detail view doesn't commit when updating the content model with a 
change the user has made. Changes are written back to the domain model 
when focus changes (for strings) or immediately (for non-strings like 
popups and checkboxes). This is also true for other places attribute 
editors are used (sidebar renaming, editing in the summary).

Looking through the sources, it appears that these are the occasions 
when the UI repo view commits:

- during startup and at quit time
- When the user changes a checkmark on a collection in the sidebar
- Whenever the user manually sync a collection(Test -> Sync collection) 
or mail
- Whenever the user deletes the selection in a table (so: sidebar or 
- After account prefs are changed by the user, as well as right before 
testing account settings
- After creating a new event on the calendar canvas (allday or not)
- After creating a note, event, or task from the command line I didn't 
know we had
- Before & after sending mail, and every 20 messages while transferring mail
- Before and after sharing (and various times during, I think)
- After dismissing or snoozing a reminder in the dialog
- Before backing up or compacting the repository using the test menu items
- After searching for (and finding) an Amazon wishlist
- After syncing photos from Flickr
- After creating a new Feed channel (twice!), and after receiving feeds
- After importing a certificate (twice!)
- Whenever the user enables/disables background syncing
- After importing an image (File -> Import/Export -> Import image from disk)
- After adding a collection to the sidebar
- after handling other events/commands marked "commitAfterDispatch": 
Cut, Copy, Clear, Paste, Remove, Delete, NewNote, NewCalendar, 
NewMailMessage, NewTask, NewAmazonCollection, NewAmazonWishList, 
NewEVDBCollection, NewFlickrCollectionByOwner, 
newFlickrCollectionByTagEvent, NewFeedChannel, CertificateImport, 

More information about the chandler-dev mailing list