preferences

Make Preference look disabled, but still register clicks

邮差的信 提交于 2020-03-18 10:55:12
问题 So during certain states in my app, I want to disable certain CheckBoxPreferences in my setting-menu. However, if the user clicks them, I want an explanatory toast to be shown. If i just do setEnable(false); on the CheckBoxPreference, I do get the right look and feel. But I cant get a toast to be shown on click. On the other hand, I have failed in manually making a CheckBoxPreference look like it is disabled. 回答1: Instead of disabling the preference, you can as well disable the views of the

Opening IOS settings preferences

為{幸葍}努か 提交于 2020-02-23 07:40:47
问题 Im having a problem opening the settings preferences in my IOS iphone app. At the moment im just using a simple button to test and it doesn't seem to be working correctly. Basically when I click the button I want a specific settings preference page to open. This is what Im currently using within my buttons IBACTION: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]]; Hope you guys can help me out with a solution for this, thanks in advance. 回答1: try this:

How can I write System preferences with Java? Can I invoke UAC?

情到浓时终转凉″ 提交于 2020-01-25 06:04:31
问题 How can I write system preferences with Java, using Preferences.systemRoot()? I tried with: Preferences preferences = Preferences.systemRoot(); preferences.put("/myapplication/databasepath", pathToDatabase); But I got this error message: 2010-maj-29 19:02:50 java.util.prefs.WindowsPreferences openKey VARNING: Could not open windows registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 5. Exception in thread "AWT-EventQueue-0" java.lang

How can I write System preferences with Java? Can I invoke UAC?

那年仲夏 提交于 2020-01-25 06:04:11
问题 How can I write system preferences with Java, using Preferences.systemRoot()? I tried with: Preferences preferences = Preferences.systemRoot(); preferences.put("/myapplication/databasepath", pathToDatabase); But I got this error message: 2010-maj-29 19:02:50 java.util.prefs.WindowsPreferences openKey VARNING: Could not open windows registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 5. Exception in thread "AWT-EventQueue-0" java.lang

How can I write System preferences with Java? Can I invoke UAC?

南笙酒味 提交于 2020-01-25 06:04:05
问题 How can I write system preferences with Java, using Preferences.systemRoot()? I tried with: Preferences preferences = Preferences.systemRoot(); preferences.put("/myapplication/databasepath", pathToDatabase); But I got this error message: 2010-maj-29 19:02:50 java.util.prefs.WindowsPreferences openKey VARNING: Could not open windows registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 5. Exception in thread "AWT-EventQueue-0" java.lang

java.util.Prefs throwing BackingStoreException - Why?

十年热恋 提交于 2020-01-22 06:58:16
问题 I have a system that caches the tiny/simple results of an on-startup SOAP call I need instances to be able to reload their cache on startup (in case the SOAP service is dead) and ALSO handle the possibility of multiple instances using this cache file I chose to use java.util.prefs but Java's builtin automatic sync thread is intermittently failing (1% of time using default JVM 30s backing store sync) dumping the following the exception: Jan 8, 2010 12:30:07 PM java.util.prefs

java.util.Prefs throwing BackingStoreException - Why?

寵の児 提交于 2020-01-22 06:53:45
问题 I have a system that caches the tiny/simple results of an on-startup SOAP call I need instances to be able to reload their cache on startup (in case the SOAP service is dead) and ALSO handle the possibility of multiple instances using this cache file I chose to use java.util.prefs but Java's builtin automatic sync thread is intermittently failing (1% of time using default JVM 30s backing store sync) dumping the following the exception: Jan 8, 2010 12:30:07 PM java.util.prefs

Can my Eclipse plugin change preferences from other plugins?

江枫思渺然 提交于 2020-01-21 05:45:08
问题 I'm working on an Eclipse plugin that needs to change some preferences defined by other plugins, e.g. the tab size in text editors. Is that possible? 回答1: Yes, it is possible. You'll need this in your preference page: setPreferenceStore( new ScopedPreferenceStore( new InstanceScope(), "bundle-name-of-other-plugin" ) ); Or you could do something like this here. FYI, the preferences live here: pathToWorkspace\.metadata\.plugins\org.eclipse.core.runtime\.settings 来源: https://stackoverflow.com

NSUserDefaults standardUserDefaults setObject: forKey: not working for Multivalue preference

女生的网名这么多〃 提交于 2020-01-14 03:27:10
问题 I am trying to do following task [[NSUserDefaults standardUserDefaults] setObject:@"Dry" forKey:@"vesselType_preference"]; [[NSUserDefaults standardUserDefaults] synchronize]; where my "vesselType_preference" is multivalue attribute, but it is not getting effected. Please help this is working for other type of attribute but not working for multivalue type. Thanks 回答1: NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if (![defaults objectForKey:@"vesselType_preference"]) {

Java Swing Mac OSX Preferences Menu

♀尐吖头ヾ 提交于 2020-01-13 09:11:11
问题 I'm trying to add the Preferences menu to my Java Swing application and it's proving a bit of a nause. I have read many posts and articles on this and it sounds easy but... I see references to com.apple.eawt.Application in the examples I have found but when I try to import it in Eclipse Indigo I get an error: Access restriction: The type Application is not accessible due to restriction on required library /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar Any ideas? I