Skip to main content

DSP development: "#define", "Extended Trigger" and JavaScript

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, like Proc, I'm trying to #define constants for "Extended Triggers". Actually in the "Defines" I have this code: #define LC_LEAVEFLD=if ($fieldname!="") call my_local_procedure($fieldname,@$fieldname,"%%$entname%%%","","") And in the "Validate Trigger" of the Editbox widget I have: <LC_LEAVEFLD> What I want to obtain is to do the same for extended triggers which encapsulate JavaScript code: #define BLA_BLA = webtrigger onBlur                              javascript                                this.getDSPInstance().activate("LeaveFld", this.getName(), this.getValue());                              endjavascript                            end It's possible? Smartest ways, are welcome! Thanks all in advance Claudio

DSP development: "#define", "Extended Trigger" and JavaScript

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, like Proc, I'm trying to #define constants for "Extended Triggers". Actually in the "Defines" I have this code: #define LC_LEAVEFLD=if ($fieldname!="") call my_local_procedure($fieldname,@$fieldname,"%%$entname%%%","","") And in the "Validate Trigger" of the Editbox widget I have: <LC_LEAVEFLD> What I want to obtain is to do the same for extended triggers which encapsulate JavaScript code: #define BLA_BLA = webtrigger onBlur                              javascript                                this.getDSPInstance().activate("LeaveFld", this.getName(), this.getValue());                              endjavascript                            end It's possible? Smartest ways, are welcome! Thanks all in advance Claudio

Hello Claudio, You may do this with an include-proc:

; Extended trigger
#include MYLIB:LEAVEFIELD

Author: Philippe (philippe.grangeray@agfa.com)

DSP development: "#define", "Extended Trigger" and JavaScript

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, like Proc, I'm trying to #define constants for "Extended Triggers". Actually in the "Defines" I have this code: #define LC_LEAVEFLD=if ($fieldname!="") call my_local_procedure($fieldname,@$fieldname,"%%$entname%%%","","") And in the "Validate Trigger" of the Editbox widget I have: <LC_LEAVEFLD> What I want to obtain is to do the same for extended triggers which encapsulate JavaScript code: #define BLA_BLA = webtrigger onBlur                              javascript                                this.getDSPInstance().activate("LeaveFld", this.getName(), this.getValue());                              endjavascript                            end It's possible? Smartest ways, are welcome! Thanks all in advance Claudio

Philippe said Hello Claudio, You may do this with an include-proc:
; Extended trigger
#include MYLIB:LEAVEFIELD
  

Thanks Philippe, it worked. Sincerely, I dislike include-proc, it seem to hiding code to others developers. Often it's very difficult read the existing code in order to have an overview of all, but I know the 10 version it change under this view. Claudio


Author: Claudio (claudio.palladini@cortislentini.it)

DSP development: "#define", "Extended Trigger" and JavaScript

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, like Proc, I'm trying to #define constants for "Extended Triggers". Actually in the "Defines" I have this code: #define LC_LEAVEFLD=if ($fieldname!="") call my_local_procedure($fieldname,@$fieldname,"%%$entname%%%","","") And in the "Validate Trigger" of the Editbox widget I have: <LC_LEAVEFLD> What I want to obtain is to do the same for extended triggers which encapsulate JavaScript code: #define BLA_BLA = webtrigger onBlur                              javascript                                this.getDSPInstance().activate("LeaveFld", this.getName(), this.getValue());                              endjavascript                            end It's possible? Smartest ways, are welcome! Thanks all in advance Claudio

Hi Claudio, a compile with /LIS=2 will give you a complete codeview (including precompiler replacements) in the *.cptlst file The includes with all their levels are signaled by "[I1:" etc which is really helpful.


Author: ulrich-merkel (ulrichmerkel@web.de)

DSP development: "#define", "Extended Trigger" and JavaScript

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, like Proc, I'm trying to #define constants for "Extended Triggers". Actually in the "Defines" I have this code: #define LC_LEAVEFLD=if ($fieldname!="") call my_local_procedure($fieldname,@$fieldname,"%%$entname%%%","","") And in the "Validate Trigger" of the Editbox widget I have: <LC_LEAVEFLD> What I want to obtain is to do the same for extended triggers which encapsulate JavaScript code: #define BLA_BLA = webtrigger onBlur                              javascript                                this.getDSPInstance().activate("LeaveFld", this.getName(), this.getValue());                              endjavascript                            end It's possible? Smartest ways, are welcome! Thanks all in advance Claudio

Hi Claudio, You can also define code in Application Model Field Trigger or in Uniface Default Component (DSP -FRM-SVC) . The code will be visible/modify for all.  It depends on the level of heritage that yout want (see compile time constant too). 


Author: Gilles (gls.tools@free.fr)