wintin Forum Index wintin
Wintin Discussion Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

2.07 [window management] -- windows w/ the same name issue

 
Post new topic   Reply to topic    wintin Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Sun Feb 11, 2007 5:28 pm    Post subject: 2.07 [window management] -- windows w/ the same name issue Reply with quote

I was having an issue with my htmlwindow Map that shows the map for the area my C# speedwalk script targets. After doing some seemingly random number of speedwalks, subsequent uses of the script would cause focus to be stolen from the text entry box. I ended up getting in the habit of always hitting tab after executing the script to ensure focus was on the text entry area.

Sometime later I responded to this support request (BTW, you may want to log what you see in that thread as a bug too -- there seems to be no easy way to get rid of popups):
html popups

In coming up with a solution for the above issue I noticed that I had a number of my own old #htmlpop windows floating around, hidden but never deleted. One was also called Map just like my #htmlwindow. After clipping all of those extraneous popups out of my defaultwindow.wnd I don't seem to have the focus stealing issue anymore.

Anyway, I'm guessing multiple windows having the same name causes disambiguation issues for wintin.SendToWindow() or #sendtowin. Maybe the solution would be to require every window's name to be unique?
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Sun Feb 11, 2007 8:15 pm    Post subject: Reply with quote

Actually, I take it back. I'm still kind of having the focus stealing issue with the action for my auction monitoring script. It eventually SendToWindow()s to an #htmlpopup. After the script runs for a while it will sometimes seem to very briefly steal focus and if I'm typing at the time it wipes out what I had typed so far.

I'll see if I can narrow this down some more. Maybe I'll try wintin.Interpret(#sendtowin) to see if the issue occurs that way too.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Sun Feb 11, 2007 8:30 pm    Post subject: Reply with quote

Wait, maybe I'm blaming this new issue on the wrong thing. I have an action that sends a line return on a tick message.
Code:
#if {[$ignoreTick]=[0]} {#cr}
I'm almost positive that's what just caused this when it happened about a min ago.

I'll change that script to C# and try using SendToMud() instead.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Sun Feb 11, 2007 8:43 pm    Post subject: Reply with quote

Well, so far so good. The thing is this issue seems to be really intermittent. I tried to get it to happen on a few more ticks before switching to the C# version of the script and I couldn't reproduce it.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Sun Feb 11, 2007 10:24 pm    Post subject: Reply with quote

That wasn't it either.

It just seems that sometimes, intermittently, when my actions fire it has an effect similar to selecting everything in the text entry box (in that the next key-press will overwrite it all and continue on). I've never actually seen it select everything, so that may not be exactly what is happening, but what I do see is I'll be typing, an action fires, and suddenly all my text is gone and I'm typing my line from scratch.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Mon Feb 12, 2007 4:47 pm    Post subject: Reply with quote

It really seems to have something to do with when I wintin.SendToWindow() to an #htmlwindow or #htmlpopup. There's my Status #htmlwindow, my Map #htmlwindow and my Auction Watch #htmlpopup.

Maybe it's when more than one is updating at the same time and I'm also typing into the text entry area? Though I don't think that's it since I'm relatively sure I've seen it happen when only the Status window or the Auction Watch window were updated.

What I've just tried is unhooking and hooking the keyboard around the SendToWindow()s. So far it doesn't seem to effect my typing as I'd imagined it would. Now I'll see if I still have the clearing the text entry box issue.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Mon Feb 12, 2007 5:07 pm    Post subject: Reply with quote

^ The above unhook/hook started out fine, but eventually every Status #htmlwindow update caused focus to be taken from the text entry bar for good (until I clicked the text entry area to restore focus). It also seems unhooking/hooking the keyboard changes text entry behavior where before typing would jump focus to the text entry area, but not after the first unhook/hook (also TAB could no longer send focus there either).

I'll try making my html more "proper". Closing all tags, etc...
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Mon Feb 12, 2007 9:48 pm    Post subject: Reply with quote

I'm not having much luck coming up with a way of reproducing this directly. When I start mudding it doesn't happen at all and eventually it does get to a reproducible state. Which I suppose means the next step is for me to log my playing until it reaches that point, so that the replay can be used for debugging the issue (along with my scripts I'd imagine).

When I finally have this consistently reproducible I'll post again.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Tue Feb 13, 2007 8:04 pm    Post subject: Reply with quote

I finally have this reproducible! Shocked Very Happy

It actually seems this is an issue with <send></send> so since this thread is about a somewhat different problem (duplicate window names) I'll create a new bug topic.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Tue Feb 13, 2007 11:27 pm    Post subject: Reply with quote

Just wanted to add real quick that you should probably ignore what I said about unhook/hook. I'm assuming the behavior I was attributing to that was actually the <send> issue in my other thread.
Back to top
View user's profile Send private message
zephyr
Juggernaut


Joined: 08 Jan 2007
Posts: 145

PostPosted: Mon Mar 05, 2007 2:21 pm    Post subject: Reply with quote

Here's a link to a thread where someone else posts about experiencing the same window focus issues:
http://www.wintin.org/phpbb/viewtopic.php?t=655

Perhaps in their descriptions and mine, the extra details can help with debugging this.
Back to top
View user's profile Send private message
violetdream
Juggernaut


Joined: 24 Feb 2007
Posts: 46

PostPosted: Wed Mar 07, 2007 2:21 am    Post subject: Reply with quote

Hi, more addition to the focus stealing problem.

Restarting after putting in the status bars script seemed to work for a time, then died at a crucial moment. For now, I've just deleted the script and closed the window, which seems to have fixed the problem for now. HTML windows seem like something fun to play with but until this problem is fixed I'm going to stay away from it.

I can't read the windowconfig file very well so I can't tell if I have duplicates or not, I do have some things that say status but not sure if it's my HTMLpopup or not..
Back to top
View user's profile Send private message
william
Site Admin


Joined: 07 Dec 2003
Posts: 539

PostPosted: Mon Mar 12, 2007 9:46 pm    Post subject: Reply with quote

Zephyr thanks for this thread, and I will look at the problem, along with your other reports. Thanks for your contributions to the forum.

regards

William
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    wintin Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group