jgfoster / Jade

Jade is an Alternative Development Environment (IDE) for GemStone/S that runs on Microsoft Windows
MIT License
5 stars 2 forks source link

Can not create a new Jade Login ... #79

Closed feldti closed 8 months ago

feldti commented 9 months ago

Today (!) I got a new error - somehow my jade login list has been resetted to one entry ... and I press "+" to get a new entry and that did not work and I got an error.

The reason is simple:

Under JadeLoginShell>addLogin one can see:

login := loginListPresenter selectionOrNil ifNil: [JadeLogin default] ifNotNil: [:value | value copy].

and this "copy" set the lastLogin attribute to nil JadeLogin>>postCopy, BUT further in that method:

(loginListPresenter list copyWith: login)

is executed and the list is an instance of SortedCollection and the sort is done over "lastLogin" and you get it ? The newly added JadeLogin-instance has no value at that attribute. Its nil and it crashed.

feldti commented 8 months ago

Ok, I could fixed it here ... but I do not understand, why it popped up now ... all very strange. I used this very for quite some time. But I fixed it here now

jgfoster commented 8 months ago

This still should be investigated and fixed in the main branch. If you submit a pull request I can merge it or I can work with the code you provided in your initial report.

jgfoster commented 8 months ago

JadeLoginShell>>loadDataFrom: sets the list to an OrderedCollection and it is only when you click on the 'Last Login' column heading that the GUI tries to sort and gets the error. I'll update the sort block to handle nil. As a work-around, you can avoid the problem by clicking on another column before adding a new login.

jgfoster commented 8 months ago

Fixed by 4f2ee7d.