Issues in uploading files in using Button

17 views
Skip to first unread message

pritam saha

unread,
Jun 15, 2021, 10:45:16 AMJun 15
to cytoscape-app-dev
Hi ,
I am working on developing a Cytoscape app for visualizing the output of the Casual-Path Algorithm for the GSoC 2021. 

Now, I am trying to use a button that will upload a network file from the local user directory. I have created the task which will load the file from the network.  

The code is here which I am using to upload the network file. 

And I have created a task iterator for this task and used a dialog task manager to execute the task. 
The code is which I have used for this. 

But the run Method in the task is not getting called but this task manager. 

Please help me out with this. 
I also apologize for not rephrasing the question properly.

Thanks
Pritam Saha

Scooter Morris

unread,
Jun 17, 2021, 11:49:42 AMJun 17
to cytoscape-app-dev
Hi Pritam,
   First, you absolutely shouldn't try to create your own DialogTaskManager.  You need to get the DialogTaskManager from Cytoscape by using getService.  Second, you need to be a bit careful using a DialogTaskManager from within a CyAction since it could lead to a deadlock.  You might be able to use a SynchronousTaskManager, however.  My suggestion would be to avoid use of CyAction, and implement your "CreateLegend" code as an AbstractTask, then you can just add your ImportVisualStyleTask to the current TaskIterator using insertTaskAfterCurrentTask.

-- scooter

pritam saha

unread,
Jun 21, 2021, 4:28:57 PMJun 21
to cytoscape-app-dev
Hello Scooter ,

Thank you for the information you provided. I am able to import files with different extensions  using buttons from the local drive.

Thanks,
Pritam

Reply all
Reply to author
Forward
0 new messages