Changing Deprecated Items in 2019r2

Is there a fast way to change all the “Open” Event Handlers to “Opening” in 2019 r2? Also changing “Action” to “Pressed”, and changing Radio Buttons to “ValueChanged”. Otherwise, if there’s no shortcut, will I have to change each one manually - a daunting task.

Save as XML or Xojo project, open them with a text editor such as Notepad++ on PC or TextWrangler on Mac, and use search and replace to transform “Open” in “Opening”, and “Action” in “Run” for timers and “Pressed” buttons.

If you never saved as Xojo Project or XML, create a folder to put all the files in. Contrary to binary projects, they create a wealth of files, for each window and classes.

You may want to proceed carefully, though. If you have classes that require “Open”, doing a global search and replace will break them. Likewise for “Action”. I would do it with search/Replace and find, rather. And after having set aside a copy for backup in case of blunder.

I think I found the documentation for doing what I want to replace events. False Alarm!

Yes, it would be great. A lot of work with this 2019r2, some of change are easy :
MyArray = spilt(MyString, “,”) --> MyArray = MyString.split(",")
Find/Replace "Dim " -> “Var” , “.append” -> “.addrow” , etc.
But some other will be longer: date, and as you mentionned, event name.

You can update each event name with right click. But it can be tedious with a big project.

Hello,

Just to make it clear because it wasn’t for me, now DIM I have to change to VAR or have some exception ?

no
DIM still exists
You will get a warning about it being deprecated if you analyze your project though

[quote=457253:@Norman Palardy]DIM still exists
You will get a warning about it being deprecated if you analyze your project though[/quote]

Thanks Norman, I’ll be aware and change only when really needed by default.

“dim” is NOT deprecated. Geoff said they are not to changing existing code. They are only going to write new code in API 2. I thought this pretty ridiculous - what do I know.

!!! Dim is depreciated, I hope not, I get plenty of seemingly pointless changes and depreciations, but I must confess Dim is not one of them that I have seen (in the many many that are listed).

ok just gone through a few thousand depreciated items in the last 20 minutes and Dim is not there, thankfully, unfortunately a whole load of other stuff is, nightmare.

edit, beaten to it!

11032 warnings…:frowning:

Goog luck.

Am I the only one to be annoyed with that small (far more than boring) report area at the Code Editor bottom ?

And we can’t copy its contents !

And it is not really usable (navigation through that area)…

A real and external window with all usual features (copy, search, etc.) is welcome. Don’t you think ?

This looks as if the development people (people at Xojo who use the IDE) do not used it, nor the beta testing persons… :wink:
Nota: this does not change since Xojo saws the light, six years ago.

I call this the ‘creaky door’ problem.
You get used to something that is not quite right, and stop thinking it can ever be changed.

This is human (unfortunately).

I searchu NotRunning without success. If MyThread.State = Thread.NotRunning tell me “NotRunning” is deprecated but I don’t find anything about that in the help. Exemple still use Thread.NotRunning .

[quote=457275:@Emile Schwarz]Goog luck.

Am I the only one to be annoyed with that small (far more than boring) report area at the Code Editor bottom ?

And we can’t copy its contents !

And it is not really usable (navigation through that area)…

A real and external window with all usual features (copy, search, etc.) is welcome. Don’t you think ?

This looks as if the development people (people at Xojo who use the IDE) do not used it, nor the beta testing persons… :wink:
Nota: this does not change since Xojo saws the light, six years ago.[/quote]
Have you submitted a feature request for this?

Use Thread.ThreadStates.NotRunning instead and please report the missing IDE help in a FR. Thank you. :slight_smile:

http://documentation.xojo.com/api/language/thread.html#thread-threadstate

Tanks Beatrix !

Thank you Sascha, I found the page you gave me and I didn’t read well as I didn’t see .ThreadStates .
Note : You didn’t quoted what I wrote, but you answered the question.

FolderItem.LastError code must be manage with Try - Catch now (or Exception Err), or did I misunderstand again?

I wrote a program some month ago and I took many time to write a Method to import contacts from AddressBook. And I see it is deprecated, and we can’t run the application, we have to remove all the Method which manage AddressBook?!
I am very very sad.

You are correct. It’s deprecated and you should use an IOException now. See here: IOException — Xojo documentation