Re: Domain TRAP

From: [at]} <Wojtek>
Date: Fri, 14 Sep 2001 11:50:06 -0400 (EDT)

Dear Dominik:

   thank you for a prompt answer. As you can recall, I had
problems with domains in the past. Now I am hitting the obstacles
again. I am calling the Stores.Join(view,view.model) when initializing
my view. I can save the view when it is opened in its own window.
This means that both the view and its model have domains properly
initialized, and the domains are the same.

I can paste the copy of such a view into a text
(using CTRL-A, CTRL-C, CTRL-V). The copy looks just fine. The trap
happens when I try to save this text. This probably means that
the model has kept its domain. Now, I admit I am doing a shallow copy
in CopyFromModelView, as follows:

  dst.model := source.ThisModel() (GrModels.Model); (* shallow copy *)

I am doing this on purpose, because I want my view to display
a live copy of the model data. Your own doocumentation explicitely says
that it is legal for many views to render the same model. This is what
I want to achieve. If I made a deep copy, then I would display a frozen
snapshot, not a live copy.

If my understanding is correct, then I have hit a real limitation
of the BlackBox design. Namely, it is not possible to display
many views of the SAME model and to embed them in texts. The domain
conflict HAS to occur, because a shallow copy of the model keeps
its domain.

I cannot use Info->View State because this menu item is greyed all the
time.

Wojtek Skulski skulski{([at]})nowhere.xy
On Fri, 14 Sep 2001, Dominik Gruntz wrote:

> I assume that the view of your design (which you embed in a text)
> contains its own model, and this model (another store) is not joined
> with the view itself (Stores.Join). When the view is embedded in
> the text, it is assigned to the text's domain. Upon externalization,
> WriteStore checks, whether all stores belong to the same domain,
> otherwise it traps.
>
> With Info->View State you could check yourself, which store
> referenced by your view does not belong to a domain.
>
> - Dominik
>
>
>
> ----- Original Message -----
> From: Wojtek Skulski <skulski{([at]})nowhere.xy
> To: BlackBox <blackbox{([at]})nowhere.xy
> Cc: Wojtek Skulski <skulski{([at]})nowhere.xy
> Sent: Freitag, 14. September 2001 08:13
> Subject: Domain TRAP
>
>
> > Hello:
> >
> > I would appreciate some enlighting comments
> > concerning the domains in BB. Here is the problem:
> >
> > TRAP 21 (precondition violated)
> >
> > Stores.Writer.WriteStore [00002884H]
> >
> > The Stores.odc explain, that:
> >
> > "PROCEDURE (VAR wr: Writer) WriteStore (x: Store)
> > All stores that are written using the same writer must
> > have the identical domain."
> >
> > Precondition which is violated:
> > 21 x # NIL => writer must have no domain,
> > or the same one as x (and as all previously written stores)
> >
> > How can this happen? I am embedding a few views of my design in a text,
> > they look healthy and just fine. But then, when I try to save
> > this text, the trap happens. I admit I embedded the views by copying
> > and pasting (using keystrokes CTRL-A, CTRL-C, CTRL-V). This
> > is a perfectly legal Windows operation and it seems to work
> > just fine. How could the domains get corrupted?
> >
> > I barely dare to whisper that the domains in BB look like
> > one big headache to me....
> >
> > The words of wisdom will be highly appreciated.
> >
> > Please send e-mail responses directly to me with a copy
> > to the mailing list, because I am receiving mailing list
> > digests once a week.
> >
> > Thank you!
> >
> >
> > Wojtek Skulski skulski{([at]})nowhere.xy
> >
> > --------------------------------------------
> >
> > To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
> > blackbox-request{([at]})nowhere.xy
> >
> > To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
> >
> > Send any problem reports or questions related to this email list to the list owner at
> > owner-blackbox{([at]})nowhere.xy
> >
>
>

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy
Received on Fri Sep 14 2001 - 15:50:06 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:43 UTC