[squeak-dev] Problem with image lock up with self error:

karl ramberg karlramberg at gmail.com
Fri Jan 9 22:33:15 UTC 2015


Hi,
That fixes the image lock up.
I have commited the fix to trunk

Karl

On Fri, Jan 9, 2015 at 4:01 PM, Levente Uzonyi <leves at elte.hu> wrote:

> It's because the error occurs in the critical section of AccessLock, so
> it'll stay locked during error handling. This probably locks up the
> debugger, because it can't access the preferences.
> Here's a fix:
>
> preferenceAt: aSymbol ifAbsent: aBlock
>         "Answer the Preference object at the given symbol, or the value of
> aBlock if not present"
>
>         self accessDictionaryOfPreferencesIn: [ :dictionaryOfPreferences |
>                 dictionaryOfPreferences
>                         at: aSymbol
>                         ifPresent: [ :preference | ^preference ] ].
>         ^aBlock value
>
> Levente
>
>
> On Fri, 9 Jan 2015, karl ramberg wrote:
>
>  Hi,
>> Image lock up doing
>> Preferences togglePreference: #justATest
>>
>> If I change error:  to inform: in the method I do not get a image lock up.
>>
>> This is in a trunk image and tested with several Cog VM on Windows.
>>
>> Preferences>>togglePreference: prefSymbol
>> "Toggle the given preference. prefSymbol must be of a boolean preference"
>> (self preferenceAt: prefSymbol ifAbsent: [self error: 'unknown
>> preference: ', prefSymbol]) togglePreferenceValue
>>
>> Karl
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150109/79aeca86/attachment.htm


More information about the Squeak-dev mailing list