[Cuis-dev] Libpulse dependency - why does a programming language require a certain audio interface?
H. Fernandes
hilaire at drgeo.eu
Mon May 30 01:22:19 PDT 2022
Hi Gerald,
Answers below
----- Mail original -----
> Yes and no, in this case the problem is the beep method
> checks the aforementioned property. Someone even changed
> this method to use PreferenceNG , but did not bother to add
> the property. If there is no SampleSound class, it just sends
> primitiveBeep to itself. I presume the later should just beep,
> AFAIR it never worked on my Linux installation.
We can add the preference then.
> I see four unsolved issues with PreferenceNG (I have to
> apologize, I did to review your code, I was busy getting out a
> Haver release before Haver's demo).
> 1.
> It's difficult to install preferences for a package, at least without
> a special CodePackage subclass.
> We need something like PreferenceNG at: #somePreferenceSymbol
> ifAbsentInstall: [ ... ]
You just need to declare a new preference with one of the two class methods:
PreferenceNG name:....
If the preference exist, it is updated, if not it is created.
A package can put this in a class initialize method.
> 1.
> 2.
> We should map the old Preferences code to PreferenceNG, this should
> provide the old default behavior.
> This feature is important for packages the Cuis team can not change.
Hum, we wanted to simplify, so.... Neverthless you can access PreferenceNG myPreference, there is DNU for that compatibility level
Packages should be adapted because indeed there is some breakage. It can be done now has the two preferences system co-exist now.
> 1.
> 2.
> We have lot of unconverted packages in the Cuis repo.
> Just try: find -iname '*.st' | xargs grep -l ' Preferences ' .
One can only holds his own baggage
> 1.
> 2.
> Implementing some sort of “world state object”, that should hold some
> sort of local preferences, is at least difficult,
> because the whole logic is still at the class side. A
> PreferencesNGContainer class, that has a singleton instance
> bound to PreferencesNG will solve that problem. Of course we need to
> move the class side methods of PreferenceNG
> to the instance side of PreferencesNGContainer .
I think we wanted to move away from this, and do not put too much responsibility on the Preference system
You can hold a state in the preference with a dedicated type object. To be explored
Hope this helps
Hliaire
> 1.
> As I said, I am sorry that I mention this issues when it's almost to
> late.
> Just my CHF 0.05,
> Gerald
> On May 29 2022, at 11:24 pm, Hilaire Fernandes via Cuis-dev
> <cuis-dev at lists.cuis.st> wrote:
> > Hi Gerald,
>
> > I do not know how to handle the soundsEnanbled preference because,
> > if
> > you have this option in the base image, without the sound package,
> > one can set the preference to true but sound will not work. Am I
> > right?
>
> > If I am wrong, we can add it to the prefSystem method in
> > PreferenceNG.
>
> > Hilaire
>
> > Le 29/05/2022 à 10:35, Gerald Klix a écrit :
>
> > > I hate to point out that SystemDictionary>>#beep is currently
> > > broken,
> >
>
> > > because PreferenceNG lacks a #soundsEnabled preference.
> >
>
> > > @Juan and @Hilaire:
> >
>
> > > How should one fix this properly?
> >
>
> > > *
> >
>
> > > Provide a script that just adds this property
> >
>
> > > *
> >
>
> > > Add it to the PreferenceNG class>>#initialize method.
> >
>
> > > *
> >
>
> > > Both of the above.
> >
>
> > --
>
> > GNU Dr. Geo
>
> > http://drgeo.eu http://blog.drgeo.eu
>
> > --
>
> > Cuis-dev mailing list
>
> > Cuis-dev at lists.cuis.st
>
> > https://lists.cuis.st/mailman/listinfo/cuis-dev
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220530/19110d65/attachment.htm>
More information about the Cuis-dev
mailing list