Skip to main content

#uniface-10 #web #solved

I have a form component with an HTML widget, designed to be a 'wrapper' for DSP content in my application. (We are trying to shift our CS to browser, but it's going to have to be hybrid from some time yet...)
And a dsp to go with it. 

In the DSP I have defined 

weboperation doquit
;Called by wrapper quit program
javascript
window.unifaceTriggers("web_quit")
endjavascript
end​

which shows in the dspjs/component.js file as 

,
doquit:function(){
 window.unifaceTriggers("web_quit")
}
Which seems okay. 
When I try to trigger this from the component using :-
$fieldhandle(d_html)->$widgetoperation("JS:doquit")​

With the 'inspect' function running, I can see the doquit function in the sources, but it gives the error 

VM712:1 Uncaught ReferenceError: doquit is not defined
    at <anonymous>:1:1

As does trying to run doquit() from the console 
Running window.unifaceTriggers("web_quit")  from the console, correctly activate a trigger on d_html (and closes the program). 
What have I missed in the definition of or call to doquit?
I've tried it defined as weboperation and webtrigger. 

Thanks
Iain

​​ ​

------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
​​​​

#uniface-10 #web #solved

I have a form component with an HTML widget, designed to be a 'wrapper' for DSP content in my application. (We are trying to shift our CS to browser, but it's going to have to be hybrid from some time yet...)
And a dsp to go with it. 

In the DSP I have defined 

weboperation doquit
;Called by wrapper quit program
javascript
window.unifaceTriggers("web_quit")
endjavascript
end​

which shows in the dspjs/component.js file as 

,
doquit:function(){
 window.unifaceTriggers("web_quit")
}
Which seems okay. 
When I try to trigger this from the component using :-
$fieldhandle(d_html)->$widgetoperation("JS:doquit")​

With the 'inspect' function running, I can see the doquit function in the sources, but it gives the error 

VM712:1 Uncaught ReferenceError: doquit is not defined
    at <anonymous>:1:1

As does trying to run doquit() from the console 
Running window.unifaceTriggers("web_quit")  from the console, correctly activate a trigger on d_html (and closes the program). 
What have I missed in the definition of or call to doquit?
I've tried it defined as weboperation and webtrigger. 

Thanks
Iain

​​ ​

------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
​​​​
Hi Iain,

DoQuit() operation is defined in a DSP instance.

You must try to use : $fieldhandle(d_html)->$widgetoperation("JS: uniface.getInstance('YOURDSP').activate('doquit')")

Gilles.

------------------------------
Hortion Gilles
Agfa-Gevaert NV
------------------------------
Hi Iain,

DoQuit() operation is defined in a DSP instance.

You must try to use : $fieldhandle(d_html)->$widgetoperation("JS: uniface.getInstance('YOURDSP').activate('doquit')")

Gilles.

------------------------------
Hortion Gilles
Agfa-Gevaert NV
------------------------------
That does the trick. Seems a bit long-winded, but now I know how it's a matter of adding them to the template(s) *cough* modeled components.

------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------