Jump to content
Sign in to follow this  
corz

Bug in UDF's, lots of them..

Fix the UDFs?  

  1. 1. Should UDFs control their own options?

    • Yes, that makes a lot of sense!
      0
    • No. There's a good reason it's done this way (I will explain below)
      0
    • No, it's better that thousands of people each painstakingly and individually troubleshoot their applications to arrive at the exact same solution.
      0


Recommended Posts

corz

I have to admit, I hardly use the UDF's (which is wrong, I know, but that's just me), but I thought I might try out something today. Oh dear!

I'm not going to name functions, nor names, but it wouldn't work, nay, it just messed everything up, until I did this..

AutoItSetOption("GUIOnEventMode", 0)
_SomeGroovyUDFFunction($my_edit_box)
AutoItSetOption("GUIOnEventMode", 1)

I realise that my experience of AutoIt is still limited, and I may be missing something obvious here, but it just seems like it would save a lot of frustration and wasted man-hours if the fix was applied right at source. This goes for tray modes, etc., etc.; anything the UDF needs.

Please put me straight, or otherwise!

;o)

(or


nothing is foolproof to the sufficiently talented fool..

Share this post


Link to post
Share on other sites
GaryFrost

I'm not going to vote, I hate these polls in threads.

If there are "Bugs" in the UDFs that are supplied with AutoIt install, we need to know about them.

We work diligently to fix bugs that are found.

It would help to point out the UDFs that you are referring to.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
corz

I use the word "bugs" to get folk here. It's probably as much a conceptual issue as any other. Though the end result is exactly the same; you drop the function in your application, and your application stops working.

I'd prefer not to name particular functions, because on looking, I can see that many are affected, but if you insist on an actual example, of course, I'll provide that. Is that necessary?

As for the poll, I hate them, too, but I figured it might be a good way for people to chime in whithout offending anyone - because all the big names are affected! :)

;o)

(or

[edit: actually, there's only a few in the official "released" UDF's - though many of the common UDF's here on-site also suffer]

Edited by corz

nothing is foolproof to the sufficiently talented fool..

Share this post


Link to post
Share on other sites
Jos

I use the word "bugs" to get folk here. It's probably as much a conceptual issue as any other. Though the end result is exactly the same; you drop the function in your application, and your application stops working.

I'd prefer not to name particular functions, because on looking, I can see that many are affected, but if you insist on an actual example, of course, I'll provide that. Is that necessary?

As for the poll, I hate them, too, but I figured it might be a good way for people to chime in whithout offending anyone - because all the big names are affected! :)

;o)

(or

You already have by stating it the way you did...

constructive ideas/criticism is welcome ... vague polls/proposals are going to lead nowhere ..

my 2 cents


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
big_daddy

You're not going to hurt anyone's feelings by pointing out a bug in their function.

Share this post


Link to post
Share on other sites
corz

"You already have by stating it the way you did... " <- I don't understand that, you quoted my whole post!

I don't think I'm being vague, just kind. I could easily look inside all my own common functions and see if they set options, and I figured I'd leave it at that. I was more interested in knowning if this behaviour was intentional or not. Okay then, a specific example..

_GUICtrlEdit_Find()

It sets the Event mode to 0 for its own purposes, which will break an application using event mode 1.

The Array degugging functions also do this.

These are just ones I've come across in the release UDFs. I haven't looked extensively, or checked for other types of options thjat functions might set, which would be just wasting my time if this behaviour was, in fact, intentional.

;o)

(or


nothing is foolproof to the sufficiently talented fool..

Share this post


Link to post
Share on other sites
GaryFrost

"You already have by stating it the way you did... " <- I don't understand that, you quoted my whole post!

I don't think I'm being vague, just kind. I could easily look inside all my own common functions and see if they set options, and I figured I'd leave it at that. I was more interested in knowning if this behaviour was intentional or not. Okay then, a specific example..

_GUICtrlEdit_Find()

It sets the Event mode to 0 for its own purposes, which will break an application using event mode 1.

The Array degugging functions also do this.

These are just ones I've come across in the release UDFs. I haven't looked extensively, or checked for other types of options thjat functions might set, which would be just wasting my time if this behaviour was, in fact, intentional.

;o)

(or

That's a beta not a release function, anyways, I've looked at both versions, and I don't see anywhere where the Event mode is set.

I personally don't much care for the OnEvent modes, so I don't use them, don't change them.

Now I may be overlooking what you are talking about, and If that is the case I gladly look at changing that, I have no desire to set the event mode.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
big_daddy

That's a beta not a release function, anyways, I've looked at both versions, and I don't see anywhere where the Event mode is set.

I personally don't much care for the OnEvent modes, so I don't use them, don't change them.

Now I may be overlooking what you are talking about, and If that is the case I gladly look at changing that, I have no desire to set the event mode.

I understand what he is saying. The function he pointed out is using a message loop, but if the OP is using "OnEventMode" the function will fail. As he has already stated the proper way to handle this would be to save the OP's mode setting, set event mode to false, then restore the saved setting before returning.

Share this post


Link to post
Share on other sites
corz

Well, it does this..

$msgFind = GUIGetMsg()

So it *should* be setting the event mode, no?

At any rate, it's likely that line which messes things up if the calling app is running in event mode 1.

Specifically, GUIGetMsg() will always return zero, and you will lose control of the window.

You might be able to kill the app if you right-click the tray icon, if it has one.

The code in my first post fixes the issue.

My suggestion from the first post fixes it better.

;o)

(or


nothing is foolproof to the sufficiently talented fool..

Share this post


Link to post
Share on other sites
corz

Right, BD!

;o)

(or


nothing is foolproof to the sufficiently talented fool..

Share this post


Link to post
Share on other sites
corz

Your incredible contribution to AutoIt is beyond question, GaryFrost.

Change is inevitable!

I ignorantly assumed that GUIGetMsg() would implicitly set the event mode, but as I was reading the manual (so that I could be specific in my earlier reply) I discovered that it did no such thing, though of course, the end result is the same.

I'm glad to be of help! :)

;o)

(or


nothing is foolproof to the sufficiently talented fool..

Share this post


Link to post
Share on other sites
big_daddy

Easy enough to fix that's 1 out of thousands of functions so far.

I did a search for "GUIGetMsg" on the latest beta includes directory and came up with two results.

_ArrayDisplay() which already utilizes the proposed fix, and _GUICtrlEdit_Find().

Share this post


Link to post
Share on other sites
GaryFrost

I did a search for "GUIGetMsg" on the latest beta includes directory and came up with two results.

_ArrayDisplay() which already utilizes the proposed fix, and _GUICtrlEdit_Find().

There is an update that has been submitted to fix the problem in the GuiEdit.au3 along with some other fixes in the UDFs.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
corz

If only Microsoft responded to bugs this quickly!

;o)

(or


nothing is foolproof to the sufficiently talented fool..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×