I’m working on (almost finished actually) a plugin for one of my large solutions which is being updated from Servoy 4 to Servoy 5. As you probably know, there is a lot of method re-work that must be done because of the new JSEvent object being passed in as the first argument on all buttons and events. So, this plugin will scan your solution and give you a print out, grouped by form, of all the methods in your solutions which are referenced by any button or event. Wanted to check with the Servoy community here and see if anyone else would be interested in the plugin, or in beta testing the plugin.
Any chance it would work from Servoy 3.5 to 5?
Sounds very good!
Dean Westover
Choices Software, Inc.
Yes, you could also get that to work. Just upgrade the solution to 5 first (using standard upgrade process), then run the plugin on the solution in version 5 and it will give you the appropriate output to tell you what you need to change.
We will can absolutely use that. Thank you…
too late for me, but just in case you’d need that, most of the errors could have been removed automatically in my case.
based on 2 migrations from 3.5 to 5:
- large amount of errors of value lists while there was no error, opening and re-save was enough, so could probably be fixed by finding the null element in this?
- large amount of elements outside forms: this was legal before, so an option to simply extend the form to match the included elements bounding box.
- large amonts of combos based on non custom value_lists set as editable: could be changed automatically?
the 3 reasons cleared 90% of the errors.
And about JSEvent, maybe just a stupid thought, but how about creating an extra method for each button which would then call the original method, getting rid of the argument this way? Exception: if a getMethodTriggerElement/FormName is found in the method.
Nice !!!
I would like to beta-test it.
I am in the middle of an upgrade.
Regards,
Scott, will this be commercial?
I’m happy to test it…
I could do some testing as well.
I could test it too,
thanks for your job
Me too…
Thanks for all of the responses. I’m going to try something a little different for this one. I’ve managed to rewrap the code into a module. The component is being offered free for non-commercial applications, and is $199 for commercial applications. We’ll see how well the honor policy works here)
I’m also offering a special that includes the upgrade assistant, and 10 hours of consulting/development to upgrade your application for only $799.
More information and download link at: http://www.itechprofessionals.com/servo … stant.html
Hi Scott,
what is this solution doing more than what Servoy itself already does?
in the problem-view you also see which methods are reflected with the new JSEvent Object…
I’m not seeing the picture here
Hi Scott,
I have tested it on the solution i am working on.
After pushing the run button, I can see that something is starting ( cursor activity )
and i see some output in the console, but it does not open a report !!
Is there some way I can see why it stops ??
( 5.1 production and oracle database)
Regards,
Hi Scott
goldcougar:
… because of the new JSEvent object being passed in as the first argument on all buttons and events.
Please no confusing again (we had it already at ServoyCamp), the JSEvent is logically the LAST (really, the LAST) argument being passed in, even if it looks to you as the first!
If it looks to you as a first argument, it just means you have no other argument(s), that’s all, but it’s logically still the last, as it is ALWAYS the last argument.
And hey, we are programmers, where logic matters .-)
Regards, Robert
Robert Huber:
Please no confusing again (we had it already at ServoyCamp), the JSEvent is logically the LAST (really, the LAST) argument being passed in, even if it looks to you as the first!
If it looks to you as a first argument, it just means you have no other argument(s), that’s all, but it’s logically still the last, as it is ALWAYS the last argument.And hey, we are programmers, where logic matters .-)
Regards, Robert
Actually not true. the JSEvent is passed in as the first argument on all onAction events. So, if you previously had a method, lets call it “doSomething” and that method was already taking in arguments (lets say the first argument was some id or something), then that would now break since the JSEvent is being passed in from the button. Which means you must rework the arguments to make the JSEvent the first argument. Which also means you must rework ALL methods that are calling “doSomething” because now the argument order has changed. This is essentially a problem for solutions where a button onAction event was also being used with arguments and being called directly from other methods.
To answer the other question about what is different, there are 2 main things
- This gives you a report of just those events that need changing, instead of grouping all sorts of changes together. More of a convenience factor
- I’m working on adding the latter part of what I described above into the module. So, it will show you all places also calling the methods which are getting changed. And working on make it a little more sophisticated so it only shows you methods which reference the arguments array, as those are the only ones needing modification.
Hans Nieuwenhuis:
Hi Scott,Is there some way I can see why it stops ??
Regards,
Can you take a look in your temp directory, and see if it created an HTML file?
Hi Scott,
I do not see a html file in temp.
b.t.w. i am on windows 7
it stops in globals._run in the loop below, it never gets past this for statement.
for (var i = 0; i < bb.length; i++) {
application.output('P\u0072\u006f\u0063es\u0073ing: ' + bb[i]);
cb(bb[i]);
}
Regards
Embarassing, I missed the context with my reply, I should be able to read correctly
goldcougar:
Actually not true. the JSEvent is passed in as the first argument on all onAction events. …