CoreData NSPersistentDocument Tutorial question

  • Hi everybody,
    I am evaluating CoreData and I tried the NSPersistentDocument
    Tutorial. I found the bug with revert and I looked at your archives
    where it says basically to adopt the mediator pattern in order to get
    rid of that bug.
    Is there another way, using the same strategy described in the
    tutorial (i.e. having an instance variable in the document) ?

    Besides, I noticed that undo/redo has a bug when deleting or cutting
    entities: if I delete or cut some objects, and then perform undos
    until I get to the saved version of the document (or to the unsaved
    emtpy document if I started from an empty one), the window document
    changed status remains active.
    This is not just an aesthetic anomaly: if I add some objects to the
    document, save the doc, delete something and perform undo, I find
    that the document changed is wrong.

    It seems that the change count is 1 more than the correct value.

    Did anybody notice the same? Is there a solution to it?

    Thank you,
    Alessandro
  • I am sorry, I am posting my questions again since I didn't get any
    answer. Please, tell me if they are not relevant or if there is
    something wrong with them.
    Alessandro

    > Da: Alessandro Pistocchi <alepistocchi...>
    > Data: 11 settembre 2007 10:53:39 GMT+02:00
    > A: <cocoa-dev...>
    > Oggetto: CoreData NSPersistentDocument Tutorial question
    >
    > Hi everybody,
    > I am evaluating CoreData and I tried the NSPersistentDocument
    > Tutorial. I found the bug with revert and I looked at your archives
    > where it says basically to adopt the mediator pattern in order to
    > get rid of that bug.
    > Is there another way, using the same strategy described in the
    > tutorial (i.e. having an instance variable in the document) ?
    >
    > Besides, I noticed that undo/redo has a bug when deleting or
    > cutting entities: if I delete or cut some objects, and then perform
    > undos until I get to the saved version of the document (or to the
    > unsaved emtpy document if I started from an empty one), the window
    > document changed status remains active.
    > This is not just an aesthetic anomaly: if I add some objects to the
    > document, save the doc, delete something and perform undo, I find
    > that the document changed is wrong.
    >
    > It seems that the change count is 1 more than the correct value.
    >
    > Did anybody notice the same? Is there a solution to it?
    >
    > Thank you,
    > Alessandro
  • Hola Alessandro,
    I had not noticed such bugs, but if you can consistently reproduce
    them, you should report the bug in the appropriate place:

    https://bugreport.apple.com
    (an ADC membership is needed)

    Suerte!
    Dino

    On Sep 12, 2007, at 12:01 PM, <cocoa-dev-request...> wrote:

    > Message: 6
    > Date: Wed, 12 Sep 2007 15:00:38 +0200
    > From: Alessandro Pistocchi <alepistocchi...>
    > Subject: Fwd: CoreData NSPersistentDocument Tutorial question
    > To: <cocoa-dev...>
    > Message-ID: <B98FCD8D-D1CA-4042-B4B7-07AF1D2798AE...>
    > Content-Type: text/plain;    charset=US-ASCII;    delsp=yes;    format=flowed
    >
    >
    >
    > I am sorry, I am posting my questions again since I didn't get any
    > answer. Please, tell me if they are not relevant or if there is
    > something wrong with them.
    > Alessandro
    >
    >> Da: Alessandro Pistocchi <alepistocchi...>
    >> Data: 11 settembre 2007 10:53:39 GMT+02:00
    >> A: <cocoa-dev...>
    >> Oggetto: CoreData NSPersistentDocument Tutorial question
    >>
    >> Hi everybody,
    >> I am evaluating CoreData and I tried the NSPersistentDocument
    >> Tutorial. I found the bug with revert and I looked at your archives
    >> where it says basically to adopt the mediator pattern in order to
    >> get rid of that bug.
    >> Is there another way, using the same strategy described in the
    >> tutorial (i.e. having an instance variable in the document) ?
    >>
    >> Besides, I noticed that undo/redo has a bug when deleting or
    >> cutting entities: if I delete or cut some objects, and then perform
    >> undos until I get to the saved version of the document (or to the
    >> unsaved emtpy document if I started from an empty one), the window
    >> document changed status remains active.
    >> This is not just an aesthetic anomaly: if I add some objects to the
    >> document, save the doc, delete something and perform undo, I find
    >> that the document changed is wrong.
    >>
    >> It seems that the change count is 1 more than the correct value.
    >>
    >> Did anybody notice the same? Is there a solution to it?
    >>
    >> Thank you,
    >> Alessandro
    >
    >
previous month september 2007 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
Go to today