The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle Extras (http://forums.omnigroup.com/forumdisplay.php?f=7)
-   -   number formats for variables (http://forums.omnigroup.com/showthread.php?t=15236)

dteman 2010-02-06 08:42 AM

number formats for variables
 
How can I control the format, including the number of decimal places shown, for a variable, like the LineLength? There have been examples of date formats, but none of the Cocoa number formats I've tried work on floating point numbers. Without this control, Omnigraffle often displays numbers like 20.0002 or 19.9996, instead of simply rounding to 20.0.

whpalmer4 2010-02-06 08:10 PM

I suspect the issue is that the variables are all strings...

dteman 2010-02-07 06:11 AM

[QUOTE=whpalmer4;72837]I suspect the issue is that the variables are all strings...[/QUOTE]
Yes. So why does formatting strings work for the month variable (see comment by "Ape" on [url]http://forums.omnigroup.com/showthread.php?t=2708&highlight=variables+format[/url]), but not for the lineLength variable?

whpalmer4 2010-02-07 08:50 AM

[QUOTE=dteman;72856]Yes. So why does formatting strings work for the month variable (see comment by "Ape" on [url]http://forums.omnigroup.com/showthread.php?t=2708&highlight=variables+format[/url]), but not for the lineLength variable?[/QUOTE]
Everyone is likely to want to control the formatting of dates, so they put in support for that. I doubt it even occurred to anyone that someone was going to want to use a format specifier on a line length!

In hindsight, I'll admit my answer wasn't the best -- I was thinking about the case of userdata where the values are strings even if numeric. Might not be unreasonable to ask that you get the chance to apply a format specifier to something like the line length variable which is a number internally, but expecting OG to parse numeric userdata so you can turn around and round it off might be a feature request that takes a very long time to get to the top of the pile!

To get that feature request, or any other feature request, in front of the Omni developers, use Help->Send Feedback or email [email]omnigraffle@omnigroup.com[/email]. That way it will be tracked and entered in the database. A forum posting right before Macworld and with everyone busily trying to figure out how to move all of the Omni products to the iPad stands a better than usual chance of being missed, I'll wager...


All times are GMT -8. The time now is 12:18 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.