查找

Pregunta
· 17 ene, 2025

Are package names case sensitive?

The documentation at https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...

Case-sensitive: variable names (other than the system variables) are case-sensitive. Names of classes and their members, names of routines and their entry points, names of include files and macros are all case sensitive.

Consider "fully qualified" class name: Package.subpackage.ClassName

What is the class name mentioned in the documentation? Package.subpackage.ClassName  or ClassName ?

It's unclear to me if in InterSystems/ObjectScript parlance class name includes also the packages or not.

In the other (non-related as my example has no SQL/%Persistent involved) documentation at https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

Schema and table names are not case-sensitive; package and class names are case-sensitive.

But if I try to have both Package.subpackage.ClassName  and package.subpackage.ClassName I'll get:

ERROR #5092: Name conflict on class 'package.subpackage.ClassName' because class 'Package.subpackage.ClassName' has the same name but differs in case.

Or trying to have both Package.subpackage.ClassName and package.subpackage.ClassNameTwo gives me:

ERROR #5093: Name conflict on class 'package.subpackage.ClassNameTwo' because package 'Package' has the same name but differs in case.

So it looks to me the package names are case in-sensitive. To me this is an inaccuracy/bug in the documentation and I'll report that if no-one else objects :)

This is related to "IPM modularization"-effort where I'm trying to apply de-facto naming conventions but the package name case in-sensitivity prevents us to mix the new IPM code with old code (mapped from other namespaces).

9 comentarios
Comentarios (9)3
Inicie sesión o regístrese para continuar
Artículo
· 17 ene, 2025 Lectura de 2 min

Mac IRISでEmbedded Python利用に関する相性問題

Mac版IRISでは、現状Pythonのバージョンが固定(3.11)なのですが、これに付随する他製品との相性問題に遭遇しましたので報告します。

今までEmbedded Pythonは調子よく動作していたのですが、ある時から急に動作しなくなりました。

原因を調べてみると、Python3.13がインストールされ、それがデフォルトとして上書きされたため、irispythonコマンドを発行すると、それが内部で3.13を呼ぶ様になってしまったためでした。

ちなみにiris session でログインし、そこからEmbedded Pythonを実行する場合は、問題ありません。

あくまでもirispythonコマンドで直接.pyファイルを実行する場合に発生する問題です。

そしてとりあえずの対処法は、python3をpython3.11で置き換える方法です。

以下のような感じです。(どのMacでもbrewコマンドでインストールした場合、ディレクトリ構造は同じだと思いますが、違う可能性もゼロではありません)

cp /opt/homebrew/bin/python3.11 /opt/homebrew/bin/python3

さて、ところで何で3.13がインストールされていたのかというと、

IRIS SQLのLOADコマンドを動作させるためには、JDKまたはJREが必要なのでそれをインストールしました。

そしてOpenJDKのインストールの際に、勝手にPythonもインストールすることが原因でした。

何故Javaのインストールでpythonをインストールする必要があるかは不明ですが、LOAD DATAコマンドはJava経由でpythonを使用することもなさそうなので、上記の応急処置で問題なさそうですが、

根本的な対処法は、

MAC版IRISがフレキシブルpythonをサポートするか、

irispythonコマンドが自分が呼ぶべき正しいpythonバージョンを選択するか

またはわざわざirispythonを呼ばなくても通常のpythonコマンドから普通の.pyファイルを実行してembedded pythonを呼び出せる様にするか

個人的には最後が一番望ましいのですが、何か技術的な困難があるのかもしれません。

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 16 ene, 2025 Lectura de 3 min

第七十五章 使用 ^%IS - OPEN 参数

第七十五章 使用 ^%IS - OPEN 参数

OPEN 参数

默认情况下,OPEN 命令使用 ^%IS 全局中定义的设备的规范。在使用 ^%IS 时,可以通过指定其他设置来覆盖这些设置。

发出 USE 命令

运行 ^%IS 后,应用程序必须向 ^%IS 打开的设备发出 USE 命令。你可以使用变量 IO,只要你明白每次调用 ^%IS 时它的值都会发生变化。然后,后续的IRIS I/O 命令,例如 READWRITE,将引用该设备。

发出 CLOSE 命令

用户或应用程序开发人员必须关闭使用 ^%IS 实用程序打开的设备。

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 16 ene, 2025

メンテナンス予定のお知らせ

🚨 メンテナンス予定のお知らせ 🚨  

2025年1月20日(月曜日)、計画的なメンテナンスのため、Developer Communityサイトが一時的に利用できなくなる場合があります。

ご不便をおかけしますことをお詫び申し上げます。ご理解いただきありがとうございます。プラットフォームの改善に向けた取り組みにご協力いただき、感謝いたします!  

9 Under Maintenance Page Tips | Messages for a Down Website

1 Comentario
Comentarios (1)1
Inicie sesión o regístrese para continuar
Anuncio
· 16 ene, 2025

计划维护公告

🚨 计划维护公告 🚨  

由于计划中的维护,开发者社区网站可能会在2025年1月20日(星期一)期间出现短暂的停机现象。

对于由此可能带来的不便,我们深表歉意,并感谢您的理解。感谢您耐心等待,我们将努力提升我们的平台!  

9 Under Maintenance Page Tips | Messages for a Down Website

1 Comentario
Comentarios (1)1
Inicie sesión o regístrese para continuar