Skip to content

Multi-line defaults in IRIS Properties cause ObjectScript compilation errors #6

@gabriel-ing

Description

@gabriel-ing

Having multi-line default values for IRIS Properties causes objectscript syntax errors:

For example:

iris_property_one = IRISProperty(default = """this is a multiline default property
                                                    to demonstrate an error
                                                     """, description="property desc") 

Doesn't get registered due to:

ERROR #5559: The class definition for class 'QuickStart.CustomBS' could not be parsed correctly, possibly due to non-matching {} or () characters or a missing ; character or non-matched /* */ blocks. Edit the class and correct the problem.
  > ERROR #5030: An error occurred while compiling class 'QuickStart.CustomBS'

The reason is the incorrect ObjectScript Syntax:

Property PropSetting0 As %VarString [InitialExpression = "this is a multiline default property
        to demonstrate an error
    "];

While this is a fairly niche issue, it was difficult to debug because the python code had valid syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions