Simple TextFilter problems.

Hello, I'm doing a digital text on my RichTextField filter, this is my code:

RichTextField = new RichTextField("",RichTextField.EDITABLE); De.setFilter (TextFilter.get (TextFilter.NUMERIC));

But I have 2 errors of the same type that say:

cannot find symbol
symbol: variable TextFilter

Any help is appreciated, thanks in advance.

You are quite new to Java?

Try to add an import statement for the classes that the compiler is unable to find, as the following:

Import net.rim.device.api.ui.text.NumericTextFilter;

Tags: BlackBerry Developers

Similar Questions

  • Very simple ExternalInterface problem :)

    Hello world

    I have a simple question/problem here that in my opinion should be very easy to fix, but I can't find examples of work there!

    What I have now:

    A simple .swf with a function that makes a movieclip (ball_mc) moves to the right called when a button is clicked in the html page:

    import flash.external.ExternalInterface;
    import flash.events.Event;
    
    ExternalInterface.addCallback("sendDataToFlash", moveBall); 
    
    function moveBall():void 
    
         {
              ball_mc.x = ball_mc.x + 20;
         } 
    

    And in my html, I have the following javascript code:

    <script>
    function moveBallOnClick() {
    getFlashMovie("ExternalInterfaceExample").sendDataToFlash();     }   
    </script>
    

    And then I call this function as follows:

    <form>
    <input type="button" onClick="javascript:moveBallOnClick();" value = "Move Ball" />
    </form>

    AND IT WORKS BEAUTIFULLY!

    It's just a simple button and I have a click and move the movieclip

    What I want to do:

    Instead of using the button on the form, I just want to do exactly the same thing but with a hyperlink instead.

    I use the button on the form in my html code now is because after 5 days of internet research, I just could not find a single example of running only a simple function. They were all examples of the sending of forms of text and so on, so I just simplified there from there.

    I want to just do exactly what Im doing now, run the function moveBallOnClick, but not with a form button, just with a normal hyperlink!

    Thank you very much in advance for anyone who can take a look at my problem and may offer assistance :)

    Good bye

    I think that you can just do something like this:

    Move the ball

  • Simple comport problem

    Hello

    I have problem to find the difference between the example vi and mine. I just sent an ascii code simple with 3 characters and CR LF at the end. If I run ' basic series write and Read.vi "in the examples, it works fine. BUT, if I accumulate by myself, even if I use the same components, it not send \r \n as characters as commands.

    Can someone cause a glance on it?

    MFG Rainer

    LV 8.5.1

    Hey Rainer,.

    When you insert your string to write? If you use the "Schreibpuffer" entry, you must change the type of view for "code view" and then insert the "\r\n". Right-click on the control (in the public Service) and select "display-Code.

    At the moment you send '\n' as the latter sign. If you don't want it, then change the Boolean constant false.

    It will be useful.

    Mike

  • simple table problem

    I have read some data from a text file and form a table according to my requirement (the illustrious photo attached).

    What my problem was when I used this table in an other vi through the connector components, all the lines in the resulting table the width of the line of maximum size, and are filled with zeros.

    How do I remove it? I need the lines ending with its own values, here in my case two first rows should have 5 items in the table, the elements of line 7 third and so on...

    Your VI makes no sense. Why not autoidenxing? Why "delete from table?

    Here's a simple possibility (just to write the resulting string in a file).

  • Performance TextFilter problem...

    Hi, I use textFielter in my CustomEditField in my Page of my connection request. TextFilter.Interger works fine but the problem is that it slows down the speed of typing in my editField... I also write my codes for my customTextFilter, login and CustomEdit Field... Kindly give me solution and suggestions for that...

    ----------------------------------------------LoginPage---------------------------------------------------------

    package mypackage;

    import java.util.Date;

    Import net.rim.device.api.lowmemory.LowMemoryListener;
    Import net.rim.device.api.lowmemory.LowMemoryManager;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.Font;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.component.EditField;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.container.VerticalFieldManager;
    Import net.rim.device.api.ui.text.TextFilter;

    /**
    * A class that extends the class screen, which offers default standard
    * behavior for BlackBerry GUI applications.
    */
    public class AgAppLoginPage extends screen implements FieldChangeListener / /, LowMemoryListener
    {

    Private CustomEditField txtMobileNumber;
    Private EditField editField.
    Private CustomPasswordEditField txtPinNumber;
    Private CustomButtonField btnLogin;
    private static String stxtMobileNumber;
    private static String stxtPinNumber;

    public AgAppLoginPage()
    {

    VerticalFieldManager vertMgr = VerticalFieldManager(Manager.VERTICAL_SCROLL | nouveau Manager.VERTICAL_SCROLLBAR |) USE_ALL_WIDTH | USE_ALL_HEIGHT)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {

    Super.sublayout (Display.getWidth (), Display.getHeight ());
    setExtent (Display.getWidth (), Display.getHeight ());

    }

    };

    LockedHeaderHorizontalManager HorMgr = new LockedHeaderHorizontalManager("LoginPage");

    vertMgr.add (HorMgr);

    CustomLabelField lblTop = new CustomLabelField ("Sign In", Font.getDefault () .getHeight () + 10, Field.FIELD_HCENTER |) DrawStyle.LEFT);
    txtMobileNumber = new CustomEditField ("Mobile number");
    txtPinNumber = new CustomPasswordEditField ("PIN");
    editField = new EditField("MyTextFilterEditField","");
    btnLogin = new CustomButtonField ("Log In", "Wide", "login.png");

    lblTop.setMargin (5,0,0,0);
    vertMgr.add (lblTop);

    txtMobileNumber.setMargin (5,0,0,0);
    vertMgr.add (txtMobileNumber);

    txtPinNumber.setMargin (5,0,0,0);
    vertMgr.add (txtPinNumber);

    vertMgr.add (editField);
    btnLogin.setMargin (5,0,0,0);
    btnLogin.setChangeListener (this);
    vertMgr.add (btnLogin);
    Add (vertMgr);
    This.Add
    }

    public void close()
    {
    If (Dialog.ask (4, "Do you really want to leave MCB-Lite") == Dialog.OK)
    System.Exit (0);
    }

    ' Public Sub fieldChanged (field field, int context)
    {
    if(Field == btnLogin)
    {
    If (txtMobileNumber.getTextLength () == 0 | txtPinNumber.getTextLength () == 0)
    {
    Dialog.Alert ("Please enter all info!");
    }
    on the other
    {
    stxtMobileNumber = txtMobileNumber.getText ();
    txtMobileNumber.setFilter (MyTextFilter.get (TextFilter.NUMERIC));
    editField.setFilter (MyTextFilter.get (TextFilter.NUMERIC));
    stxtPinNumber = txtPinNumber.getText ();
    getResponse processRequestAndWait = new processRequestAndWait();
    AgAppPleaseWaitScreen.showScreenAndWait (getResponse);
    txtPinNumber = null;

    }
    }

    }

    static class processRequestAndWait implements Runnable
    {

    public void run()
    {
    final String [] [] xmlResponse.

    If (AgAppHelperMethods.agAppConnection.CompareTo ("SMS")! = 0)
    {
    xmlResponse = AgAppHelperMethods.AgAppXMLParser ("AG_IT_App/AgMainServlet? messageType = LOG & pine = "+ AgAppHelperMethods.getPIN (stxtPinNumber) +" & mobile = "+ stxtMobileNumber +"& source ="+ stxtMobileNumber +" & channel = INTERNET; deviceside = true");
    = AgAppHelperMethods.AgAppXMLResponse xmlResponse (XMLResponse.login ());
    }
    on the other
    {
    AgAppHelperMethods.msg = "AGLOG" + stxtMobileNumber + stxtMobileNumber + AgAppHelperMethods.getPIN (stxtPinNumber); ".
    xmlResponse = AgAppHelperMethods.AgAppSMSParser ();
    }

    UiApplication.getUiApplication () .invokeLater (new Runnable()
    {
    public void run()
    {
    if(xmlResponse[0][0].) CompareTo ("null") == 0)
    {
    UiApplication.getUiApplication () .pushScreen (new AgAppResponseScreen ("Login screen", "host not Responding", Font.getDefault () .getHeight ()));
    }
    if(xmlResponse[1][1].) CompareTo("00") == 0)
    {
    TimeCalculator.timeStart = new Date();
    TimeCalculator.timeEnd = new Date();

    AgAppHelperMethods.varName = xmlResponse [3] [1];
    AgAppHelperMethods.varBalance = xmlResponse [4] [1];
    AgAppHelperMethods.varMobileNo = stxtMobileNumber;
    UiApplication.getUiApplication () .pushScreen (new AgAppHomePage());

    }
    on the other
    {
    UiApplication.getUiApplication () .pushScreen (new AgAppResponseScreen ("Login Screen", AgAppHelperMethods.getStatus(xmlResponse[1][1]), Font.getDefault () .getHeight ()));
    }
    }
    });
    }

    }

    }

    ----------------------------------------------------CustomEditField----------------------------------------------------------

    package mypackage;

    Import net.rim.device.api.ui.Color;
    Import net.rim.device.api.ui.Font;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.XYEdges;
    Import net.rim.device.api.ui.component.EditField;
    Import net.rim.device.api.ui.decor.BackgroundFactory;
    Import net.rim.device.api.ui.decor.Border;
    Import net.rim.device.api.ui.decor.BorderFactory;
    Import net.rim.device.api.ui.text.TextFilter;

    class CustomEditField extends EditField
    {
    Private boolean _focusableFlag;
    private String defaultText;

    public CustomEditField (String defaultText)
    {
    Super (FIELD_HCENTER);
    this.defaultText = defaultText;

    }

    {} public void setFocusable (boolean focusable)
    _focusableFlag = active;
    }

    protected void layout (int width, int height)
    {
    Width = Font.getDefault () .derive (Font.BOLD, Font.getDefault () .getHeight () - 2) .getAdvance ("transfer of my linked account") + 40.
    height = Font.getDefault () .getHeight ();
    Super.Layout (Width, Height);
    super.setExtent (width, height);
    super.setFilter (MyTextFilter.get (TextFilter.NUMERIC));

    }

    protected void paint (Graphics g)
    {
    setBorder (BorderFactory.createRoundedBorder (new XYEdges (5,5,5,5), 0xD0D0D0, Border.STYLE_SOLID));
    setBackground (BackgroundFactory.createSolidBackground (Color.WHITE));

    If (Super.GetText () .length () == 0)
    {
    g.setColor (0xD0D0D0);
    g.drawText (defaultText, 0, 0);
    }

    g.setColor (0x484C54);
    Super.Paint (g);

    }

    }

    ----------------------------------------------------------MyTextFilter---------------------------------------------------

    package mypackage;

    Import net.rim.device.api.ui.text.TextFilter;
    Import net.rim.device.api.util.CharacterUtilities;

    SerializableAttribute public class MyTextFilter extends TextFilter {}

    public char convert (character char, int status) {}
    TODO self-generating method stub
    If (! validate (character))
    {
    return 0;
    }
    Returns the character;
    }

    public boolean validate (char character) {}
    TODO self-generating method stub

    If (CharacterUtilities.isDigit (character))
    Returns true;
    ElseIf (CharacterUtilities.isLetter (character))
    {
    If ((caractère == serait ') |) (caractère == serait '))
    {
    Returns true;
    }
    }
    Returns false;
    }
    }

    It's a little hard to dig through the wall of the code, please use code tags next time.

    I don't think that the textfilter slows your app, I think that you run on the user interface thread things that belong here.
    Move to a thread blocking operations separate, you can use a callback model, for example.
    See
    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

  • Simple variable problem

    It is a really simple problem and I'll probably be a little dim but as I do not code things very often simple things tends to leave my brain.

    Summed up quite simply I have an if statement which, instead of using the current value of a variable appears to be implemented.

    More detailed description:

    I have 2 symbols, 'Olive', which is a three marked positions timeline animation, ' open, 'enabled' and 'closed' who defined the value of the variable 'positionO' as a result. I tested this little with alerts and is very well.

    When I mouse over the second symbol I want to retrieve the variable and play different parts of the animation depending on its value, well?

    I have this piece of code on the mouseover element:

    var myVariable = sym.getComposition().getStage().getSymbol("Olive").getVariable("positionO");
    if (positionO = 'open'){
    alert (positionO);
    }
    

    Now to me, this should trigger the alert if the variable is set to 'open' and do nothing if the value is something else, but what he is doing is setting the variable 'open' and shooting alert anyway.

    Thanks in advance,

    Alex.

    Try this (equal) 2 for comparison:

    if (positionO is 'open') {alert (positionO) ;}

  • SIMPLE ILLUSTRATOR PROBLEM... HELP PLEASEEE

    INTRO
    Hey if I design a logo for my uni course and its due soon and I need help on something very simple.

    OVERVIEW
    I drew a picture using the online tool, all the lines are connected by creating various forms...

    PROBLEM
    I need to know how to fill it with the color... I don't can slect the forms I want to fill and use the object-live paint-making. but tht means I can fill only... I need to be able to use the NET tool to create effects...

    any help would be greatly appreciated. Thank you

    Problem is when you use the online tool, where the two lines intersect, they remain as separate entities. In other words, the online tool was design to create a line. However if you want to take the time, you can use the point selection tool (one on keyboard in lowercase) slide select the corner where they intersect, right-click, and select attach (windows) (also oppose > path > will work join or ctrl-j), select the type of angle you want, and then click ok. And repeat for each corner.

    When you're done you can give it a fill or a color path and size.

    Or create a new layer (optional: change the color of the path to make it easier to see what you are doing)

    lock the old layer,

    Select the pen tool and click on the top of each corner (point or anchor).

    When you reach the last point, the cursor will change to tell you that you close the path.

    At this point, you can change the size/color fill and path.

  • Very simple messaging problem...

    I want to go back to the mac mail view where each piece of e-mail show content, including graphics.  When you scroll to this topic you can see this because it is located in the mailbox.  Hard to describe.  but when we work to add gmail for e-mail, the e-mail screen has changed and I can't find a way to get it back to the old style.

    Hi Revkurtak,

    Thank you for using communities Support from Apple! I'm sorry to hear you're having this problem with your Mac. If you use Mail in 10.7, you can see if the option "available classic use" is selected; It is found in Mail > Preferences... > watch one, near the top of the window. You can try to turn this option on or off and see if you get your favorite Mail view.

    See you soon

  • A simple keyboard problem.

    My keys are does not record the symbols to the right. The letters are OK, but are not symbols. I use a basic wired keyboard that isn't any driver disk.

    For example, the @ product key "- and vice versa."
    I don't know where to find the pound sign!
    I recently had to reinstall Windows XP and have done everything to British English. Perhaps, I missed a setting inadvertently.
    I'm sure it's a simple framework, but do not know where to look.
    Any help would be appreciated.
    Kind regards
    Alex Knell

    My keys are does not record the symbols to the right. The letters are OK, but are not symbols. I use a basic wired keyboard that isn't any driver disk.

    For example, the @ product key "- and vice versa."
    I don't know where to find the pound sign!
    I recently had to reinstall Windows XP and have done everything to British English. Perhaps, I missed a setting inadvertently.
    I'm sure it's a simple framework, but do not know where to look.

    Any help would be appreciated.
    Kind regards
    Alex Knell

    You use the wrong keyboard layout...

    To change it, click the start ORB, click Control Panel, and then click on the region and language. Click the keyboards and languages tab and then change keyboards and choose one that suits you.

  • Simple Regex problem with symbols

    I need split a text and get only the words, numbers and hyphenated compounds-words. I need to get words from latin too, then I used \p{L}, which gives me e u u a and so on. The example is:

    String myText = "of the latin text with symbols? 987 (cutting-edge Southeast of the island stands the Notre-Dame Cathedral, which was at its completion in 1330, one of the largest cathedrals West):! @ # $ % ^& * ( ) + - _ #$% " ' : ; > < /--------| "here some is wrong... * + (e)-

    Pattern pattern = Pattern.compile("[^\\p{L}+(\\-\\p{L}+)*\\d]+"); "
    String of words [] = pattern.split (myText);

    What is the problem with this regex? Why it matches symbols like "(", "+", "-", "*" et "|"?) "

    Some results are:

    dress / / OK
    Southeast / / OK
    West) / / BAD
    987 / / OK
    () / / BAD
    (a / / BAD)
    * / / BAD
    -/ / BAD
    + / / BAD
    (/ / BAD)
    | EVIL

    P.S.:
    The explanation of the regex is:

    [^ \p {L} + (\-\p {L} +) * \d] +

    * Word breaker will be:
    * [^  ...  ] No sequence in:
    * \p{L}+ any Latin letter
    * (\-\p{L}+)* possibly a hyphen)
    * \d or numbers
    * [...] + one or more times.

    Try to divide as it will always be difficult as you try to match what you don't want. I would use Pattern.find () looking for things I want. Something like

    
           Pattern p = Pattern.compile("(\\p{L}+([-']\\p{L}+)*)|\\d+");
                Matcher m = p.matcher(myText);
            while (m.find())
            {
                System.out.println(m.group());
            }
    
  • ? simple printer problem

    iMac 21.5, Fusion 3, XP, HP5610 AIO

    My printer, above, will only print in XP when I suspend XP.  In the "Printers and faxes" window the printer is laballed 'ready', but the box is black and white and not green.

    Have you read the above linked Articles and followed the steps to try to solve your problem?

    The information you presented at the opening of this thread, I have to agree with the assessment of Eric and do what he suggested, or at least how to move the printer is connected directly between the host and the guest via USB and unplug the printer USB of the virtual machine.

  • Activation of DPS simple editing problem

    Last week, should apply in the creative cloud.

    Unique Edition of DPS ipa, zip store always why not?

    DPS simple editing (ipa, zip down and submit to appstore). I would like to use.

    qaadobe.jpg

    You can create a simple editing in this way with creative cloud application.

    Open the Panel builder folio in InDesign and choose Create App.

    Bob

  • Simple CSS problem... I hope.

    Hello world

    I am very nw web design and I have a very basic problem, which is:

    CSS background on the body. (using DW CS3)

    All I would do is have an image in the top, left, and repeat-x, I can get it, is the easy part, the problem I have is that nothing else shows when I Preview in the browser, NOTHING else, without tables, text, iamge, just repeat body background image?

    any help would save my mind of the explosion, thank you.

    What do you mean nothing else shows?

    I just copied the html and css code and I see the table and the text very well. However, I'm on CS4.

    I notice you have a lot of empty table cells. Try to insert nonbreaking spaces - & nbsp;  (remove the space after the &) in empty cells. I don't know if CS3 has had a problem with the empty table cells.

  • Simple game problem

    I'm trying to lay the groundwork for a simple platform game. I start the game, a short animation applies when the controlled player character collides with an invisible (alpha = 0) object. This seems like it should be very simple, but after searching the web for a long time, I have not been able to find a piece of actionscript code that does this simple task. I work in Flash MX and tried many variations on this code, and none of them have worked:

    onClipEvent (load) {}

    {if (this.hitTest (_root.char))}

    gotoAndPlay (2);

    }

    }

    I tried to put this code in the actions of the invisible trigger of the animation, as well as to put a piece of code by replacing ".char" with ".triggera" in the actions of the character

    I put it in place so that the game playable is frame 1, and the short animation is frames 2-90, concluding in another form of game.

    Help, please!

    probably your hittest must run repeatedly (unless you don't want to run a hittest loading your object).  for this reason, place the hittest in a onenterframe loop.  You should also attach any code to objects.

  • Simple interpolation problem

    Hello I just started to play round with Flash.  I'm a tutorial on interpolation but am having a problem.

    All I'm trying to do is move a chart (converted to symbol) from one side to the other.

    However, when I try to put it in the "motion tween" keeps telling "multiple items are selected, you must convert them to a symbol in order to interpolate.»  You want to convert and create a Tween? " If I click 'Ok' it happens with ' interpolation can not apply to some of the selected frames."  This could be due to the image containing the ActionScript, several objects, non-interpolable objects or be on a layer that may not be a Tween layer'

    Can someone tell me why they think that what is happening?

    I'm sure its really easy, but its frustrating me and I've been sitting trying to get by for centuries!

    Thank you!

    Hey clemas, I had the same problem as you. You look at these tutorials? The creation of 2D animation to help animate CC | Tutorials of CC animate Adobe . I discovered that I had not converted to separate symbols. F8 is the shortcut. Hope this helps.

Maybe you are looking for

  • Black ink cartridge will not print

    Putting in a new black ink cartridge the printer says it's there and full of new ink but when printing it don't use it. It happened the last time that I put in the black cartridge and I managed to do it finally work but don't remember what I did. Why

  • The lack of notification Center

    I'm under El Cap 10.11.3 (unfortunately) on an iMac 27 end-2011 ", but I think that this problem exists in the Yosemite Park and perhaps even further. I see the icon in the menu bar above to the extreme right to Notification Center and have the Notif

  • Satellite A80-135 PSA80: after updating Bios keyboard will not

    SATELLITE A80 - 135 MS (MS is for Spanish)?model PSA80E-04C00JSPSER 55XXXXXXK Windows xp sp3 Spanish -> Update of the riginal 1.5_ bios (bios ID EAT10 / EAT20 bios version: v1.50)for _v 2.8_ Downloaded bios - 20070709170816.zip of the Spain of toshib

  • Hello from blackBerry Smartphones

    Hello, in spite of having a "BOLD" for a year now I'm new here. Recently changed handset that the original stopped battery charge. And now I have problems of vaious with applications. (1) can't download windows live messenger. simply no button to do.

  • BlackBerry smartphone connection to the net - URGENT

    OK, just got my phone for my Christmas present, and I want to connect to the internet, I could do with my parents because it requires a number that was in the back of the internet zone. I tried to do the same tonight but he asked a number of psk I ne