krakas/Frank — comment on commit 9a2f5cd052a0857a1adba4b010e09cbc3452397c
File:  line 0
By krakas:

Yeah, i'm really not comfortable with c strings. I spent too much time with object languages and byte arrays scare the hell out of me :)

Actually, the real problem here is the maptileview has what seems to be an uninitialized rect or weird struct in that field (not surprising for something as complex as a map view).

Those values usually look like {cgrect={... Or {cgpoint{... Etc.
When uninitialized, it returns {?={.., and of course -CGRectValue fails on that.
A robust patch would be to check the actual runtime CG type (rect, point or size) and skip unknown types.

I got some time assigned to frank at work, so I'll take a look tomorrow at a more robust fix.
Actually, if you're looking for some clean up in that class, I'll be glad to take a look in there.

/kra

On Feb 2, 2012, at 10:15 PM, Pete Hodgson wrote:

> FYI, it looks like we could have just done something like
> ```
> if( !strcmp( type, @encode(CGRect) ) ){
> //then this is a rect
> }
> ```
> rather than all the string searching stuff.
>
> I'd be the first to admit that the whole of DumpCommand.m is a mess :)
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/krakas/Frank/commit/9a2f5cd052a0857a1adba4b010e09cbc3452397c#commitcomment-928988