Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error patching a [PROP]-type relation that satisfies type-checker constraints #67

Open
RieksJ opened this issue Mar 19, 2021 · 0 comments
Assignees

Comments

@RieksJ
Copy link
Contributor

RieksJ commented Mar 19, 2021

What happened

I have the following code fragments:

sessionXForm :: SESSION * XForm [UNI]

CLASSIFY XFErfrecht ISA XForm
xfErfrechtNewPartyContactOK :: XFErfrecht * XFErfrecht [PROP]

[ ... stuff left out ... ]

INTERFACE "XFErfrecht": sessionXForm;I[XFErfrecht] cRud BOX <FORM>

[ ... more stuff left out ... ] 

         , "Toevoegen": V;"_SESSION";sessionXForm cRud BOX <PROPBUTTON> 
            [ label: TXT "OK"
            , property: xfErfrechtNewPartyContactOK cRUd
            ]

They compile as expected and result in a running prototype. Clicking the button Toevoegen results in the following error, which I had not expected to occur:
image

Analysis

The expression in front of the BOX has a target atom of type of sessionXForm, which is the concept XForm.
The property-expression in the PROPBUTTON is xfErfrechtNewPartyContactOK, of which the source (and target) concept is XFErfrecht. There is no type-error as XFErfrecht ISA XForm. Therefore, there should be no problem in populating the property.

Workaround

A workaround for this problem is to insert I[XFErfrecht] before the BOX, as follows:

         , "Toevoegen": V;"_SESSION";sessionXForm;I[XFErfrecht] cRud BOX <PROPBUTTON> 
@Michiel-s Michiel-s transferred this issue from AmpersandTarski/Ampersand Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants