Re-hi :) Not because something was used before is good :) As I said, spec does not handles the concept of "dirty". Also, it does not has the concept of "accept" (accept what? what is dirty? within what context?). Knowing that is something that depends on your application. Editors, for example tend to put an asterisk in the name (and maybe a "mod" string in the status bar)... this is for example more friendly with colorblind people.
I do not doubt the triangle was useful for you, but this is a punctual solution for a punctual problem, not a generic mechanism. Still as I said, you can easily implement something that would match your needs within your application. We do not have an "add triangle" style, but you can add/remove a style changing the border, you can hide/show an icon, whatever you want. There was someone in the community doing his own version of "controls with model" with spec (I do not remember who). I guess you need something like that, where you can keep the status of your model and know if something is dirty and how to react to that. Not hard to implement in a reusable way. Esteban On Mar 3 2022, at 4:59 pm, Robert Briggs via Pharo-users <pharo-users@lists.pharo.org> wrote: > Hi Esteban > > > Thankyou for responding. > > You say it’s a very bad way to show something is “dirty” yet Pharo continues > to use it in the System Browser and elsewhere. Also from my researching It > was used in Spec but has been deprecated in Spec2. > > I think It is also used in VisualWorks and earlier SmallTalk systems. > > Personally I find it very useful when editing code across a number of > different objects as it reminds me that I’ve not saved the edits (which has > caught me out when subsequently running a test for example. > > What is considered to be a better way to show that something is “dirty”, and > is anything planned for Spec2 in the future in this respect? > > Regards > R > From: Esteban Lorenzano <esteba...@netc.eu> > Reply to: Any question about pharo is welcome <pharo-users@lists.pharo.org> > Date: Thursday, 3 March 2022 at 15:16 > To: Any question about pharo is welcome <pharo-users@lists.pharo.org> > Cc: Robert Briggs <rbriggs2...@me.com> > Subject: [Pharo-users] Re: The orange 'content modified' indicator > > > > > Hi, > > > > No, this is not possible. > Main reason is because that little triangle is a very bad way to show > something is "dirty", but also because Spec itself does not has the concept > of "dirty". If you want such mechanism you need to implement it yourself (you > can listen when content changes and add/remove a style, for example). > > > > Esteban > > > On Mar 3 2022, at 3:28 pm, Robert Briggs via Pharo-users > <pharo-users@lists.pharo.org> wrote: > > Hi > > > > > > > > > > Pharo browser’s show a little triangular orange triangle in the top right > > corner when code is edited by the user but not yet Accepted. > > > > > > > > Is there a mechanism for doing the same, e.g. in an editable > > SpTextPresenter? > > > > > > > > I’ve looked around related Spec2 Classes but unable to find a method to do > > this. > > > > > > > > Advice please. > > > > > > > > Regards > > > > > > R > > > >