You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2017/03/09 23:29:38 UTC

[jira] [Comment Edited] (DIRSTUDIO-1134) Boolean Attribute Addition with no value causes Directory Studio crash on Mac

    [ https://issues.apache.org/jira/browse/DIRSTUDIO-1134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904041#comment-15904041 ] 

Emmanuel Lecharny edited comment on DIRSTUDIO-1134 at 3/9/17 11:29 PM:
-----------------------------------------------------------------------

Ok, I have taken another approach to this problem. The thing is that the wizard dialog will never store anything in the value, it will be up to the associated editor to deal with the error message, if the value is incorrect (here, {{null}} for a boolean value). We can't set something different than null, because we don't know what would be the default value, and {{null}} is a valid value for many attributeTypes. 

If I change the {{InPlaceBooleanValueEditor}} class, adding a {{doSetValue}} method that sets the value to {{"TRUE"}} by default, the browser does not crash anymore, but the text is seen as red (ie, an error). It does not freeze anymore when you double click on the value, but you can't save it immediately -ie, if you don't double-click on the value-, because the value is still seen as empty (actually the red "TRUE" is just an artefact in the {{TreeViwer}}, it's not yet a value associated to the Attribute...). 

There is something missing that would not make the value seen as an error, but OTOH, it might be good enough : as soon as you double-click the value, it's validated.

So it's -again- an half backed solution, but a better one.

Stefan, any better idea ?


was (Author: elecharny):
Ok, I have taken another approach to this problem. The thing is that the wizard dialog will never store anything for the value, it will be up to the associated editor to deal with the error message, if the value is incorrect (here, {{null}} for a boolean value). We can't set something different than null, because we don't know what would be the default value, and {{null}} is a valid value for many attributeTypes. 

If I change the {{InPlaceBooleanValueEditor}} class adding a {{doSetValue}} method that set the value to "TRUE" by default, the browser does not crash anymore, but the text is seen as red (ie, an error). It does not freeze anymore when you double click on the value, but you can't save it immediately, because the value is still seen as empty (actually the red "TRUE" is just an artefact in the {{TreeViwer}}, it's not yet a value associated to the Attribute...). 

There is something missing that does not make the value seen as an error, but OTOH, it might be good enough : as soon as you double-click the value, it's validated.

So it's -again- an half backed solution, but a better one.

Stefan, any better idea ?

> Boolean Attribute Addition with no value causes Directory Studio crash on Mac
> -----------------------------------------------------------------------------
>
>                 Key: DIRSTUDIO-1134
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1134
>             Project: Directory Studio
>          Issue Type: Bug
>          Components: studio-apacheds
>    Affects Versions: 2.0.0-M12
>         Environment: MacOS Sierra 10.12.2
>            Reporter: Eric Lawson
>            Priority: Minor
>         Attachments: hr_err.log
>
>
> When adding a boolean attribute to an object with no attribute value Directory Studio crashes.  I can't reproduce this issue on Windows only on the Mac version 2.0.0-M12



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)