go to post Anna Golitsyna · Sep 25 From AI: Yes, it is possible to call a dialog with a single input text field in the UserAction method in a class that extends %Studio.Extension.Base. Here’s how it works: Inside the UserAction method, you can set the Action parameter to 7. This tells Studio to display a dialog box with a textbox and Yes/No/Cancel buttons. You can use the Target argument to provide the dialog text, and the Msg argument to set the initial text in the textbox. After the user interacts with the dialog, their input can be processed in the AfterUserAction method 1. For example: Method UserAction(Type As %Integer, Name As %String, InternalName As %String, SelectedText As %String, ByRef Action As %String, ByRef Target As %String, ByRef Msg As %String, ByRef Reload As %Boolean) As %Status { If Name="SourceControl,DialogWithTextField" { Set Action = 7 Set Target = "Enter your input:" Set Msg = "Default Text" } Quit $$$OK } In the AfterUserAction method, you can handle the user’s response: Method AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String, ByRef Reload As %Boolean) As %Status { If Answer = 1 { Write !, "User entered:", Msg } Quit $$$OK } Ensure that this class is registered as the source control class for the namespace if required 1.
go to post Anna Golitsyna · Aug 12 It is very verbose but yes, I got it working now too. Thanks, Robert! It is interesting that the resultant file lists only routine names but not the labels. Instead of a label name, it lists the label line number.
go to post Anna Golitsyna · Aug 11 Thanks, Robert. It is available in 2017, but I was not able to set it up yet. Something is still wrong the way I run it, please see below. I start debugging, stop at a breakpoint and input the $J value.%SYS>D DIR^TRACE() %SYS>D ^TRACE TRACE utility for Cache. You can signal a process to write a record of allprocedure, function, or subroutine calls to a file. Then use this utility tointerpret and display the trace. The trace file is named: CacheTrace_'pid'.txt Use $$DIR^TRACE(dir) to set the directory where the file(s) should be written(process must have create/write access to the directory). $$DIR^TRACE() returnsthe current directory for trace files. Use $$ON^TRACE(pid) to start the trace and $$OFF^TRACE(pid) to end therecording. Then just run ^TRACE to see the results. Process ID for trace file: 5352Output to: <0> TestAG.txt Processing file ... -1,Unable to open file CacheTrace_5352.txt%SYS>
go to post Anna Golitsyna · Aug 8 Thanks, Stuart. Correct me if I am wrong but I would need to install such a function in multiple places and that's exactly what I am trying to avoid. I did use $STACK in less involved situations before and it is very useful in its own right.
go to post Anna Golitsyna · Aug 8 Thanks, Timo. I used this profiling utility before and it's very good for its purposes but now I am interested in sequence of function calls and MONLBL does not provide that.
go to post Anna Golitsyna · Aug 7 As far as I understand, this is to examine the stack in a predetermined piece of code. I have used it in this capacity as well, but now I'd like a recording without explicitly calling stack in each involved function.
go to post Anna Golitsyna · Jul 9 Very good and customizable TRY {s ex= ##class(%Exception.General).%New("test",1,data1,data2) throw ex}CATCH ex {d ex.Log()}
go to post Anna Golitsyna · Jul 3 I have a GCMP crash when trying to compare two globals. Perhaps my input to prompts is not 100% correct. Could you or anyone else post an example of prompt answers?
go to post Anna Golitsyna · Jun 9 Thanks a lot everybody for your input. I need a bit more time to mark your replies as answers but I will do that.
go to post Anna Golitsyna · Jun 3 Yes, I use that too occasionally. I think Portal functionality is faster though.
go to post Anna Golitsyna · Jun 3 Thanks a lot! I successfully tested both and one correction: the date is not in MUMPS format. It works with the 06/03/2025 format though.
go to post Anna Golitsyna · Apr 12 I did not try it myself, but I talked to other people and searched more, and it seems that using VS Code (as opposed to Iris/Cache Studio) combined with Copilot is currently the best available way of incorporating AI into ObjectScript/MUMPS coding: Coding InterSystems ObjectScript with AI Copilot. @Evgeny Shvarov, would you agree? Would you like to add anything on the discussion subject?
go to post Anna Golitsyna · Feb 5 I will have time to prepare such a snippet tomorrow, sorry. Meanwhile, it's not necessarily one line off but up to several lines off, a few routines only. In your code, is it possible to extract text of the line for which tokens are calculated? I looked around and did not see such a possibility.