Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set a default value for the ranker preference #1380

Merged
merged 1 commit into from Feb 9, 2013
Merged

set a default value for the ranker preference #1380

merged 1 commit into from Feb 9, 2013

Conversation

skurfer
Copy link
Member

@skurfer skurfer commented Feb 9, 2013

Prevents a notification that implies the ranker couldn't be loaded.

pjrobertson added a commit that referenced this issue Feb 9, 2013
set a default value for the ranker preference
@pjrobertson pjrobertson merged commit 5fdef39 into quicksilver:master Feb 9, 2013
@pjrobertson
Copy link
Member

@pjrobertson pjrobertson commented Feb 9, 2013

Did we forget a release branch this time? Aaah well :)

@skurfer skurfer deleted the defaultRanker branch Feb 9, 2013
@skurfer
Copy link
Member Author

@skurfer skurfer commented Feb 9, 2013

I did create a release branch just before submitting this, but forgot to change the base. I'll get it into release manually. Thanks.

@keith
Copy link

@keith keith commented Mar 9, 2013

This could have also probably been fixed by changing this method in QSObjectRanker.m to:

+ (void)initialize {
    NSString *className = [[NSUserDefaults standardUserDefaults] stringForKey:@"QSStringRankers"];
    if (!className) {
        className = @"QSDefaultStringRanker";
    }

    [self setDefaultStringRanker:className];
}

@skurfer
Copy link
Member Author

@skurfer skurfer commented Mar 9, 2013

True, but we already have code that uses default values from the plist. We need to be in the habit of defining defaults there for every preference. (Same goes for any plug-ins that provide custom prefs.) Plus, there could be more than one class that uses a pref. We wouldn't want to initialize the same default in every one. 😃

@keith
Copy link

@keith keith commented Mar 9, 2013

Yes I agree that setting the preference is better for this. Although if the preference wasn't set it would make sense to default to one. But obviously once this update is out that shouldn't happen. Just wanted to document that just in case anything involving this came up in the future 😃

@skurfer
Copy link
Member Author

@skurfer skurfer commented Mar 11, 2013

OK, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants