[Vm-dev] Re: Mac + Cog - mouse clicks

Igor Stasenko siguctua at gmail.com
Fri Dec 24 01:46:12 UTC 2010


On 24 December 2010 02:16, John M McIntosh
<johnmci at smalltalkconsulting.com> wrote:
>
> Historically I had not put the defaults in the binary because people sometimes would grab the binary and toss all the other parts of the bundle.  Later no one understood how to change a default because the plist hint was missing.
>
Yeah.. well.. to prevent tossing, i would simply bummer with message
like 'hey! where is my bundle?'. :)

It is easy to do by applying following pattern everywhere:

replace all calls like
value := getKeyValue( KeyName)
with:
value := getKeyValue( KeyName , defaultValue)

so, there is no chance to get NULL & crash, because returned values
are always valid.

Esteban, it all yours..
I don't have time doing it right now, because i got like 6 other
configs to write :)


> On 2010-12-23, at 5:12 PM, Esteban Lorenzano wrote:
>
>>
>> yeah, but we should have some defaults... application shouldn't crash just because some guy removed parameters from pInfo... I'm going to check this in Cocoa Cog :P
>>
>> Cheers,
>> Esteban
>>
>> El 23/12/2010, a las 9:49p.m., Igor Stasenko escribió:
>>
>>>
>>> On 24 December 2010 01:40, Igor Stasenko <siguctua at gmail.com> wrote:
>>>> Okay, apparently its because i didn't bundled binary into '.app' thingy
>>>> and so, it doens't have an associated .pinfo file where some settings
>>>> related to mouse buttons (i think) are provided. There are some
>>>> 'SqueakMouseXXXButtonYY' values, which seems like responsible for mouse clicks.
>>>> (Hmm, why binary doesn't carry a default ones, when values in .pinfo
>>>> is missing?)
>>>>
>>>> I found the way how to tell cmake to create a bundle,
>>>> and now even worse. It assumes that it budled , and tries to read
>>>> missing keys and use them,
>>>> causing NULL-pointer exception..
>>>> Because i didn't provided correct .plist yet, but using default one,
>>>> which cmake generates.
>>>>
>>> .. and after borrowing 'correct' .pinfo from other cog app, and image
>>> starts and everything working normally.
>>>
>>> :)
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>
>
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list