| To: | sales@precision-forming.com, jmp-l@wubios.wustl.edu |
|---|---|
| Subject: | Special Journal Window Tricks - with example code |
| From: | chem engineer <chemical_engr@yahoo.com> |
| Date: | Wed, 18 Oct 2006 06:44:44 -0700 (PDT) |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=pimdQCahZ9SMtKYJMzGuQjFgnYjxfAXge0hXg+QHbi0QQi34i72fD4dJber1XnvUPIvaLsklrSeypwGkCQZv1kUTqendkeXwyZ7vSvOctfhIgVhMqMOMR/gXk11bTvQ0eUE6fJ7N+EvDS4TZNFVxpD2QfJ7eyXN/2CaZU0TcXdo= ; |
| In-reply-to: | <000601c6f25b$9e0596f0$0fa8a8c0@FredLaptop> |
|
To Fred Schindler: - re questions on creativce journalling > ... I received emails back saying the posting was pending, > waiting for person in charge of the JMP list to approve it. You need to get signed up - OR use the Yahoo JMP group - it is a mirror. > How do I refer to the journal window so I can access it? You need to establish a pointer to the window - Which is a trick ... a real trick ... > What is the specific command & syntax to access > my journal window? You send the journal window a Message. > And, is it possible to have more than one open journal window > at the same time, I don?t think so ? you have to work one working Journal at a time ? but you can save them and Reload them to add more stuff to a journal if you like. This is due > how would I refer to each of them so I can specify which journal > I want an analysis window to get copied to? Establish a pointer to Each Journal Winow.
> would I refer to each of them so I can specify which journal > I want an analysis window to get copied to? Yes - via a pointer ... The trick is establishing a new Journal with
a pointer ? This works from Ver 5.1 forward. There is no way (in 5.1 at least) that allows instantiation (creation) of a new Journal with a pointer ? so there is a trick to get one started this is it: à Here is some code for you to get started - it is fairly well documented ... // initiates a new blank journal - usage ... // "j_ptr = initiate_working_journal;", // and j_ptr is the new journal pointer // this gets around a quirky journal instantiation // limitation, where when a journal // is created via "obj << journal" no pointer can be // established, via the obvious "jrn_ptr = obj << journal" // This assumes a blank journal is established ... as a // blank journal file which has been saved to an // open network location initiate_working_journal = expr( // open a default
working blank journal - // presaved blank journal // where $path is the network path to the empty journal // location open("$path\Empty Journal.jrn"); // establish pointer to the Journal - can only // be done this way ... jrn_obj = Window("Journal: Empty
Journal"); // save journal, to temp location - so that arbitrary // resave does not overwrite default blank journal location jrn_obj << save
journal("C:\temp\jrn_tmp.jrn"); jrn_obj << close window; // close this instance ... // jrn_obj ptr is now defunct ? last statement will // ?return? a pointer // reopen so that an inadvertent save will now overwrite the // temp location to the virgin blank journal open("C:\temp\jrn_tmp.jrn"); // return a reference ? returns a pointer reference ? // usage ? "j_ptr = initiate_working_journal;" Window("Journal: jrn_tmp"); ); à In order to clear a working journal ? // clear journal routine ? // usage ... "clear_jrn(j_ptr);", where [j_ptr] // is the
pointer the the journal // allows a working journal to be cleared, // but leaves the pointer active, and // any new journaling ? // will post to the freshly cleared journal clear_jrn =
function( {obj}, jrn_ptr = obj; (jrn_ptr[headbox(1)] << child) << delete; ); à In order to send stuff to the journal ? where ?working_win? is a pointer to the window to be journaled working_win << journal; à Toggle trick to fix memory leak problem you may encounter // toggle top outline box - fixes formating bug in journals ? // likely related to memory leak, // what happens is that the window gets screwed up and is nearly // infinately wide, this refresh // seems to solve the issue jrn1[outlinebox(1)] << Close; wait(0.1); jrn1[outlinebox(1)] << open all below; |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Column matching using a set of synonyms, Emil M Friedman |
|---|---|
| Next by Date: | Special Journal Window Tricks - with example code, chemical_engr |
| Previous by Thread: | Column matching using a set of synonyms, James T Metz |
| Next by Thread: | Special Journal Window Tricks - with example code, chemical_engr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |