Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 973 by benjamin...(a)gmail.com: Roassal font organizer singleton
inconsistencies
http://code.google.com/p/moose-technology/issues/detail?id=973
Following on from Issue 971, use of singletons related to the Roassal font
organizer seems not used consistently.
Using Finder, I've searched all 'Source' of Roassal packages, for the
following both 'ROFontOrganizer' and 'fontOrganizerClass' and found...
----Part1--------------
ROAbstractLabel >> fontFor: anElement with: aCamera
fo := ROPlatform current fontOrganizerClass.
ROAbstractLabel >> offsetWhenDrawing
^ ROPlatform current fontOrganizerClass
ROAbstractLabel >> widthOfLine: string withFont: aFont
^ ROFontOrganizer current widthOfString: string font: font.
I propose the last is changed to...
ROAbstractLabel >> widthOfLine: string withFont: aFont
^ ROPlatform current fontOrganizerClass widthOfString: string font:
font.
and also delete...
ROFontOrganizer >> current
^ self subclasses first
which seems plain wrong.
----Part2--------------
Also I'm a perplexed by the way both of these methods
ROMorphicPlatform>>fontOrganizerClass
^ ROFontOrganizerMorphic
ROPharoAthensPlatform>>fontOrganizerClass
^ ROFontOrganizerAthens
override this one
ROPlatform>>fontOrganizerClass
^ fontOrganizerClass
such that the instance-variable 'fontOrganizerClass' is ignored, as well as
the following seeming irrelevant...
ROPlatform>>fontOrganizerClass:
^ fontOrganizerClass := aClass.
Is ROPlatform ever instantiated, or abstract?
A search for all references to 'ROPlatform' in the 'Source' of all Roassal
finds...
* ROPlatform current (x40)
* ROPlatform platforms (x2)
* ROPlatform removeNamed: (x1)
* ROPlatform add: (x2)
* ROPlatform setCurrent: (x1)
* ROPlatform new (x1)
The last is only in a test ROPlatformTest>>testAddingAPlatform.
I propose to modify...
ROPlatform>>fontOrganizerClass
self subclassResponsibility
delete....
fontOrganizerClass instance-variable
delete...
ROPlatform>>fontOrganizerClass:
from...
ROPlatformTest>>testAddingAPlatform
remove line...
platform fontOrganizerClass: ROFontOrganizer subclasses anyOne.
hope this helps,
cheers -ben
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings