Whats the problem? Logcat errors? You can access via Context, which I see you are doing.
On Fri, Oct 8, 2010 at 12:53 AM, Ehask <[email protected]> wrote: > I have an app I am working on and being new to Android Dev I am > running into a situation > > I have a Scores class not extended from anything (Activity,Service, > etc) but in the same package that needs to access SharedPreferences > > public class Scores { > > Context ctcx; > > public Scores(Context context) { > ctcx = context; > } > > public void resetScores(){ > > SharedPreferences pref = > getSharedPreferences("MyPref",ctcx.MODE_PRIVATE); > > } > > } > > Always results in constructor not defined? All the imports are there > and Eclipse doesnt flag until it tries to run on emulator. Does > everything have to extend something in android? > > Thx for any guidance > Eric > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

