- [Cookbook] Embedded documents

From: Douglas G. Danforth <"Douglas>
Date: Sun, 15 May 2005 11:24:11 -0400

----boundary-LibPST-iamunique-1623022576_-_-
Content-type: text/plain

Wojtek,
I have now adopted the deep copy form for the Cookbook (this can be
changed if the BlackBox User Group (BBug) doesn't like it). It seems to
keep the context in mind as one scrolls through the source code.
-Doug

Wojtek Skulski wrote:
>>Thank you very much. The behavior is nice but not quite what I wanted
>>since one gets a copy of the document and not a view into the document.

>
>
> Doug: you are talking System 3 here. They built their framework around
> that idea.
>
>
>>Let D be the containing document and E' be the embedded copy of document
>>E. If one now opens and modifies E, the copy E' within D does not change.
>>
>>Is it possible to to have (a view of) E embedded in D such that when E
>>is edited (by itself), the view within D changes?

>
>
> No. Technically, domains will not allow you. Every document defines its
> own Domain. You cannot embedd objects of one domain into another domain.
> You will get a trap if you try to. The only workaround is a deep copy.
> You make a deep copy. The domain of the deep copy is not inited. Now
> you embed the copy into an existing domain (i.e., a document). The domain
> of the copy is joined with the domain of the embedding document. From now
> on, the embedded view belongs to the domain of the container.
>
> It is all described in the documentation of Stores. I always wondered
> why they implemented this domain thing. Why not System-3? I asked a few
> times and never quite comprehended the answer. But the gist of what they
> said was: it is more foolproof. Not sure why, but this is what they said.
>
> So, we have to accept. This is the way it works under BB. No spiffy
> things. Just the functionality. Many times I had the idea how nice it
> would be to have the same document open in many places. However, I
> was always forced to implement the deep copy instead. And you know what?
> My data acquistion programs work, I am writing research notes with
> embedded views, and nobody ever complained. It is not bad. It works.
>
> Hope this helps,
> W

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-1623022576_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciB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mVkLiBJdCBp
cyBub3QgYmFkLiBJdCB3b3Jrcy5ccGFyDQo+IFxwYXINCj4gSG9wZSB0aGlzIGhlbHBzLFxwYXIN
Cj4gV1xwYXINClxwYXINCi0tLSBCbGFja0JveFxwYXINCi0tLSBzZW5kIHN1YmplY3QgSEVMUCBv
ciBVTlNVQlNDUklCRSB0byBibGFja2JveEBvYmVyb24uY2hccGFyDQpccGFyDQp9


----boundary-LibPST-iamunique-1623022576_-_---
Received on Sun May 15 2005 - 17:24:11 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:14 UTC