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 » Problem in example code (Tried SplitterFrame yet minor problem.)
Re: Problem in example code [message #45946 is a reply to message #45944] Sat, 30 January 2016 09:33 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi,

I'm still not sure it is really good idea to this dynamically, but here is a working method:
	void StoreToJson() {
		Json json;
		for (Ctrl *q = GetFirstChild(); q; q=q->GetNext()) {
			if (dynamic_cast<EditField *> (q)) {
				String id = q->GetLayoutId();
				if (id.GetCount())
					json(id, ~*q);
			}
		}
		SelectFileOut out("*.*");
		if (out.IsOpen())
			out << json << "\n";
	}

It is actually almost the same as the code you posted. Full code is in the attached archive. Just click anywhere in the window to trigger the save as dialog. I'm not sure why it didn't work for you. Only thing I can think of is that you didn't assign names to the editfields in the layout.

Honza
 
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
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
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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Issues using 2015.2 version
Next Topic: How to build FREBSD *.so in Windows?
Goto Forum:
  


Current Time: Fri Nov 01 00:42:23 CET 2024

Total time taken to generate the page: 0.03473 seconds