Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Format function conversion specifiers and EditDate widget
Re: Format function conversion specifiers and EditDate widget [message #2081 is a reply to message #2080] Fri, 31 March 2006 14:12 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14257
Registered: November 2005
Ultimate Member
gprentice wrote on Fri, 31 March 2006 07:05


Quote:


Not yet, sorry.

Format works by converting arguments to Value. It is otherwise mostly similar to printf-like formatting, however there are differences. The most important one is that Format is extensible - you can register additional format specifiers and additional types.



It's possible I might try to document something as I learn it - really it'd be good if something like the Wiki could be used, to try and get lots of people contributing as they learn things e.g. one Wiki page for each widget, one for each core class, one for each reference app, one for each example.



There is a wiki page, feel free to contribute!

Quote:


Any chance of an answer on the Date constructor question - if squiggle returns Value does Value have user defined conversion to Date and the copy constructor is used? Is Value like a variant - what does it hold for ~date ?



Date, as almost any concrete type, is "Value compatible" - it can be seamlessly converted to Value and back. In this particular example:

abs(Date(~date1) - Date(~date2))

~date1 gets a Value (containing a Date) from the date1 widget

Date(...) is Value::operator Date() (in fact, slight irregularity, most other types use constructor T(const Value&) for conversion).

for Date, operator- returns the number of days between two Dates.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Hashes in U++
Next Topic: What is lock for in MenuBar etc. classes? -[SOLVED]-recursive call
Goto Forum:
  


Current Time: Mon May 12 08:35:58 CEST 2025

Total time taken to generate the page: 0.01047 seconds