Re: Displaying fixed point in XCode debugger
Re: Displaying fixed point in XCode debugger
- Subject: Re: Displaying fixed point in XCode debugger
- From: James Bucanek <email@hidden>
- Date: Fri, 28 Apr 2006 10:26:37 -0700
Steve Mills wrote on Friday, April 28, 2006:
>Chris Espinosa wrote:
>
>> Enter this into the Summary field:
>>
>> {((float)($VAR) / ((Fixed) 0x00010000)))}
>
>That's sure a PitA.
... to copy and paste this once? You probably spent more time sending your reply. ;)
Custom data formatters are associated with a type and stored globally. Once you've entered a custom formatter for a type or class, it is automatically applied to all instances of that type everywhere and forever. Data formatters are stored in your home folder (~/Library/Application Support/Apple/Developer Tools/CustomDataViews/CustomDataViews.plist) so they persist across debugging sessions and projects.
If you *really* want to get froggy you can you create a custom data formatter plug-in and pass it around for others to use. Since this formatter doesn't actually require any code, it would be a trivial exercise.
The only annnoying limitation that I've found is that each formatter is keyed to the type of the variable, not the actual class of the object. So if I have an object pointer (i.e. SomeBaseClass* myObject) the debugger uses the custom data formatter for SomeBaseClass, even if the actual object is SomeSubClass. But this won't affect your problem because we're talking about a struct.
>Has anyone submitted an enhancement request that
>Fixed be added to the variable view type menu?
I doubt it, since entering a custom data formatter for any non-primative type solves the problem globally for your user, and creating a custom data formatter plugin would solve the problem for anyone. The advantage of custom data formatters is that they can be used to spontaniously extend the types understood by the debugger without requiring the Xcode team to add everybody's favorite data types to the View As menu.
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden