Skip to content

Commit 1c60304

Browse files
committed
Widget callbacks based on type, separate processing for textMeter, comboChart
1 parent 8e76dc9 commit 1c60304

1 file changed

Lines changed: 35 additions & 13 deletions

File tree

MDX2JSON/Dashboard.cls.xml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,8 @@ Converts relevant parts of %DeepSee.Dashboard.Widget object into %ZEN.proxyObjec
165165
do:$IsObject(control) obj.controls.Insert(control)
166166
}
167167
168-
if Widget.subtype = "comboChart" {
169-
set obj.seriesTypes = ##class(%ListOfDataTypes).%New()
170-
for i=1:1:Widget.dataSeries.Count()
171-
{
172-
do obj.seriesTypes.Insert(Widget.dataSeries.GetAt(i).type)
173-
}
174-
175-
set obj.overrides = ##class(%ListOfObjects).%New()
176-
do {
177-
set overridestr = Widget.overrides.GetNext(.key)
178-
do ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(overridestr,,.override,1)
179-
do:$IsObject(override) obj.overrides.Insert(override)
180-
} while key'=""
168+
if ##class(%Dictionary.CompiledMethod).%ExistsId("MDX2JSON.Dashboard||Process"_Widget.subtype) {
169+
do $ClassMethod("MDX2JSON.Dashboard", "Process"_Widget.subtype, Widget, obj)
181170
}
182171
183172
if (Widget.properties.Count()>0) {
@@ -192,6 +181,39 @@ Converts relevant parts of %DeepSee.Dashboard.Widget object into %ZEN.proxyObjec
192181
]]></Implementation>
193182
</Method>
194183

184+
<Method name="ProcesscomboChart">
185+
<ClassMethod>1</ClassMethod>
186+
<FormalSpec>Widget,Obj:%ZEN.proxyObject</FormalSpec>
187+
<Implementation><![CDATA[
188+
set Obj.seriesTypes = ##class(%ListOfDataTypes).%New()
189+
for i=1:1:Widget.dataSeries.Count()
190+
{
191+
do Obj.seriesTypes.Insert(Widget.dataSeries.GetAt(i).type)
192+
}
193+
194+
set Obj.overrides = ##class(%ListOfObjects).%New()
195+
do {
196+
set overridestr = Widget.overrides.GetNext(.key)
197+
do ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(overridestr,,.override,1)
198+
do:$IsObject(override) Obj.overrides.Insert(override)
199+
} while key'=""
200+
]]></Implementation>
201+
</Method>
202+
203+
<Method name="ProcesstextMeter">
204+
<ClassMethod>1</ClassMethod>
205+
<FormalSpec>Widget:%DeepSee.Dashboard.Widget,Obj:%ZEN.proxyObject</FormalSpec>
206+
<Implementation><![CDATA[
207+
set Obj.dataProperties = ##class(%ListOfDataTypes).%New()
208+
for i=1:1:Widget.dataProperties.Count()
209+
{
210+
set dataProperty = ##class(%ZEN.proxyObject).%New()
211+
do Widget.dataProperties.GetAt(i).%CopyTo(dataProperty)
212+
do Obj.dataProperties.Insert(dataProperty)
213+
}
214+
]]></Implementation>
215+
</Method>
216+
195217
<Method name="WidgetControlToProxyObject">
196218
<Description>
197219
Converts %DeepSee.Dashboard.Control object into %ZEN.proxyObject, handles run-time DeepSee variables.</Description>

0 commit comments

Comments
 (0)