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 » Community » Newbie corner » first try on a own (simple) widget...
Re: first try on a own (simple) widget... [message #34573 is a reply to message #34570] Wed, 30 November 2011 17:01 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1427
Registered: September 2007
Ultimate Contributor
The format method is "const". This means that it is not supposed to modify the state of the object. In consequence you can't modify fields or call other methods that are not labeled as const.

Normally you would solve this by making the offending method const, but in your case we are talking about a setter method which by definition can't and shouldn't be const.

I suppose you wanted to call setTime for testing purposes? You should do this in the constructor for an easy temporary test. The Format method should not modify the state of the object. Format is a functional method, not a side effect one.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Own TimeInput widget.... problem with spinbuttons etc.
Next Topic: IMAP?
Goto Forum:
  


Current Time: Mon Jul 07 14:22:43 CEST 2025

Total time taken to generate the page: 0.03957 seconds