SlicerMorph / SlicerEditor

a simple programming editor for Slicer based on monaco
BSD 2-Clause "Simplified" License
4 stars 1 forks source link

Save As (scene save), tries to save the editor file as a txt file #44

Open muratmaga opened 3 weeks ago

muratmaga commented 3 weeks ago

This is confusing, since this is not a text object. It should save as .py (or at least allow the user to specify the extension).

image

pieper commented 3 weeks ago

@oothomas - probably this can be addressed with the custom fileio plugin. Let me know if you hit a roadblock on that.

muratmaga commented 3 weeks ago

To be clear, custom file writer works for Export File in subject hierarchy but doesnt seem to be registered/recognized for Save as.

I believe @oothomas got stuck figuring out why.

pieper commented 2 weeks ago

It may be necessary to make a C++ node type to make all features work on nodes that contain scripts seamlessly. It's not a lot of work but it adds some complexity.

Probably we should come up with a priority ranking scheme for features and bugs vs the effort required and the benefit to users - we could use the labels feature of github to track them.

muratmaga commented 2 weeks ago

I agree a set of priorities is important, since this is quite a side project for us.

Embedding the script into the scene was the primary motivator of development of this extension. And currently that functionality does not function correctly (save as saves it as text node, export as saves is a py). I think we should probably fix that first, followed by better integration of sending code to python console.

Beyond that I am inclined to leave the feature additions to the community.