I don´t know how to solve this a warning :
example
var popupmenu = plugins.window.createPopupMenu()
var menuitem1 = popupmenu.addMenuItem(‘Print’,imp_agend_event_frm,null)
var popupmenu = plugins.window.createPopupMenu()
var source = event.getSource()
if (source!=null) popupmenu.[u]show/u;
Warnig
The method show(RuntimeComponent,Number,Number) in the type Popup is not applicable for the
arguments (Object)
How to avoid or suppress this warning:
I know the Tag @SuppressWarnings but I cannot used for that case.
example
forms[myForm].form_field
Warning
The property form_fieldis undefined for the type Form
I
Juan Etec:
I don´t know how to solve this a warning :
example
var popupmenu = plugins.window.createPopupMenu()
var menuitem1 = popupmenu.addMenuItem(‘Print’,imp_agend_event_frm,null)
var popupmenu = plugins.window.createPopupMenu()
var source = event.getSource()
if (source!=null) popupmenu.[u]show/u;
Warnig
The method show(RuntimeComponent,Number,Number) in the type Popup is not applicable for the
arguments (Object)
How to avoid or suppress this warning:
I know the Tag @SuppressWarnings but I cannot used for that case.
example
forms[myForm].form_field
Warning
The property form_fieldis undefined for the type Form
Hi Juan, create a JSDoc for source.
Hi Juan,
I don’t understand what do you want to say to me.
I put for the first example the event in the JSDOC (* @param {JSEvent} event), but when you declare the variable ‘source’ it take the type Object and not RuntimeComponent.
example
var popupmenu = plugins.window.createPopupMenu()
var menuitem1 = popupmenu.addMenuItem(‘Print’,imp_agend_event_frm,null)
var popupmenu = plugins.window.createPopupMenu()
var source = event.getSource()
if (source!=null) popupmenu.show(source,null,null);
Warnig
The method show(RuntimeComponent,Number,Number) in the type Popup is not applicable for the
arguments (Object,Number,Number)
and for the second example is difficult to put a proper param because you can pass any form who can have any field.
example
forms[myForm].form_field
Warning
The property form_fieldis undefined for the type Form
Thanks
Sorry Juan I did not explain myself because I was answering from my iPhone and it´s not easy to type with my big fingers.
var popupmenu = plugins.window.createPopupMenu()
var menuitem1 = popupmenu.addMenuItem('Print',imp_agend_event_frm,null)
var popupmenu = plugins.window.createPopupMenu()
// Next line will avoid the warning
/** @type RuntimeComponent */
var source = event.getSource()
if (source!=null) popupmenu.show(source,null,null);