Declaring a mendix widget with a variable.

2
I was looking through the app store for some examples to create a custom widget and during my search i stumbled uppon the following construction in the calendar widget. dojo.provide("calendar.widget.calendar"); mendix.dom.insertCss(mx.moduleUrl('calendar') + 'widget/lib/fullcalendar.css'); var ___calendarsource = { .......} mendix.widget.declare('calendar.widget.calendar', ___calendarsource); mendix.widget.declare('calendar.widget.calendar_dv', ___calendarsource); delete ___calendarsource; The thing i am curious about is why was there chosen to use a variable for the widget instead of declaring it directly and what is the purpose of the 2nd declare if it is never provided?
asked
1 answers
1

It is an arbitrary choice of the developer that he puts it all in a variable and use that variable to pass to the declare function.

_dv looks like a developer version which is never removed. I guess it has been used with a different variable. If this _dv version is not published in an xml file it only consumes browser memory.

answered