Re: logging to another window

Eugene <[email protected]> Tue, 05 Oct 2004 09:15:46 +0400
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
On Sun, 3 Oct 2004 15:55:22 +0200
  Bartek Krzeszewski <bkrzeszewski-EDYeUJD08VlmR6Xm/[email protected]> wrote:
> 
> from lyntin.ui import tkui
> 
> temp = "some text"
> windowname = "new"
> 
> if not tkui.myui._windows.has_key(windowname):
>  tkui.myui._windows[windowname] = 
>tkui.NamedWindow(windowname, "", "")
> tkui.myui._windows[windowname].write(temp)
> 
> 
> This will open new window and display "some text". U can 
>write to this window with 
>tkui.myui._windows[windowname].write("your text")

There is a more simple way to do such a thing with the 
latest cvs snapshot I committed some time ago. You don't 
need to check if tkui is used.


   exported.write_message("some text", window="some new 
window name")

It's up to ui module to check if named windows are 
supported. If they are not, then the message will be 
written into the main window.

A user command for this:

   #wshowme {some new window name} {some text}

--
Eugene
---
Professional hosting for everyone - http://www.host.ru


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl