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 » ArrayCtrl, HeaderCtrl & GridCtrl » AttrText() and content of the cell
Re: AttrText() and content of the cell [message #11949 is a reply to message #11948] Wed, 03 October 2007 19:01 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1207
Registered: March 2006
Location: Italy
Senior Contributor
mrjt wrote on Wed, 03 October 2007 16:44

The ArrayCtrl is just returning exactly what you put in - an AttrText - but contained in a Value. You just need to convert it back, though this is more slightly more complicated than for Upp 'native' types:
WString GetText(const Value &v)
{
    return IsTypeRaw<AttrText>(v) ? ValueTo<AttrText>(v).text : WString();
}
James


Surprised I missed this trick and I lost many hours finding bugs in improbable places. Everything now work but I needed to modify the previous code as this

String GetText(const Value &v)
{   
    return IsTypeRaw<AttrText>(v) ? ValueTo<AttrText>(v).text.ToString() : (String) v;
}


Thanks!
Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Missing GridCtrl?
Next Topic: desire: ArrayCtrl and GridCtrl: Find in the row
Goto Forum:
  


Current Time: Mon Jun 23 16:09:02 CEST 2025

Total time taken to generate the page: 0.06312 seconds