Article # 12, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Single-document-interface and GenDocumentGroup
Question: I am setting up my application using the single-document interface and I get this error in Swat: OBJ_BLOCK_DUPLICATE_NOT_DISCARDED when I try to open a file. Answer: In the procedural model you must take out the GDGI_genDisplay instance from the GenDocumentGroup object definition. If this field is non-null the GenDocumentGroup will automatically try to duplicate the display object resource. You don't want this to happen under the SDI model. You'll generally just keep one copy of the object around that will interface with the one document you have opened. Thus, making duplicates of resources is not necessary, and in this case causes an error. By the way, you won't need a GenDocumentGroup when using the procedural document model. It is convenient to keep around if you're going to be compiling both a MDI and SDI version of your app, but not necessary if you're only doing SDI.