Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Problem with casting rom EditTextPreference

Problem with casting rom EditTextPreference

Put your problem here if it does not fit any of the other categories.

Problem with casting rom EditTextPreference

Postby rootman » Tue Apr 10, 2012 4:04 pm

Hi, I receive ClassCastException when I try to cast from EditTextPreference to object of my class that extends EditTextPreference. This is my class.

Code: Select all
public class EditPreference extends EditTextPreference{
   
   public EditPreference(Context context,AttributeSet attrs,int defStyle ){
      super(context,attrs,defStyle);
      // TODO Auto-generated constructor stub
   }
   
   public EditPreference(Context context,AttributeSet attrs) {
      super(context,attrs);
      // TODO Auto-generated constructor stub
   }
   
   public EditPreference(Context context) {
      super(context);
      // TODO Auto-generated constructor stub
   }

   @Override
   public void onClick(DialogInterface dialog, int which) {
      // TODO Auto-generated method stub
      super.onClick(dialog, which);
      
      switch(which){
         case DialogInterface.BUTTON_POSITIVE:
            break;
         
         case DialogInterface.BUTTON_NEGATIVE:
            break;
      }
   }
   

Code: Select all
private EditTextPreference edp;
private EditPreference ed;

In second line i receive exception

Code: Select all
edp = (EditTextPreference) findPreference("broadcasting");
ed = (EditPreference)edp;


Any suggestion how to solve this problem ?
rootman
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jan 04, 2012 6:30 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 7 guests