problem saving Core Data Doc after revert and changes

  • i'm having a problem with my core data document
    app. if i revert the document, then make some
    edits, then attempt to save it, i get a sheet (on
    the front window of the doc) that says:

    The location of the document "Test Doc.myApp" cannot be determined.

    You can specify where to save it.

    with Cancel and Save AsÅ  buttons.

    below is the stack trace i get for a breakpoint at:
        -[NSApplication
    beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]

    note the parameters to the private method are as follows:

        -[NSDocument _runAlertPanelForDocumentMoved: 0
            orDocumentRenamed: 0
            orDocumentInTrash: 0
            orDocumentUnavailable: 1
            thenSaveDocumentWithDelegate: 0
            didSaveSelector:contextInfo: 0]

    this is on tiger (10.4.11 -- i haven't tried this on leopard).

    when i examine the doc in gdb, it appears to have
    a valid fileURL and a valid fileType, and a valid
    managedObjectContext and valid
    managedObjectModel, and the persistant store
    coordinator all seems valid and has a proper
    store and a valid url for the store.

    can anyone suggest what is happening? or more to
    the point, how to fix this? (i'm guessing that
    the first 4 parameters to
    _runAlertPanelForDocumentMoved are BOOLs and
    thus, it would appear that my document is
    unavailable. but i have no idea what this means!)

    thanx,
    ken

    #0    0x9338cf39 in -[NSApplication
    beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]
    #1    0x933873ef in _NXDoLocalRunAlertSheet
    #2    0x93387052 in NSBeginAlertSheet
    #3    0x936238ed in -[NSDocument
    _runAlertPanelForDocumentMoved:orDocumentRenamed:orDocumentInTrash:orDocumentUnavailable:thenSaveDocumentWithDelegate:didSaveSelector:contextInfo:]
    #4    0x93623b4f in -[NSDocument
    _saveDocumentWithDelegate:didSaveSelector:contextInfo:]
    #5    0x9353119c in -[NSDocument
    saveDocumentWithDelegate:didSaveSelector:contextInfo:]
    #6    0x93531028 in -[NSDocument saveDocument:]
    #7    0x000ba745 in -[KVDocument saveDocument:] at KVDocument.mm:535
    #8    0x93383dbc in -[NSApplication sendAction:to:from:]
    #9    0x93431d0f in -[NSMenu performActionForItemAtIndex:]
    #10    0x93431a51 in -[NSCarbonMenuImpl
    performActionWithHighlightingForItemAtIndex:]
    #11    0x934316a8 in -[NSMenu performKeyEquivalent:]
    #12    0x93431149 in -[NSApplication _handleKeyEquivalent:]
    #13    0x93364dbb in -[NSApplication sendEvent:]
    #14    0x000c728f in -[KVApplication sendEvent:] at KVApplication.mm:276
    #15    0x9328fe1e in -[NSApplication run]
    #16    0x93283d4f in NSApplicationMain
    #17    0x00002f9c in main at main.m:12
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today