Pesquisar

Pergunta
· Nov. 6, 2024

VSCode auto complete and show class methods while typing

So being forced to use VSCode out of the box for a new Community install I've hit a small problem, documentation hasn't helped and its a simple problem.

How do I enable auto complete and the property viewer in creating a new .MAC?

 

So I've created "test.mac" and 'assume' can't remember the method name to open a file (for example), typing

"s f=##class(%Library.File).   " in Studio would bring up the methods of %Library.File so I could click the appropriate one, VSCode does not do this (and also didn't show the classes under %Library).

Please don't reply telling me how to open a new file :-), I'm looking for how to enable the property/method viewer while typing.

 

The constant VSCode colours everywhere are like being stuck in a psycodelic firework display.

5 Comments
Discussão (5)2
Entre ou crie uma conta para continuar
Pergunta
· Nov. 6, 2024

Stream Compression Not Applied to Some Text

Hello Community,

I have a stream property which uses %Stream.GlobalCharacter and I set some dummy texts like "a1a2a3a4a5a6a7...."(more than 1024 characters)   in to that stream and the stream values are not compressed. However, The streams are compressed If I use the Lorem ipsum is a dummy or placeholder text or other text "This is part four of a long memo." which length is greater than 1024 

I opened the stream object and confirmed the compress property is 0 for first entry and  1 for 2nd object

Class Samples.Strms Extends %Persistent
{
Property MyId As %String;
Property MyBioStrm As %Stream.GlobalCharacter;
}

why the automatic stream Compression not applied for the first text

Thanks!

3 Comments
Discussão (3)2
Entre ou crie uma conta para continuar
Artigo
· Nov. 6, 2024 1min de leitura

How to get into the Hall of Fame of the Ideas Portal

Hi Community!

We hope you know that when you have an interesting idea about InterSystems products or services, you should publish it on the Ideas Portal. And those Developer Community members who implement the proposed ideas are added to the "Hall of Fame". Want to get accepted to the InterSystems Ideas Hall of Fame? Read on to learn how you can get on the list.

 

Hall of Fame is created to pay tribute to heroes who implemented ideas from the Ideas Portal. It contains names of implemented ideas, names of developers who realized them, and the list of projects. 

To get mentioned on this page:

1. Choose the Community Opportunity idea that you like and can implement.

2. Implement this idea and publish the implementation project on the Open Exchange portal. Fill in the "Ideas Portal" field while publishing your application with a link to your implemented idea.

OR 

Post a comment on the implemented idea on the Ideas Portal with a link to your application on the Open Exchange.

3. The Community Team experts will review your published app. After that, welcome to the Hall of Fame!

Good luck in your projects to implement ideas!

1 Comment
Discussão (1)2
Entre ou crie uma conta para continuar
Artigo
· Nov. 6, 2024 2min de leitura

Depuración de un error `<ILLEGAL VALUE>` de `$zf(-100)` que solo ocurre en Linux

Resumen: si concatenáis nombres de archivos con **/STDOUT** y **/STDERR** en una llamada a `$zf(-100)`, ponedlos entre comillas.

Me encontré con un error `<ILLEGAL VALUE>` en el siguiente código, lo cual me dejó perplejo al principio. Esto era parte de una prueba unitaria que funcionaba perfectamente en Windows, pero cuando el CI se ejecutaba en Docker fallaba:

Set outFile = ##class(%Library.File).TempFilename()
Set outDir = ##class(%Library.File).NormalizeDirectory(##class(%Library.File).TempFilename()_"dir-out")
Do ##class(%Library.File).CreateDirectoryChain(outDir)
Do $$$AssertEquals($zf(-100,"/STDOUT="_outFile_"/STDERR="_outFile,"tar","-xvf",tempDir_".tgz","-C",outDir)

El problema, que parece dolorosamente obvio una vez que sabes la respuesta, es que en Linux **outFile** contiene barras inclinadas, por lo que se interpretan como indicadores de palabra clave para `$zf(-100)` y, por supuesto, no son válidas. El error `<ILLEGAL VALUE>` en realidad es útil aquí, y la solución es poner los nombres de archivo entre comillas:

Set outFile = ##class(%Library.File).TempFilename()
Set outDir = ##class(%Library.File).NormalizeDirectory(##class(%Library.File).TempFilename()_"dir-out")
Do ##class(%Library.File).CreateDirectoryChain(outDir)
Do $$$AssertEquals($zf(-100,"/STDOUT="""_outFile_"""/STDERR="""_outFile_"""","tar","-xvf",tempDir_".tgz","-C",outDir)

Principalmente estoy publicando esto para que, si alguien le pregunta a la IA de la Comunidad de Desarrolladores "¿Por qué obtengo un error `<ILLEGAL VALUE>` de `$zf(-100)`?", esta respuesta aparezca. La respuesta inicial aquí fue muy útil; simplemente no cubría mi error específico.

Discussão (0)1
Entre ou crie uma conta para continuar
Discussão (0)0
Entre ou crie uma conta para continuar