|
|
|
Page 1 of 2 |
[ 16 posts ] |
1, 2 Next
|
![blue large dot](http://www.taultunleashed.com/img/homepage/bluelargedot.png) VB Plugin and TextBoxes : Developer's Corner
|
|
Posted: May 11th, 2004, 3:39 pm
|
|
|
|
Devestator
Devestator's Reps:
|
I wrote a vb plugin for something with a GUI that had two text boxes. After clicking a button on the GUI to do some things I loose the ability to type in the text boxes anymore.
Any clue as to why? The plugin isn't frozen I can still click the button as many times as I want. And it'll do what its suppose to. And I can set focus and get the cursor flashing in the text boxes but all keys from teh keyboard are ignored.
|
|
|
|
|
Posted: May 11th, 2004, 9:35 pm
|
|
|
|
Admin
Admin's Reps:
|
Check your objects. Make sure that you dont loose references to one of the objects by setting it to nothing, or also by causing an error in the plugin that is not handled.
|
|
|
|
|
Posted: May 12th, 2004, 6:09 am
|
|
|
|
Devestator
Devestator's Reps:
|
An unhandled error should crash the plugin no? And as for the objects the only time I'm setting them to nothing is in IXUPlugin_Terminate and I set all objects to nothing at the same time. The button on the form still works so I know it isnt going through terminate for some odd reason.
This is for my playerstat plugin that I'm working on here is the sequence that takes place.
The plugin loads all objects are set using myWindow.Control
Then nothing happens until the user clicks the only button on the GUI which is called searchButt.
When this is clicked it goes through sets a few global variables and then loads a form by calling a Navigate function in a browser on the form. (Actual vb form not GUI)
This form is never made visible though.
A timer is then enabled on this form.
Then it goes into a loop waiting on either the form to finish or the timer to expire (timer is in case the webpage that is being parsed is down).
On the form when the document finishes loading in the browser some actions are taking another Navigate is called
After the second page is completed it parses information out of it and lets the DLL class know its finished.
The class then applies the parsed information to the statictext fiels on the GUI and thats it.
I dont unload the form, but I tried doing that once to see if it was the problem and it didn't change anything.
The only thing I can figure is with that form loading even not becoming visible it is somehow stealing focus of the keyboard from XU and XU isn't reaquiring it. I'll post the code to it as is if you want and you can see for yourself exactly what it does.
|
|
|
|
|
Posted: May 12th, 2004, 11:59 am
|
|
|
|
Devestator
Devestator's Reps:
|
Oh yeah while I have your attention here admin, is there any way in a plugin to force XU to catch up and update? With me running that loop my message dont update until after the loop exits, VB's DoEvents has no effect. I know when scripting you just send the Sleep command but I dont see any form of Sleep command in the XU's plugin interfaces..
|
|
|
|
|
Posted: May 12th, 2004, 3:13 pm
|
|
|
|
Admin
Admin's Reps:
|
If it is a plugin, you can use the IXUWindow.Invalidate function to force a redraw.
|
|
|
|
|
Posted: May 12th, 2004, 4:14 pm
|
|
|
|
Devestator
Devestator's Reps:
|
Yeah I thought that would make sense to.. but it didn't work. Dosn't really matter though, if I dont figure out this problem with the editboxes I'm gonna have to redo the entire plugin anyway.
|
|
|
|
|
Posted: May 13th, 2004, 7:36 am
|
|
|
|
Devestator
Devestator's Reps:
|
I'm pretty convinced that my problem is the form loading in the background is stealing focus from XU. Its not just the editboxes on my plugin its all of XU dosn't listen to the keyboard anymore. If I pull up the triggers window I can't type into it's editboxes either.
Problems like this is why I asked last week about loading forms in the background hehe.
Oh well for now I guess I'll just have to work around it by creating virtual controls from the class, if thats possible.. I'll find out soon enough.
|
|
|
|
|
Posted: May 13th, 2004, 7:46 am
|
|
|
|
Admin
Admin's Reps:
|
Can you send me a sample plugin that does what you are talking about? Something I can test using the dx8 config?
|
|
|
|
|
Posted: May 13th, 2004, 9:26 am
|
|
|
|
Devestator
Devestator's Reps:
|
Here is the plugin I'm working on that has this problem. It also shows that IXUWindow.Invalidate does not force a redraw. I need to figure out a way to get rid of that loop all together but that'll come later when I fix the editbox problem.
<b>Download Attachment:</b> [url="http://xunleashed.dyndns.org:81/forum/data/Devestator/2004513122615_PlayerStatsPlug.zip"][img]images/icon_paperclip.gif[/img] PlayerStatsPlug.zip[/url]<br />19.61 KB
EDIT:
Well I was bored trying to figure out the editbox problem so I went ahead and figured out a way to get rid of the loop so the invalidate thing isn't an issue anymore.
|
|
|
|
|
Posted: May 13th, 2004, 9:09 pm
|
|
|
|
Devestator
Devestator's Reps:
|
Did you get a chance to look at this today Admin? I've got the plugin ready to go now except for the editbox problem. If I can solve that (maybe a function added to XU to force it to reaquire the keyboard?) then I can put the plugin up for download so others can make use of it =p.
|
|
|
|
|
Posted: May 13th, 2004, 9:24 pm
|
|
|
|
Admin
Admin's Reps:
|
Not yet. I'm finishing up a Read Memory demo script and some additions to the XUScriptHost plugin.
I'll take a peek here in about an hour.
|
|
|
|
|
Posted: May 18th, 2004, 4:42 am
|
|
|
|
Devestator
Devestator's Reps:
|
I dont want to keep bugging you admin cause I know your probably busy, but have you had a chance to look at this any yet? I wanted to release this plugin last week hehe.
If it can't be done then I'll just have to figure out some other way to do it. I havn't looked into it yet since I've been waiting to see if you can fix this, but I'm sure there is some way I can just download the pages straight to the harddrive and parse them there so that I dont have to use the webbrowser controls on the form.
|
|
|
|
|
Posted: May 18th, 2004, 8:12 am
|
|
|
|
Admin
Admin's Reps:
|
I started to look at it, but kept crashing when I clicked the Search button.
And maybe the plugin code I am looking at is old, but I could not find a place where you actually "instanced" the browser window. Ie, with a Dim myMain as New frmMain or whatever.
You might also have to add a myMain.load
So, yes and no. I could not get it running to test it.
|
|
|
|
|
Posted: May 18th, 2004, 9:47 am
|
|
|
|
Devestator
Devestator's Reps:
|
Crashing, hmm odd it never crashed for me on that compile. With a VB Plugin the form is loaded automatically when any reference is made to it or an object on it. So the frmMain.Browser.Navigate actually causes the form to load as well.
But I do have a newer version than that one that actually creates the form when the search button is clicked and destroys it when the search is completed. Had to do that in order to get rid of the loop by adding an event to the form that I could raise on the form and handle in the class.
It still has the same problem though, but I'll upload it so you can try with that version. And I just tested this compile it does not crash on my comp..
<b>Download Attachment:</b> [url="http://xunleashed.dyndns.org:81/forum/data/Devestator/2004518124724_PlayerStatsPlug.zip"][img]images/icon_paperclip.gif[/img] PlayerStatsPlug.zip[/url]<br />20.44 KB
|
|
|
|
|
Posted: May 18th, 2004, 11:12 am
|
|
|
|
Admin
Admin's Reps:
|
That worked. I was able to reproduce the problem. I'm checking now what could be causing it.
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 1 guest |
|
|
|