in Education by
I am constructing a tuning fork app. The fork should allow up to 12 preset pitches. Moreover, I wish to allow the user to choose a theme. Each theme will load a set of presets (not necessary to use all of them). My configuration file would look something like this*: (* of course I am happy to modify the format in order to simplify the necessary code, the consideration is that the customer will be building their own file by hand, so I want to avoid unnecessary overhead / obfuscation) theme: "A3" comment: "An octave below concert pitch (ie A4 440Hz)" presets: { A3 220Hz=220.0 } // http://en.wikipedia.org/wiki/Guitar_tuning theme: "Guitar Standard Tuning" comment:"EADGBE using 12-TET tuning" presets: { E2=82.41 A2=110.00 D3=146.83 G3=196.00 B3=246.94 E4=329.63 } theme: "Bass Guitar Standard Tuning" comment: "EADG using 12-TET tuning" presets: { E1=41.204 A2=55.000 D3=73.416 G3=97.999 } ...which need to be extracted into some structure like this: @class Preset { NSString* label; double freq; } @class Theme { NSString* label; NSMutableArray* presets; } NSMutableArray* themes; What are my options? How can I achieve this tidily? Can anyone point me towards some relevant code? (NOTE: this is NOT a duplicate of another question that has practically an identical title, so please don't flag it just because the titles match) JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
i find a xml property list easiest in many cases. you can edit it as xml or with an xml editor, which is not so difficult for average people to edit. parsing it will be much easier for you. as well, xcode will validate the xml. xcode can also convert the xml to binary when copied to the bundle, so the time to parse/read/size will all be efficient. then you simply open it like a NSDictionary and read valueForKey: to construct an object.

Related questions

0 votes
    I have an old custom built content management system in PHP, where users can write articles. When the body ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    How to change Status Bar text color in iOS?...
asked Mar 9, 2021 in Technology by JackTerrance
0 votes
    I've got a problem similar to this question: SAXParseException localized I'm trying to parse a XML file ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    Main way to read the data back in (parsing it) using the function. (a) dput() (b) write() (c) ... and Operations of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Hi Folks i was googling one more hours.i did not find anything relevant, I have text File like ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    read the data from employee. text file and sort on age using counting sort,merge sort,quick sort and write ... sortedemponage.txt'. Select the correct answer from above options...
asked Dec 22, 2021 in Education by JackTerrance
0 votes
    What are the types of iOS binaries you can create using XCode? (.app, .ipa, .a, .framework)...
asked Nov 10, 2020 in Technology by JackTerrance
0 votes
    How can we determine whether a file is successfully opened or not using fopen() function in C?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    which section is used for text and tags that are shown directly on your web page? A head B body. c title. d HTML Select the correct answer from above options...
asked Dec 27, 2021 in Education by JackTerrance
0 votes
    which section is used for text and tags that are shown directly on your web page? A head B body. c title. d HTML Select the correct answer from above options...
asked Dec 26, 2021 in Education by JackTerrance
0 votes
    which of the following is not a basic step in creating a worksheet? a) Save the workbook b) Modify the ... d) copy the worksheet Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    calc automatically left aligns the ..data in a cell and right aligns the data a) right and left. b) row ... c) text and number. Select the correct answer from above options...
asked Dec 11, 2021 in Education by JackTerrance
0 votes
    out of the following heading tags, which tag cause the browser to render text at the largest default size? a) b) c) d) Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    Why the parsing is used? (a) Interpretation (b) Building a parse tree (c) Recognition (d) All of the mentioned Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
0 votes
    How many states are present in parsing? (a) 1 (b) 2 (c) 3 (d) 4 Please answer the above question....
asked Oct 22, 2022 in Education by JackTerrance
...