Sign in to follow this  
Followers 0
GEOSoft

Renamed UDF's

6 posts in this topic

I can't say that the help file is overly clear on a couple of points.

here is the first one that I need an answer to.

On the help file UDF's Renaming page Under the Column Old, we have _GUICtrlListViewFindItem and under New it is _GUICtrlListView_FindInText. Good so far. Now we come to the Remarks column (Normaly used to say what the change is) it just lists

_GUICtrlListView_FindInText

_GUICtrlListView_FindNearest

_GUICtrlListView_FindParam

_GUICtrlListView_FindText

It does not say what the changes are so I'm assuming that it means that all four items in the remarks column are simple renames to _GUICtrlListView_FindInText but there is nothing to indicate that positively. Could someone either verify this of set me straight?

Hopefully I'm correct because it makes the replacement easy.

I know someone will have the answer because the devs are a great crew </suck-holing>

TIA


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Well since no one seems to have the answer, I'll try this question.

What was the last version that used the old function names? I'll pull it from archives and start some major comparing.

Thanks


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Well since no one seems to have the answer, I'll try this question.

What was the last version that used the old function names? I'll pull it from archives and start some major comparing.

Thanks

Sorry George my system had crashed, so I've been busy.

Actually the old function is replace with all those functions, it is not all rolled into one function like it used to be.


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

Sorry George my system had crashed, so I've been busy.

Actually the old function is replace with all those functions, it is not all rolled into one function like it used to be.

Thanks for the reply Gary.

That will confuse the issue a bit. I guess I will have to figure out how I'm going to create a new function to replace the old one. I'm assuming that is not already done in _GUICtrlListView_FindInText but I will look closer at it.

This is for part of my script updater and I would hate to be wrong on it when changing the function call in the users script.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

George, an automatic script updater sounds nice but I don't trust one completely. An updater which prints out things that are out-dated and recommends what change should be made would be cool. I guess a semi-automated updater is what I'm talking about. There are just so many things which call for the code to be reviewed. Take, for example, StdoutRead(). Sure, it's certainly possible to update all the old calls to the new syntax, however, the function behavior has also changed which facilitates more changes than just a syntax difference. The code can be simplified now that user's don't have to guard against accidental deadlocking in their scripts. I'm thinking the way most registry cleaners work would be cool. You can choose to just let it do it's thing, or you can review each change manually and take the recommended fix or fix it manually by opening the editor to the correct location.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

George, an automatic script updater sounds nice but I don't trust one completely. An updater which prints out things that are out-dated and recommends what change should be made would be cool. I guess a semi-automated updater is what I'm talking about. There are just so many things which call for the code to be reviewed. Take, for example, StdoutRead(). Sure, it's certainly possible to update all the old calls to the new syntax, however, the function behavior has also changed which facilitates more changes than just a syntax difference. The code can be simplified now that user's don't have to guard against accidental deadlocking in their scripts. I'm thinking the way most registry cleaners work would be cool. You can choose to just let it do it's thing, or you can review each change manually and take the recommended fix or fix it manually by opening the editor to the correct location.

Good points Valik and the more I'm looking at particular calls the more I'm thinking that I'll do it this way

I first do just the simple name changes. That is just the one where only the name changed and te functionality, params and returns are the same. That is the quick part.

Then I will do the look for the ones that change name and perhaps switch parameters. When it finds one, A GUI pops up detailing the differences and asking if you wish to continue. The GUI would have Yes and No buttons and a "Remember This Decision" checkbox (ini file required). No matter what the choice is here, it will write to a log of potential problems. The reason this will be used is because in most cases, the parameters that changed position are invariably optional and normally the last two (not always). If the user has chosen to use the defaults then a name change will not harm anything. On all the ones like the function I referenced in the first post, no change will be made but it will be entered into the log file and probably a comment in the script where the Function call is found. Similar to the way Tidy comments a script. The same will apply to the ones where the return value has changed.

I think in the case of major script-breaking changes, like we just went through, it's safe to assume that someone will try to automate the process and whoever makes said changes should bear that in mind when they do it. In other words, stop and think of whether or not switching the order of two parameters is really required for functionality.

I wrote a similar script way back when the GUI commands went from GUISetControl(<type>,... to GUICtrlCreate<type>(, and although there were still manual changes to make later I managed to keep them to a minimum and I don't remember any that actually gave me a major problem after the conversion. Personally I have just too many scripts to go through and check each one manually and that's why I write converters similar to the one I did a few days ago to correct the list of files to #include.

Let me know what you think about doing it as outlined above.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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  
Followers 0