The ActiveRichTextField crazy setChangeListener method

I use JDE 4.6 and Simulator 8900, I don't know what the problem is with the ActiveRichTextField, here is my code:

class Test extends MainScreen implements FieldChangeListener{   

        Test(){
            try{
               ActiveRichTextField temp1 = new ActiveRichTextField("ActiveRichTextField is crazy when");
               add(temp1);
               temp1.setChangeListener(this);
            }catch(Exception e){
               System.out.println("Throw here plz "+e);
            }

         }

        public void fieldChanged(Field field, int context)
        {
                Dialog.alert("Clicked");
        }
}

It always throws RuntimeException when I press this screen, there will be no problem if I remove 'when' work in the setChangeListener string line or a comment. It does not happen with RichTextField, but I need a text field selectable color so I have to use this one. Need me 4 hrs digging when the error occurs and get stuck now. Please let me know if you have an idea about it.

Thank you.

check the context:

public static final int PROGRAMMATIC
Indicates the field change was made programmatically.

Tags: BlackBerry Developers

Similar Questions

  • Getting 7 error with the HTTP POST vi method when deplyed ISO crio as executable... urgent!

    Hi all

    I have an application where I can access the net server point of LabVIEW via the HTTP protocol to send the data. My application works fine when I run it on XP, and also sometimes on cRIO. I'm writing and reading files to store and read data from the server.

    When I do my application executable and deployed on cRIO I am constantly 7 error that says "Error in the node library function to call at the POST vi LabVIEWHTTPCLIENT".

    After getting this error if I try to run the my new project the crio (not through exe) I keep getting the same error. This means once the executable file is deployed on the crio, I get the error in my project application which was working fine before you deploy the executable file.

    7 occurs very frequently. and I am unable to find the reason. I gave all the paths in the constant form located on crio and files accessible also when the application is run.

    Is someone can you please help me what this error 7?

    as a result, that it is bound to the HTTP POST vi method...

    How can it be fix?

    Its quite urgent...

    Thanks in advance.

    Solution is provided by the NOR... Vi POST method missing two files that need to be there in the startup of the CRIO.insted folder there is in the system folder. That's why when running the exe that the startup on crio application it gives error as the files are not there. The fix for this HTTP POST vi update isn't out yet EITHER.

  • Try to uninstall the Microsoft compatible control method battery driver ACPI

    Separated from this thread.

    I'm trying to uninstall the Microsoft compatible control method battery driver ACPI.  When I right click the icon and click on uninstall, it won't uninstall after restart or stop.  Is there another way to uninstall the drivers?

    Hello

    Thank you for visiting Microsoft Answers.

    According to the description, I understand that you are not able to uninstall the control method compatible with Microsoft ACPI Driver of the computer battery.

    I certainly understand the inconvenience caused to you and I'll do my best to help you.

    In order to understand the issue more clearly, please provide me the following information.

    1. Why you want to uninstall battery compatible with Microsoft ACPI Driver control method?

    2. Are you facing any problem with battery Microsoft ACPI compatible method?

    I want to provide you with the information that the compatible Microsoft ACPI control method battery component supports Advanced Configuration and Power Interface (ACPI) control method battery, include an interface to control method of code ACPI Machine Language (AML) between the battery and the host computer.

    It cannot be uninstalled.

    I hope this information is useful.

    Please let us know if you need more help, we will be happy to help you.

    Thank you.

  • The Java Exception: java.lang.reflect.InvocationTargetException: during the java.lang.reflect.Method .invoke call.

    Local channel & xquery = 'Test Apache';

    Local chain & xquery1 = "test map";

    Local JavaObject & XSSFWorkbook = CreateJavaObject ("org.apache.poi.xssf.usermodel.XSSFWorkbook");

    Local JavaObject & jClass = GetJavaClass ("java.lang.Class");

    Local JavaObject & jCompileArgTypes = CreateJavaObject ("java.lang.Class []" & jClass.forName ("java.lang.String"));

    Local JavaObject & jCompileMethod = & XSSFWorkbook.getClass () .getDeclaredMethod ("createSheet", & jCompileArgTypes);

    Local JavaObject & sheet1 = jCompileMethod.invoke (& XSSFWorkbook, CreateJavaObject ("java.lang.Object [] ' and xquery"));

    Local JavaObject & Sheet2 = & jCompileMethod.invoke (& XSSFWorkbook, CreateJavaObject ("java.lang.Object []", & xquery1));

    Local JavaObject & int = GetJavaClass ("java.lang.Integer");

    Local JavaObject & IntType = GetJavaClass ("java.lang.Integer"). TYPE;

    Local JavaObject & jIntArgTypes = CreateJavaObject ("java.lang.Class []", & IntType);

    Local JavaObject & jcreateRow = & sheet1.getClass () .getDeclaredMethod ("createRow", & jIntArgTypes);

    Local number I & k;

    & k = 1;

    For & i = 1 to 40000

    Local JavaObject & rank = & jcreateRow.invoke (& sheet1, CreateJavaObject ("java.lang.Object []" & i));

    Local JavaObject & jcreatecell = & Row.getClass () .getDeclaredMethod ("createCell", & jIntArgTypes);

    Local JavaObject & cell = jcreatecell.invoke (& Row, CreateJavaObject ("java.lang.Object []" and k));

    Local JavaObject & setCellValue = cell.getClass () .getDeclaredMethod ("setCellValue", & jCompileArgTypes);

    Local JavaObject & cellvalue = setCellValue.invoke (& cell, CreateJavaObject ("java.lang.Object []", "interesting it's nice"));

    -End;

    REM JavaObject Local & autoSizeColumn = & sheet1.getClass () .getDeclaredMethod ("autoSizeColumn", & jIntArgTypes);

    REM JavaObject Local & autoSize = autoSizeColumn.invoke (& sheet1, CreateJavaObject ("java.lang.Object []", 0));

    Local JavaObject & out = CreateJavaObject ("java.io.FileOutputStream", "/ psoft/fs9devt/UserUpload/ap/comments12.xlsx", True);

    & XSSFWorkbook.write(&out);

    & out.close ();

    get error below when running the code above through driving the demand, but he worked for 1 print the line, but when it's on a loop, it throws this error.

    The Java Exception: java.lang.reflect.InvocationTargetException: during the java.lang.reflect.Method .invoke call.

    I came across the same thing as you. I did a lot of experimenting and found it works:

    var result = (function() {
        var ReflectiveArray = java.lang.reflect.Array;
        var CreateSQL = Packages.PeopleSoft.PeopleCode.Func.CreateSQL;
        var columns = ReflectiveArray.newInstance(java.lang.Object, 1 /* number of selected columns */);
        var results = [];
    
        SQL = CreateSQL("SELECT OPRDEFNDESC FROM PSOPRDEFN WHERE ROWNUM < 10");
        while (SQL.Fetch(columns)) {
            results.push(columns[0]);
        }
    
        return results.join();
    
    }());
    

    He seems to have been a problem with translation between the JavaScript array and the Java array Object []. I solved this by using java.lang.reflect.Array.newInstance to create a new instance of the object [1].

    Next issue to deal with is your memory problem. In the error message, it seems to have something to do with the Garbage Collection and a lot of temporary objects. You declare you line and cell by using the var =... line and cell var =...? If not, then they are in the global namespace and properties of the global object. At the end of each iteration of the loop, use delete line and delete cells. If you declare the var, then set their value null at the end of each iteration. Based on your code, I expect each time through the loop would decrease the number of references, but I saw where setting explicitly using null. The only other temporary object I see is the value in the table. Just for fun, I added this at the end of each loop, and he ran very well:

    columns[0] = null;
    
  • wcmUrl cannot run the "evaluateScriptEx" of service method. The server script expression evaluates error. No path required for the ssWeblayoutUrl parameter.

    Hi all

    I have a data file where there is a wcm:element like below

    < wcm:element = "linkUrl" name > [!-$wcmUrl ('resource', ")-] < /wcm:element>

    So, I get an exception to content server


    Event generated by the user 'sysadmin' to host 'CIS '. Could not generate the HTML page. Unable to evaluate the function. Error running system. wcmUrl cannot run the "evaluateScriptEx" of service method. The server script expression evaluates error. No path required for the ssWeblayoutUrl parameter. [Details]

    An error has occurred. The stack trace below shows more information.

    !csUserEventMessage,sysadmin,CIS!$!csPageMergerUnableToGenerateHtmlPage!csDynHTMLSystemExecutionError,csDynHTMLReportMsgFunction!$wcmUrl!csUnableToExecMethod,evaluateScriptEx!csDynHTMLServerScriptEvalError!$Missing required path parameter for ssWeblayoutUrl.

    intradoc.common.ServiceException:! csPageMergerUnableToGenerateHtmlPage

    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)

    at intradoc.server.Service.buildServiceException(Service.java:2271)

    at intradoc.server.Service.createServiceExceptionEx(Service.java:2265)

    at intradoc.server.Service.createServiceException(Service.java:2260)

    at intradoc.server.Service.buildResponsePage(Service.java:1314)

    at intradoc.server.Service.doResponse(Service.java:2076)

    at intradoc.server.FileService.doResponse(FileService.java:1469)

    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:802)

    at intradoc.server.Service.doRequest(Service.java:1890)

    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)

    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)

    at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)

    to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:528)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Caused by: java.io.IOException:! csDynHTMLSystemExecutionError, csDynHTMLReportMsgFunction! $wcmUrl

    at intradoc.common.DynamicHtmlMerger.createIOException(DynamicHtmlMerger.java:2588)

    at intradoc.common.DynamicHtmlMerger.evaluateGrammarElement(DynamicHtmlMerger.java:1202)

    at intradoc.common.DynamicHtmlMerger.substituteVariable(DynamicHtmlMerger.java:623)

    at intradoc.common.DynamicHtml.substituteVariable(DynamicHtml.java:1394)

    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1110)

    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)

    at intradoc.common.DynamicHtml.outputHtml(DynamicHtml.java:991)

    at intradoc.common.DynamicHtmlMerger.outputDynamicHtmlPage(DynamicHtmlMerger.java:2007)

    at intradoc.server.Service.buildResponsePage(Service.java:1267)

    ... more than 10

    Caused by: intradoc.common.ServiceException:! csUnableToExecMethod, evaluateScriptEx

    * ScriptStack! csDynHTMLStackDumpStart, sysadmin, (datasummary) IdcService is SSXA_GET_DATAFILE\, dDocName = 00151164\, = 209607 dID! $

    ! csDynHTMLNoStack! $

    !csDynHTMLErrorMessage,/oracle/ecm/ucm_domain/ucm/cs/weblayout/groups/public/@global/documents//mdaw/mtux/~edisp/00151164~2.xml.parsed,9,40!csDynHTMLSystemExecutionError,csDynHTMLReportMsgFunction!$wcmUrl!$

    -& #62;      & #60; WCM:element name = "linkUrl" & #62; [(--\!--$wcmUrl('resource'\, '')]; & lt; / span & gt; & #60; / wcm:element & #62;

    in sitestudio. SSClassHelper.invoke (unknown Source)

    in sitestudio. SSScriptExtensions.evaluateIncludeXmlEx (unknown Source)

    in sitestudio. SSWCMScriptExtensions.resolveWcmUrl (unknown Source)

    in sitestudio. SSWCMScriptExtensions.evaluateFunction (unknown Source)

    at intradoc.common.DynamicHtmlMerger.computeFunction(DynamicHtmlMerger.java:1430)

    at intradoc.common.DynamicHtmlMerger.evaluateGrammarElement(DynamicHtmlMerger.java:908)

    ... more than 17

    Caused by: java.io.IOException:! csDynHTMLServerScriptEvalError

    at intradoc.common.DynamicHtmlMerger.createIOException(DynamicHtmlMerger.java:2588)

    at intradoc.common.DynamicHtmlMerger.evaluateGrammarElement(DynamicHtmlMerger.java:1202)

    at intradoc.common.DynamicHtmlMerger.substituteVariable(DynamicHtmlMerger.java:623)

    at intradoc.common.DynamicHtml.substituteVariable(DynamicHtml.java:1394)

    at intradoc.common.DynamicHtml.outputHtmlEx(DynamicHtml.java:1110)

    at intradoc.common.DynamicHtml.outputHtmlFromStart(DynamicHtml.java:1020)

    at intradoc.common.DynamicHtml.outputHtml(DynamicHtml.java:991)

    at intradoc.common.DynamicHtmlMerger.executeDynamicHtmlToWriter(DynamicHtmlMerger.java:2060)

    at intradoc.common.DynamicHtmlMerger.evaluateScriptToWriter(DynamicHtmlMerger.java:1872)

    at intradoc.common.DynamicHtmlMerger.evaluateScriptNoErrorHandling(DynamicHtmlMerger.java:1836)

    at intradoc.common.DynamicHtmlMerger.evaluateScriptEx(DynamicHtmlMerger.java:1794)

    at sun.reflect.GeneratedMethodAccessor500.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    in sitestudio. SSClassHelper.invokeRaw (unknown Source)

    ... 23 more

    Caused by: intradoc.common.ServiceException: path of access is required for ssWeblayoutUrl parameter.

    * ScriptStack! csDynHTMLStackDumpStart, sysadmin, (datasummary) IdcService is SSXA_GET_DATAFILE\, dDocName = 00151164\, = 209607 dID! $

    ! csDynHTMLStackElementWithFilename,wcmUrl,/oracle/ecm/ucm_domain/ucm/cs/weblayout/groups/public/@global/documents/generalmodule/mdaw/mtux/~edisp/00151164~2.xml.parsed,9,40!$

    ! csDynHTMLServerScriptEvalError

    in sitestudio. SSScriptExtensions.evaluateFunction (unknown Source)

    at intradoc.common.DynamicHtmlMerger.computeFunction(DynamicHtmlMerger.java:1430)

    at intradoc.common.DynamicHtmlMerger.evaluateGrammarElement(DynamicHtmlMerger.java:908)

    Therefore I don't see the placeholder to correct the link. How can I fix this, or at least manage the display of the placeholder.

    Concerning

    I don't think the resources without the dDocName specification will work (for example [!-$wcmUrl ('resource', ")-]).

    At some point, the code path probably leaves the SiteStudio component and goes back to the core code WebCenter content to fetch the revision. It seems that it is where he meets a problem (impossible to find the last out for review).

    If you turn on additional detailed complete tracking for site *, file * and system * this gives you a clues?

    Jonathan

    https://jonathanhult.com

  • How to use the Teststand API DisplayEditNumericFormatDialog method

    Hello

    I have to create a report for Teststand coustom generator plugin using c#. In the Teststand API is a built-in method called 'DisplayEditNumericFormatDialog '.

    http://zone.NI.com/reference/en-XX/help/370052M-01/tsapiref/reftopics/propertyobject_displayeditnume...

    Is there a way to set the value of the sample of the window that appears if the method is called?

    I do the following things:

    private void button1_Click (object sender, EventArgs e)
    {
    mChanged = true;
    bool tempbool;

    PropertyObject tempobject = mEngine.NewPropertyObject (PropertyValueTypes.PropValType_Number, false, "", 0); creates a temporary PropertyOgject to view the EditNumericFormatWindow

    tempobject. NumericFormat = mConfig.GetValString (P_PluginSpecific_Options_NumericFormat, 0); read the digital format of the plugin options
    tempobject. DisplayEditNumericFormatDialog ("Digital Format", out (tempbool), 1); View the EditNimericFormatWindow

    If (tempobject. NumericFormat == "") mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, "%$.13g");
    else mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, tempobject.) NumericFormat);

    MessageBox.Show (tempobject. NumericFormat.ToString ());
    }

    Thanks in advance

    Hello f4bo,

    attached is a sequence that shows how this can be done.

    Locals.Local = RunState.Engine.NewPropertyObject (PropValType_Number, False, "", 0x1),.
    Locals.Local.AsPropertyObject.NumericFormat = "%b"
    Locals.Local.AsPropertyObject.SetValNumber ("", 0, 20),.
    Locals.Local.AsPropertyObject.DisplayEditNumericFormatDialog ("false title", False, 0)

  • the cDAQ-9188 discovery method?

    I have a cDAQ-9188 I prepare for use by customers in the area.  These customers tend to forget IP addresses, and I would like to add something to my request to help.  Something installed "NI Network Browser" on my development machine.  I suspect it was DAQmx 9.2.2.  This browser appears to be a shortcut to a web page of Silverlight being served off port 59648.  The browser does a good job to list the chassis on the network, and I would like to know if there is a way to make this work in LabVIEW.  It uses UDP or something?

    I know that the standard method would be to ask clients to use the network browser, but I'll try match the SCXI-1600 user experience where you just plug in and it appears.  I try to avoid making them run MAX or a browser or anything but my request.  I know that I can avoid the MAC with the VI DAQmx step add network device, but he wants an IP address for an entry.

    Thank you

    Dan

    Hi Dan,.

    The API for the system setup OR was released earlier this year and aims to provide developers the ability to integrate MAX features into their distributed LabVIEW applications.  The following code uses the API and should be a good starting point for what you need to do:

    If you have any questions or encounter any problems do not hesitate to post back!

    Best regards

  • ANE BB10: error 3500 "the context of the extension has no method '.

    I tried this on the Simulator and the device, and I get the error no matter what:

    ArgumentError: Error #3500: The extension context does not have a method with the name init.
        at flash.external::ExtensionContext/_call()
        at flash.external::ExtensionContext/call()
        at com.o2interactive.sensor.gps::GeolocationExt()
    

    Have you:

    this.ext = ExtensionContext.createExtensionContext( 'com.o2interactive.sensor.gps', null );
    this.ext.call( "init" );
    

    In ContextInitializer donkey:

    const char *functionNames[] = { "init", "gpsStart", "gpsStop", "gpsSupport", NULL };
    FREFunction functionPtrs[] = { init, gpsStart, gpsStop, gpsSupport, NULL };
    

    Just dones not like when I call anything that has been mapped.

    Any suggestion is appreciated.

    The mistake of 3500 a do because the "bps" library is not linked with your application. You have to do to "[all Configuration]" or you will get the error even depending on your deployment. This changed in the latest version of the IDE (thanks to RIM which helped to discover this).

    * C/C++ build / Configuration settings: [configurations]

    * Select QCC Linker / library.

    * Under libraries (-l) 'Add' /'s.

  • Guard application launch at the start of the appliance, also need advice for the implementation of network methods

    Hi all

    I'm new to the development of Blackberry and I'm writing a relatively simple application to run on 7.1.

    So far the development was interesting, I managed to create my user interface using resources online (mainly this forum), but today I tried to implement some of the network classes that I need and now I just met constant problems.

    I use Eclipse SDK 3.7.2 (the one that comes with the plugin RIM)

    First question:

    I'm not sure what I changed, but today I noticed that whenever I start the Simulator (by sim 9360) my application is started during the initial startup process. I don't think he did this before, but to be honest, I wasn't paying much attention. I think it starts at the start of the device is because I put a breakpoint in the constructor for my class from the main screen, which is hit before the Simulator happens even to the point where it is ready for user interaction. In addition, once it is ready, if I press the BB button, I see my registered application.

    I don't have it set to automatic start in .xml descriptior enforcement.

    I started this application on the HelloBlackBerry sample, here is my main method for the entry of the application:

    public static void main( String[] args ) {
            appSettings = AppSettings.fetch();
            // Create a new instance of the application and make the currently
            // running thread the application's event dispatch thread.
            HelloBlackBerry theApp = new HelloBlackBerry();
            theApp.enterEventDispatcher();
            //openConnection();
    
        }
    
    
    

    As far as I know, this is the only entry point for the application.

    More code

        public HelloBlackBerry() {
            // Push a screen onto the UI stack for rendering.
            mainScreen = new ScreenHelloBlackBerry();
            pushScreen( mainScreen );
        }
    

    Here is the method of. my class AppSettings fetch()

        // Retrieves a copy of the effective properties set from storage.
        public static AppSettings fetch()
        {
            AppSettings savedSettings = (AppSettings) _store.getContents();
            return new AppSettings(savedSettings);
        }
    

    Some of this code that I wrote myself, the persistence store cause the launch of my car?

    I tried to reset the Simulator to the factory settings, no change.

    All applications initialized during the startup of the device and then closed shortly after?

    Part 2: Need advice for the implementation of functions of network in the application

    I need to implement some methods that will retrieve data from a web service, and I also need to send data to this service. What I've read, the ConnectionFactory is the way to go. I want my application to make a request when the application is open and can check on a set interval. I didn't know exactly how to go about adding another thread for networking, I understand that network connections should not be created on the thread main event, so I tried to do this:

    The constructor of my class that implements screen (ScreenHelloBlackBerry), I use the following to create a modal dialog box to prompt the user for a username, I also try networking wire in the same segment of spawning:

            public ScreenHelloBlackBerry(){...initialize fields and managers, add it all together...then near the end
    
    //This will open the confirm dialog when the application is launched
            UiApplication.getUiApplication().invokeLater(new Runnable() {
                  public void run() {
                      openConfirmDialog();
                    //start connection - Possibly broken
                      ConnectionThread ct = new ConnectionThread();
                      ct.start();
                  }
            });
    

    I don't know if it's somehow OK to do, but it seems to work for what I need. I want a user who launches the application at the prompt, and if a user switch applications, when they come back they wondered again (unless they close the app and reopen it).

    Here is my ConnectionThread:

    public class ConnectionThread extends Thread
    {
    
        public void run()
        {
    
              ConnectionFactory connFact = new ConnectionFactory();
              ConnectionDescriptor connDesc;
              connDesc = connFact.getConnection("http://www.google.com");
              if (connDesc != null)
              {
                  HttpConnection httpConn;
                  httpConn = (HttpConnection)connDesc.getConnection();
                  try
                  {
                      final int iResponseCode = httpConn.getResponseCode();
                      UiApplication.getUiApplication().invokeLater(new Runnable()
                      {
                          public void run()
                          {
                              Dialog.alert("Response code: " +
                                            Integer.toString(iResponseCode));
    
                          }
                       });
                      httpConn.close();
    
                   }
                   catch (IOException e)
                   {
                     System.err.println("Caught IOException: "
                          + e.getMessage());
                   }
              }
        }
    }
    

    At the moment it has basically unmodified code from a sample that I found, I'll be retooling to meet my needs whenever I can make it work. I HAD this work to the point where, after the closed user confirm this dialog, a few moments later a an alert dialog appears with the 302 response code. I don't know what changed, but now it doesn't work at all, and if I try to scroll with the debugger, I can't past the httpCon.getResponseCode (). I've seen some mistakes earlier on "no record of service was set up", and I also had once a timeout exception.

    I'm sure I'm doing this wrong, but at the same time as I said WAS working, and now it is not. If someone has done this far, thank you very much for your time and advice are much appreciated.

    Also, should I try to start the thread of the network of the UIApplication class instead of the screen? There is currently very little happening in the class that extends UIApplication, do I spend most of my business logic out of the class of the screen and in the UIApplication class?

    Thanks in advance!

    Hi all

    Just to conclude this topic for those who are interested, I found an excellent guide to the implementation of networks in applications of BB, click here for a link.

    About my application being started at the start of the simulator of the device, I found that on a device real this behavior is not complied with, and in addition, the behaviour seems to have stopped after uninstallation and reinstallation of my Simulator.

    See you soon,.

  • Why the setFocus() and setText() methods does not work for BasicEditField

    Hello

    I tried to apply the methods of setFocus() and setText() on a BasicEditField, but he always up "illegal state exception.   However, the getText() method can work.

    Can someone explain this please? Thank you!

    Another thing would be - if you use filters on your EditField and allows you to define something that is not allowed by the filter, it will throw an exception setText()...

  • How to call the paint of another method program

    Hello

    I have a custom BitmapField that I would like to drawText, using graphics.drawText. Previously, I had no problem, that I would call setBitmap to the paint method and it would make the drawText. However, he did an infinite loop problem, so I moved it to another function, that will affect the value manually the bmp. Now, I am unable to drawText, that I placed this code in my service object. I would, however, when I select this particular BitmapField to drawText.

    For now, since another function setBitmap is not a very good option because this will call the FieldManager sublayout which I think can be a battery problem. Is there another way I can call drawText?

    What is the reason, once again, to not draw the text from inside her object?  Why must you to setBitmap() to draw the text in the first place?

    Indeed, setBitmap() inside of object causes an infinite loop (I remember this post).  However, it should not be linked to draw text in any way, nature or form.

    Check some (members) variable inside your method object and make the draw you need based on this value.  If you want your bitmapField to draw text under certain conditions, change the value of this member and invalidate(), causing object pick up the change.

    In addition, if your FieldManager sublayout a problem, there are a problem.  Look at this code and fix the bugs rather than them with all kinds of mobile code around masking.

    If you need more assistance, please post here the pieces of code (especially how you would draw the text when it worked) and we'll figure out something.

  • the menu item run method not called

    Eclipse SDK Version: 3.4.1

    BlackBerry JDE plugin for Eclipse Version: 1.0.0.50

    BlackBerry JDE component package Version: 4.5.0.14

    I added a menu item to the contacts list. I would like to get the context when the user clicks the menu item, but the run method is not entered. When the user clicks the item in the menu the main routine is entered with correct arguments. Should not called run with the context method? No exception is thrown.

     

    Import net.rim.blackberry.api.menuitem.ApplicationMenuItem;
    Import net.rim.blackberry.api.menuitem.ApplicationMenuItemRepository;
    Import net.rim.device.api.system.Application;
    Import net.rim.device.api.system.ApplicationDescriptor;

    SerializableAttribute public class BwMain extends Application {}
    private static final long APP_ID = 0xf46f5a7867d69ff0L;
    private static final String ARG_LAUNCH_BW = "1";

    public BwMain() {}
    long menuItemLocation = ApplicationMenuItemRepository.MENUITEM_ADDRESSBOOK_LIST;
    ContactsBwMenuItem menuItem = new ContactsBwMenuItem();
    ToolBarMenuButton.AddMenuItem (menuItemLocation, ARG_LAUNCH_BW, menuItem);
    System.Exit (0);
    }

    Public Shared Sub main (String [] args) {}
    If (args == null | args.length == 0) {}
    BwMain bwMain = new BwMain();
    bwMain.enterEventDispatcher ();
    }
    else {}
    System.out.println ("App launched from the menu");
    }
    }

    private public static Sub ToolBarMenuButton.AddMenuItem (long location, String argOfAppl, ApplicationMenuItem appMenuItem) {}
    Amir ApplicationMenuItemRepository = ApplicationMenuItemRepository.getInstance ();
    ApplicationDescriptor app = ApplicationDescriptor.currentApplicationDescriptor ();
    app = new ApplicationDescriptor (app, new String [] {ARG_LAUNCH_BW});
    amir.addMenuItem (location, appMenuItem, app);
    }

    private static class ContactsBwMenuItem extends ApplicationMenuItem {}
    {ContactsBwMenuItem()}
    Super (20);
    }

    public String toString() {}
    return "PC connection";
    }

    public Object execute (object context) {}
    try {}
    System.out.println ("input run method");
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    Returns a null value.
    }
    }
    }

    You call system.exit() in the Builder before entering the EventDispatcher. I'm guessing that you add the menu item, but leave the application, and when the menu item is called it is more a reference to the context of the application and decides not to continue. The menu item will not remove itself when the application closes.

  • How to decode the received imagePath getPicture method in Oracle MAF?

    Hi all

    I have a use case in which I have to perform following tasks:

    1. take a picture using the MAF.

    2. save the encoded image in sqlite database path.

    3. then decode this path of the image and then convert the image to a byte [], so that I can send it to Oracle MCS storage.

    I put the parameter encodingType getPicture on "1". I'm stuck at the point where I have to decode the image path returned by the getPicture method.

    How can I do so?

    Kind regards

    Gurkeerat Singh

    Hello

    Thanks for repIy. I used the following code and it worked.

    Byte [] imageData = Base64.decodeBase64 (insertSR.getSrAttachment () .getAttachmentPath () .substring (contentStartIndex));

    and added a jar "Commons-Codec - 1.9.jar.

    Kind regards

    Gurkeerat Singh

  • The execution of a method of DC with parameters: variable bindings or pageFlowScope?

    I use a data control method to send the email that has parameters.  Based on the behavior I see when I drag and drop methods of data control to a page and I have JDeveloper automatically generate a form of parameter, I did the following which uses to store the settings.

    My data control method sendEmail method that has two input parameters 'recipient' and 'sender '.

    <af:commandImageLink id="cil1" icon="/images/email.png" actionListener="#{bindings.sendEmail.execute}">
        <af:setActionListener from="#{row.recipient}" to="#{bindings.sendEmail_recipient.inputValue}"/> 
        <af:setActionListener from="#{row.sender}" to="#{bindings.sendEmail_sender.inputValue}"/>
    </af:commandImageLink>

    Can I manually set the sendEmail_recipient and sendEmail_sender variables in the definition of page like this file...

    <variableIterator id="variables">
        <variable Type="java.lang.String" Name="sendEmail_recipient" IsQueriable="false"/>
        <variable Type="java.lang.String" Name="sendEmail_sender" IsQueriable="false"/>
    </variableIterator>
    
    . . .
    
    <attributeValues IterBinding="variables" id="sendEmail_recipient">
        <AttrNames>
            <Item Value="sendEmail_recipient"/>
        </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="variables" id="sendEmail_sender">
        <AttrNames>
            <Item Value="sendEmail_sender"/>
        </AttrNames>
    </attributeValues>
    

    .. then I put my method parameters in the definition of page like this file...

    <methodAction id="sendEmail" RequiresUpdateModel="true"

                      Action="invokeMethod" MethodName="sendEmail"

                      IsViewObjectMethod="false" DataControl="CustomDC"

                      InstanceName="CustomDC.dataProvider">

          <NamedData NDName="recipient"

                     NDValue="#{bindings.sendEmail_recipient}"

                     NDType="java.lang.String"/>

          <NamedData NDName="sender"

                     NDValue="#{bindings.sendEmail_sender}"

                     NDType="java.lang.String"/>

    </methodAction>

    Notice that I use the GUI to define the parameters of the method, but the changes to the XML here is the same.

    A colleague asked why it saying that it is just as easy to put my data in pageFlowScope like that...

    <af:commandImageLink id="cil1" icon="/images/email.png" actionListener="#{bindings.sendEmail.execute}">

        <af:setActionListener from="#{row.recipient}" to="#{pageFlowScope.sendEmail_recipient}"/>

        <af:setActionListener from="#{row.sender}" to="#{pageFlowScope.sendEmail_sender}"/>

    </af:commandImageLink>

    .. then change the method like this...

    <methodAction id="sendEmail" RequiresUpdateModel="true"

                      Action="invokeMethod" MethodName="sendEmail"

                      IsViewObjectMethod="false" DataControl="CustomDC"

                      InstanceName="CustomDC.dataProvider">

          <NamedData NDName="recipient"

                     NDValue="#{pageFlowScope.sendEmail_recipient}"

                     NDType="java.lang.String"/>

          <NamedData NDName="sender"

                     NDValue="#{pageFlowScope.sendEmail_sender}"

                     NDType="java.lang.String"/>

    </methodAction>

    In this way does not require that I define "variables" in the definition of page file.

    My question is why or why not this method of using pageFlowScope appropriate or better than using "links" to store my parameter values and the link between my commandImageLink and the method of backend?

    User, tell us your version of Jdev, please!

    The iterator variable lives only with the page. Scope of page file lives in the course of the entire task. If a difference is the scope of variables. It is not necessary to their scope of flow layout. You can use views instead. The two approaches can be used, but I would like to put these partners in the iterator as variable they so clearly show its use here. You go green like any other attribute of the link layer that gives you more consistent programming experience.

    A question, if you move the method into the page create a form of parameter, parameter variables must be created automatically by the framework of he. From your description, I understand that this was not the case?

    Timo

  • Insight into the suddenly crazy browser size

    Is it possible to revert to the previous version of Muse? Boy, I feel like a sucker for update!

    Since the update, when I try to preview my site in the browser it will not display correctly. It blows up huge - way more that I want, or I would fix the dimensions! And the content sits smash on the side, even if I set to centered. It is not correlated with any breakpoint, that I have set myself. It's just a waste. He started all of a sudden this without having done me anything to change. An overview, it displays very well. I changed a few sizes of police on the body of the text, he went crazy, and I can't go back. It's so frustrating! I don't have days to spend to deal with this mess of what appears to be a bug that you introduced.

    Is it okay if you click the Preview button in the upper left in Muse, rather than using Preview in the browser? If so, press Command/Ctrl + 0 (zero), to restore the scaling in your browser 100%.

Maybe you are looking for