From b5863d9cad3e6f6f6507ef8fe0b768efc9579910 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 24 Aug 2006 16:32:58 +0000 Subject: [PATCH] use gui.Dialog() class instead of gui.loadXMLDialog() function (which has been removed) --- Nasal/lead_target.nas | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Nasal/lead_target.nas b/Nasal/lead_target.nas index 7bc335382..dd01f4c58 100644 --- a/Nasal/lead_target.nas +++ b/Nasal/lead_target.nas @@ -402,12 +402,17 @@ LeadTargetUpdate = func { select_task_dialog = func { - var dlg = props.globals.getNode("/sim/gui/dialogs/NTPS/config/dialog", 1); - gui.loadXMLDialog(dlg, "gui/dialogs/NTPS_target_task.xml"); - fgcommand("dialog-show", dlg); + dialog.load(); # load every time? + dialog.open(); } +var dialog = nil; +settimer(func { + dialog = gui.Dialog.new("/sim/gui/dialogs/NTPS/config/dialog", "gui/dialogs/NTPS_target_task.xml"); +}, 0); + + # timer handling to cause our update function to be called periodially registerTimer = func { settimer(LeadTargetUpdate, update_period );