Re: [BLACKBOX] Opening an embedded form view

From: [at]} <Antony>
Date: Sat, 12 Dec 2009 21:22:46 -0800


Douglas,

Thanks for initiating this discussion. I have been wondering how to accomplish something similar, but had not taken the time to explore it. Instead I was using a Command Button on a form calling a "Deposit" command from within my module followed by StdCmds.Open"

PROCEDURE Deposit*;
VAR v: View;
BEGIN NEW(v); Views.Deposit(v)
END Deposit;

This opens a document with the view (a graph) embedded. Other controls on the first form modify parameters, and a redraw is invoked by appropriate notify procedures.

I didn't understand how to embed the graph within the initial form, thinking I would have to call a Deposit procedure. Your "Still having problems" post prompted me to try to reproduce your problem. I selected the graph view from the opened document and copied it into the form. I saved the form, closed it and reopened and the graph was still there. Then I unloaded the module and did it again, and the graph was again there. So it is not necessary to call "NEW(v)" to create the graph. Storing the form with the embedded view is sufficient. When the form is opened, the module is loaded, and the view is instantiated. It is not necessary for my module to explicitly allocate a pointer to the view within my module, it is restored by Views.

One question: when I open the graph with the Deposit and Open commands it opens on a white background. On the form it is on a grey background. Something simple to make it white? I'm not seeing the obvious.

Thanks,

Antony





On Sat, Dec 12, 2009 at 7:09 PM, Douglas G. Danforth <danforth{([at]})nowhere.xy


Folks,

I found the major blunder that was causing the trap on attempted deselection.
I had an update within an update which was causing an infinite (slow)loop.

So almost there. Form now has an embedded graph with a white background
which I draw first and my curves appear correctly and change under button
pushing.

Only one problem remains and that is when the form is first opened I get this
trap

ASSERT(v.context IS Documents.Context, 24)

StdDialog.Open
StdDialog.ViewHook.Open
Views.Open
Views.OpenView

so it looks like my context is not a document context.
Am I opening the wrong type of 'view'?

-Doug



---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy


---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Sun Dec 13 2009 - 06:22:46 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:39 UTC