Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder Public Beta Tests » View Thread |
Messages 1 to 2 of 2 total |
overload on methods |
Mon, Mar 16 2020 10:48 AM | Permanent Link |
erickengelke | Good work on all the improvements.
One challenge I ran into is using external classes. In version 2 we used to be able to say: Externfn = function( x : variant ) of object; And then the JavaScript could pass an array or some other value as the x variant. But you are more strict now. That’s fine, but I think we now need ‘overload’ so we can declare all the possible parameter lists: Externfn = function( x : variant ) of object; Externfn2 = function( x : array of variant ) of object; Function then( x : Externfn ); Function then( x : ExternFn2 ); overload; EWB doesn;’t appear to have the overload capability yet, as far as I can tell. Keep up the great work. EWB Programming Books and Component Library http://www.erickengelke.com |
Mon, Mar 16 2020 5:07 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Erick,
<< Good work on all the improvements. >> Thanks ! << In version 2 we used to be able to say: Externfn = function( x : variant ) of object; And then the JavaScript could pass an array or some other value as the x variant. But you are more strict now. >> You should still be able to pass whatever as the parameter. Perhaps the issue you're seeing is in how the event (method) types are resolved for assignment purposes (event property = method) ? << EWB doesn;’t appear to have the overload capability yet, as far as I can tell. >> EWB has always been able to overload methods/functions/procedures. You don't need the overload keyword because the EWB compiler can figure out which routines are the same and which are different by their parameter lists: https://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=Methods under "Overloaded methods": "Other variants of Object Pascal require that you use the overload keyword to indicate that a method is overloaded. Elevate Web Builder does not use the overloaded keyword because it is unnecessary. The compiler knows if two methods have the same declaration, and will issue an error if they do. The compiler also knows how to find the proper method declaration, or whether one exists at all, by how the method is called. Finally, if an overloaded method has one or more declared versions that aren't actually called, the compiler knows this and will not emit the method during compilation." Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, December 5, 2024 at 09:15 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |