[BUG][FIX]StrikeFontSet>>maxWidth - array out of bounds

Yoshiki Ohshima yoshiki at squeakland.org
Mon Dec 20 20:36:39 UTC 2004


  Hello,

  I thought the maxWidth problem in conjunction with Connectors was
fixed... (is it only in Connectors 2?)

  My long term solution was that to get rid of the call to maxWidth,
as there is no such thing like "max" in "width" of individual
character in general.

  The use of returned value from #maxWidth typically has nothing to do
with its "max"-ness... It just multiply the return value by some
arbitrary number to get some acceptable width.  The politically
correct way to get something is to use #widthOfString:from:to:, even
though it doesn't do too fancy kerning and composite character
rendering today.

  But yes, we should make #maxWidth return some integral value at
least to make sure it doesn't raise the notifier.

-- Yoshiki

> I got trouble when loading Connectors 1.9. It stopped because a fontArray 
> contained a single font.
> 
> Image:  Squeak3.8g-6527
> method StrikeFontSet>>maxWidth
> 
> The code could read:
>     StrikeFontSet>>maxWidth
>          ^ (fontArray at: (2 min: fontArray size)) maxWidth.
> 
>   comment 1: For some reason, the method always looked at (fontarry at: 2). 
> (Why not at: 7 ?? or 1 ???)
>   comment 2: I tried reporting this on BFAV, but couldn't make it work. I 
> tried following this quote:
> 
> "As Ken's said, you can do that neatly if you install BFAV. Then you can make
> a new changeset, move your changes & fix into that changeset, and just right
> click the changeset to get a DecentReviewerNotePad dialog, which makes
> sending to the list a breeze."
> 
> When I installed BFAV, it loaded some stuff forever. I aborted it when it 
> had loaded about 3000.
> I assumed that the above related to the dual change sorter,
> but I couldn't find a 'DecentReviewerNotePad' command anywhere.
> I gave up, it shouldn't be a research project to use a released program 
> product.
> 
> --Trygve
> 
> 
> -- 
> 
> Trygve Reenskaug      mailto: trygver <at> ifi.uio.no
> Morgedalsvn. 5A       http://heim.ifi.uio.no/~trygver
> N-0378 Oslo           Tel: (+47) 22 49 57 27
> Norway
> 
> 
> 



More information about the Squeak-dev mailing list