Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories Scripting
Created by Guest
Created on Apr 25, 2017

Enhance Scripting Default Options to Show Dialog box when Application is Not Responding

Problem: (version 7.6) When a report has a longer running ironpython, the Spotfire application goes into a windows (Not Responding) state. Windows then displays a dialog box prompting the user to Close the Application or Wait for the Program to respond. To the user this could be seen as a crash or an error with the report, however, its just trying to do some work in the background. 

 

Solution: Tibco support was able to provide to me a snippet of code from Spotfires own API for displaying essentially a "Working/Processing" custom dialog box. With this code the application no longer prompts the user with the confusing dialog box. The application also gracefully locks the application until its process is done. (See code example below idea)

 

My idea is to have this be a default function of all scripting of this nature. If not by default it should have the checkbox option so that this special bit of code no longer needs to be added to all ironpython scripts that may cause the application to go unresponsive. 

 

 

 

Code Example: 

===================

from Spotfire.Dxp.Framework.ApplicationModel import ProgressService

def doStuff():

              # do stuff...

             return

progressService = Document.GetService(clr.GetClrType(ProgressService))

progressService.ExecuteWithProgress("The title", "The description", doStuff)

===================================

 

Note that "Execute in Transaction" needs to be unchecked for progress to work so any transaction handling needs to be added manually

  • Attach files