I have a need for read-only objects to be used for navigating through the application I'm developing. I have a read-only root list (Projects) of read-only child objects (Project) and each of the Project objects has a read-only child list (Departments) of read-only child objects (Department). It works ok up to a point, namely, while attempting to add a Department object to the Departments collection. As soon as that's attempted, an exception is thrown stating that "Insert is an invalid operation". Since this exception is thrown at this point, I'm wondering if another exception of the same type will be thrown when/if I get beyond this point and attempt to add a Project object to the Projects collection. Anyway, I've attached copies of all four classes in the hope someone can point out what I'm doing wrong.
Many thanks!
Allen
albruan:
As soon as that's attempted, an exception is thrown stating that "Insert is an invalid operation".
You may have done this as well, but you want to make sure that you set IsReadOnly back to true right after the insert as well.
Kelly.
Copyright (c) Marimer LLC