How do I programatically:
- Find an existing Transcript window, or create a new one - View it (if it was previously docked or minimized) Thanks _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Hello Sophie,
Si> How do I programatically: Si> - Find an existing Transcript window, or create a new one from exploring the menuItem "Open" "Transcript" in the world menu I found that #openTranscript gets sent which is implemented as: "Transcript open" World's submorphs contains SystemWindows, one or more might respond with 'Transcript' if you send it #label and return aTranscriptStream if you send it #model If it returns nil on #collapsedFrame it is not collapsed. As smalltalkers always fell it necessary to provide convenience methods, i tried #isCollapsed and it worked. Si> - View it (if it was previously docked or minimized) Similarly exploring an open transcript window I find that the collapse button sends #collapsedOrExpand. BTW I think the World inherits methods to find a particular submorph from Morph and I'm sure Transcript offers some help on dealing with its windows too. Thanks for asking, I learned a bit again. -- Cheers, Herbert _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Sophie424
This is probably not the best way but has worked for me...
To create a new transcript: t := TranscriptStream new. t open. With #open you can create any number of windows on the same transcript stream. All of these views are kept in the ivar 'dependents'. So you could do: (t dependents at: 1) minimize. (t dependents at: 1) restore. (t dependents at: 1) maximize. t dependents do: [:e | e restore]. Note that there may be other things in the dependents collection such as any basic inspectors you have open on the object. The global var 'Transcript', which you probably use in your code, refers to the instance of TranscriptStream available via the menu World->open...transcript. So if you want to manipulate the "main" transcript: Transcript dependents: [:e | e restore] Hope this helps. Z. Sophie (itsme213) wrote: > How do I programatically: > > - Find an existing Transcript window, or create a new one > - View it (if it was previously docked or minimized) > > Thanks _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Sophie424
On Dec 3, 2008, at 6:56 PM, Sophie (itsme213) wrote:
> How do I programatically: > > - Find an existing Transcript window, or create a new one > - View it (if it was previously docked or minimized) > Hi, Sophie, Try this: ActiveWorld findATranscript: nil Cheers, -- Scott _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Sophie424
On Dec 3, 2008, at 8:56 PM, Sophie (itsme213) wrote:
> How do I programatically: > > - Find an existing Transcript window, or create a new one > - View it (if it was previously docked or minimized) Adding to what others have already said ... A new, labelled Transcript window can be opened from code. ts := TranscriptStream new. ts open. "opens window with default title of Transcript". ts openLabel: 'My Transcript'. "opens window with custom title" ts show: 'Hello' Another option for displaying small amounts of output is to use "self inform: some-string" which displays a string in a dialog. --- Mark Volkmann _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Sophie424
Thank you, all !
"Sophie (itsme213)" <[hidden email]> wrote in message news:gh7gtk$kc$[hidden email]... > How do I programatically: > > - Find an existing Transcript window, or create a new one > - View it (if it was previously docked or minimized) > > Thanks _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |