On Freitag, 28. Mai 2010, Dan Bolser wrote: > I guess this should be on the devel list > > On 27 May 2010 15:14, Dan Bolser <dan.bol...@gmail.com> wrote: > > About the fix proposed here: > > > > https://bugzilla.wikimedia.org/show_bug.cgi?id=23679 > > > > > > Given that plain (unformatted) printout is just a special case of the way > > units are selected, don't you think it's reasonable to suppress the > > output of units when using plain (unformatted) printouts? > > > > i.e. If I say: > > > > * {{#show: Some page | ? My property # seconds }} > > * {{#show: Some page | ? My property # hours }} > > > > > > It's clear that I want the result in seconds or hours, respectively. > > However, if I say: > > > > * {{#show: Some page | ? My property # - }} > > > > > > Isn't it clear that I don't want units?
The analogy of #- and #unit is not quite correct, because #- is supported by all datatypes while #unit is specific to the numeric types with units. A value that is a (physical) dimension consists of a number multiplied by a quantity (unit), so leaving away the unit would really change the value. But it makes sense to have a way of accessing only the number and maybe also only the unit. We do not have to use #- as the only special format: we can simply have two more formats for the two behaviours. I just need a useful name for them (keeping in mind that the format names should avoid conflicts with names of units that someone might want to use). How about the following? Given a value "12,345.6 km": #- for "12345.6 km" (as it is now) #-n for "12345.6" #-u for "km" -- Markus > > > > I'm being fussy about this because I want to take the values and pass > > them to calculations using the #expr: parser function. This won't work if > > their is a unit in the result. > > > > > > Comments? > > > > Dan. > > > > On 27 May 2010 11:05, Dan Bolser <dan.bol...@gmail.com> wrote: > >> Yeah, I'd like to do the same thing. > >> > >> I think the 'natural' way to do this would be to specify "Plain > >> (unformatted) printouts" for the property in question > >> > >> http://semantic-mediawiki.org/wiki/Help:Displaying_information#Plain_.28 > >>unformatted.29_printouts > >> > >> > >> However, SMW insists on putting, for example, commas in large numbers > >> [1] and outputting a unit (there seems to be no way to remove the unit > >> altogether), and putting a " " between the printed value and the > >> unit. All nice ideas in principle, but the whole point of SMW is to > >> provide *data* not *formatting*. Currently you can't get at the > >> underlying data, to include it in a calculation, for example, so this > >> is a bug (which I just logged [2]). > >> > >> > >> [1] http://tinyurl.com/34vuf4y > >> [2] https://bugzilla.wikimedia.org/show_bug.cgi?id=23679 > >> > >> > >> Cheers, > >> Dan. > >> > >> On 20 February 2010 20:19, Subscriptions <subscripti...@coldflower.com> wrote: > >>> Is there a way to turn off the pop-up tooltips that appear over > >>> properties? > >>> > >>> I am using an inline query to request a property value and only want > >>> the returned value. The value is being returned, though, with a > >>> tooltip that displays the value in several different units when you > >>> hover over it. I would like to disable the tooltip in this particular > >>> instance. > >>> > >>> Thanks, > >>> Jonathan > >>> > >>> ----------------------------------------------------------------------- > >>>------- Download Intel® Parallel Studio Eval > >>> Try the new software tools for yourself. Speed compiling, find bugs > >>> proactively, and fine-tune applications for parallel performance. > >>> See why Intel Parallel Studio got high marks during beta. > >>> http://p.sf.net/sfu/intel-sw-dev > >>> _______________________________________________ > >>> Semediawiki-user mailing list > >>> semediawiki-u...@lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > >> > >> ------------------------------------------------------------------------ > >>------ > >> > >> _______________________________________________ > >> Semediawiki-user mailing list > >> semediawiki-u...@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user > > --------------------------------------------------------------------------- > --- > > _______________________________________________ > Semediawiki-devel mailing list > Semediawiki-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > -- Markus Krötzsch <mar...@semantic-mediawiki.org> * Personal page: http://korrekt.org * Semantic MediaWiki: http://semantic-mediawiki.org * Semantic Web textbook: http://semantic-web-book.org --
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------
_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel