[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] some redirects could break code. Please OK



I'm holding off on this pending further discussion. Redirecting font
would mean changing a lot of primitives probably. Pen is probably ok. 
Perhaps we do not need to redirect font.

Yet the whole discussion about redirects started not just because of
convenient cross kit syntax, but also because of the possibility that
some brave soul might do a cross-platform gui with QT or the like some
day....

jostM

Julian Rohrhuber wrote:
> I wonder whether Font is not a more neutral class anyway, a bit more
> like FlowLayout etc. It is just these methods, that could maybe be
> moved/redirected to the GUI class, and then to Platform.
>
>     *availableFonts {
>         // returns an Array of font names.
>         _Font_AvailableFonts
>         ^this.primitiveFailed
>     }
>     *antiAliasing_ { arg flag = false;
>         _Font_SetAntiAliasing;
>         ^this.primitiveFailed
>     }
>     *smoothing_ { arg flag = false;
>         _Font_SetSmoothing;
>         ^this.primitiveFailed
>     }
>
>
>> OK, redirecting Font breaks code.
>>
>> SCButton wants font_ to have an argument of type Font.  I think this is
>> checked in the primitive
>>
>> ERROR: Primitive '_SCView_SetProperty' failed.
>> Wrong type.
>> RECEIVER:
>>    nil
>> CALL STACK:
>>     MethodError:reportError   16D95F40
>>         arg this = <instance of PrimitiveFailedError>
>>     Nil:handleError   16D95EE0
>>         arg this = nil
>>         arg error = <instance of PrimitiveFailedError>
>>     Thread:handleError   16D95760
>>         arg this = <instance of Thread>
>>         arg error = <instance of PrimitiveFailedError>
>>     Object:throw   16D95D60
>>         arg this = <instance of PrimitiveFailedError>
>>     Object:primitiveFailed   16D95D00
>>         arg this = nil
>>     SCButton:font_   16D95BB0
>>         arg this = <instance of SCButton>
>>         arg argFont = <instance of SCFont>
>>     Server:makeGui   15C01290
>>         arg this = <instance of Server>
>>         arg w = <instance of SCWindow>
>>         var active = nil
>>         var booter = <instance of SCButton>
>>         var killer = nil
>>         var makeDefault = nil
>>         var running = nil
>>         var booting = nil
>>         var stopped = nil
>>         var bundling = nil
>>         var recorder = nil
>>         var scoper = nil
>>         var countsViews = nil
>>         var ctlr = nil
>>         var dumping = false
>>         var label = "internal server"
>>         var gui = class CocoaGUI
>>         var font = <instance of SCFont>
>>         var volumeNum = nil
>>     Server:makeWindow   16D95220
>>         arg this = <instance of Server>
>>         arg w = nil
>>     OSXPlatform:startup   16D82400
>>         arg this = <instance of OSXPlatform>
>>     Main:startup   16D823A0
>>         arg this = <instance of Main>
>>
>>
>>
>>
>> jostM wrote:
>>>  Redirects which require that we change class names could break code,
>>>  e.g.  if someone is expecting a class of name Font, Pen ,
>>> FreqScope, or
>>>  Stethoscope to be returned.
>>>
>>>
>>>  last chance to veto these:
>>>
>>>  Font         redirect-> SCFont
>>>  Pen          redirect-> SCPen
>>>  FreqScope    redirect-> SCFreqScopeWindow (used to be FreqScope)
>>>  Stethoscope  redirect-> SCStethoscope
>>>
>>>
>>>  jostM
>>>
>>>
>>>
>>>
>>>  _______________________________________________
>>>  sc-dev mailing list
>>>
>>>  info (subscription, etc.):
>>> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>>>  archive: https://listarc.bham.ac.uk/marchives/sc-dev/
>>>  search: https://listarc.bham.ac.uk/lists/sc-dev/search/
>>>
>>>  
>>
>> _______________________________________________
>> sc-dev mailing list
>>
>> info (subscription, etc.):
>> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>> archive: https://listarc.bham.ac.uk/marchives/sc-dev/
>> search: https://listarc.bham.ac.uk/lists/sc-dev/search/
>
>

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/