Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8864877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:21:48+00:00 2026-06-14T16:21:48+00:00

I have a multiuser application and an array of dictionary for keeping information of

  • 0

I have a multiuser application and an array of dictionary for keeping information of each user. Each dictionary contains info of one user. For example I have following keys in per user Dictionaries.

userId

settings Within settings I have another Dictionary with keys musicVolume and language

I use these keys with the following code

 [settingsInfo setValue:[NSNumber numberWithInt:0] forKey:@"musicVolume"];

Now these keysName strings like @"musicVolume" were getting spread all over my code. So I decided to make a singleton UtilityClass that i could use to fetch the strings. Now code looks like

UtilityClass* shared = [UtilityClass sharedInstance]
[settingsInfo setValue:[NSNumber numberWithInt:0] forKey:shared.musicVolume];

but what I want to do is i.e. music volume with a different keyPath

[settingsInfo setValue:[NSNumber numberWithInt:0] forKey:shared.settings.musicVolume];

One way i could do it is by creating a struct or a class for settings and then keeping musicVolume with in it. But I was wondering if there is way to do it without creating the class or strict. Directly creating a variable with our own keyPath.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:21:50+00:00Added an answer on June 14, 2026 at 4:21 pm

    You can opt for const, #define, enum. But the best way in Dictionary that you are using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a multi-user web application. Each user can have their own site
So basically I have an application that works with just one user, but I'd
I have a database application that is configurable by the user - some of
I have an multi user application with basic layouts where i want to change
I have a multi-user application consisting of a flex client and blazeds/Spring/java backend -
I am developing a profile-based web application where each user is assigned there own
I have a need to migrate a legacy, desktop based, single user, accounting application
We have a brownfield multi-user application (99% Delphi, 1% .net) which uses NHibernate for
We have multi user frontend/backend MS Access 2010 application. We added a process that
Suppose I have an order which has order lines and we have a multi-user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.