Simply my slot is not called

/*
 * CustomTimer.h
 *
 *  Created on: Feb 6, 2015
 *      Author: shubhendusharma
 */

#ifndef CUSTOMTIMER_H_
#define CUSTOMTIMER_H_
#include 
#include 
#include 
#include 
class CustomTimer:public QObject
{
    Q_OBJECT
   public:
    CustomTimer();
       QTimer *timer;

   public slots:
       void MyTimerSlot();
};

#endif /* CUSTOMTIMER_H_ */
/*
 * CustomTimer.cpp
 *
 *  Created on: Feb 6, 2015
 *      Author: shubhendusharma
 */

#include 
#include 
 #include 
CustomTimer::CustomTimer()
{
    qDebug() << "hello123"; this is printing but method MyTimeSlot is not calling
    // create a timer
    timer = new QTimer(this);

    // setup signal and slot
    connect(timer, SIGNAL(timeout()),
          this, SLOT(MyTimerSlot()));

    // msec
    timer->start(100);
}

void CustomTimer::MyTimerSlot()// not calling
{
    //QTime time = QTime::currentTime();
        //QString text = time.toString("hh:mm");
  //  QTime time = QTime::currentTime();
    //qDebug() <<"hello" +time.toString();
    qDebug() << "hello";
}

I now call this class

ApplicationUI::ApplicationUI() :
        QObject()
{
    CustomTimer timer;
    qmlRegisterType("my.library", 1, 0, "QTimer");
   qmlRegisterType("map.location", 1, 0, "LocationService");
    QmlDocument *qml = QmlDocument::create("asset:///homescreens.qml").parent(this);
 //   Login *login=new Login(this);
   // qml->setContextProperty("login", login);

    // Create root object for the UI
    AbstractPane *root = qml->createRootObject();
    Application::instance()->setScene(root);

}

Sorry it was my mistake.

In fact, I created the object in another class despite the Main.class.

Now it the call...

Tags: BlackBerry Developers

Similar Questions

  • C++ class destructor not called on request nearby

    I started playing with waterfall and C++ development but im having a problem where I can link my class to the qml and use breast but firm request the something on my class hangs the request and its icon in the emulator will slightly transparent and can no longer be clicked.

    It's the call to add it to the qml

    File: Applicationui.cpp
    
    ApplicationUI::ApplicationUI(bb::cascades::Application *app): QObject(app){ // create scene document from main.qml asset // set parent to created document to ensure it exists for the whole application lifetime QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
    //My classGpsCommunicator* gps = new GpsCommunicator();
    
    //Add the Classqml->setContextProperty("_gps",gps);
    
    // create root object for the UI AbstractPane *root = qml->createRootObject();
    
    // set created root object as a scene app->setScene(root);
    }
     
    

    Here is the class.hpp

    
    class GpsCommunicator : public QObject {
    Q_OBJECT
    
    Q_PROPERTY(double latitude READ latitude) Q_PROPERTY(double longitude READ longitude) Q_PROPERTY(double accuracy READ accuracy) Q_PROPERTY(double altitude READ altitude) Q_PROPERTY(double heading READ heading) Q_PROPERTY(double satellites READ satellites) Q_PROPERTY(double speed READ speed)
    Q_PROPERTY(bool isRegistered READ isRegistered) Q_PROPERTY(bool isAltitudeValid READ isAltitudeValid) Q_PROPERTY(bool isAccuracyValid READ isAccuracyValid) Q_PROPERTY(bool isHeadingValid READ isHeadingValid) Q_PROPERTY(bool isSpeedValid READ isSpeedValid)
    public: GpsCommunicator(QObject *parent = 0); virtual ~GpsCommunicator();
    //Latitude Property double latitude();
    //Latitude Property double longitude();
    //Accuracy Property double accuracy(); bool isAccuracyValid();
    //Altitude Property double altitude(); bool isAltitudeValid();
    //Heading Property double heading(); bool isHeadingValid();
    //Speed Property double speed(); bool isSpeedValid();
    //Number of Satellite Property double satellites();
    //Registered successfully to geolocation events bool isRegistered();
    Q_INVOKABLE void StartPollTimer(int i = 0); Q_INVOKABLE void StopPollTimer();
    signals:
    
    private:
    //Bool to track if this class is registered to receive geo-location events bool m_isRegistered;
    double m_latitude; double m_longitude; double m_accuracy; bool m_accuracy_valid; double m_altitude; bool m_altitude_valid; double m_altitude_accuracy; bool m_altitude_accuracy_valid; double m_heading; bool m_heading_valid; double m_speed; bool m_speed_valid; double m_num_satellites; bool m_num_satellites_valid;
    void InitializeGps(); void InitializeCommunicator();
    //Poll timer QTimer *pollTimer;
    
    public slots:
    void CheckForGPSEvent();
    };
     
    

    Here is the .cpp for her

    
    GpsCommunicator::GpsCommunicator(QObject *parent): QObject(parent) { //Start up sequence this->InitializeCommunicator(); this->InitializeGps();}
    void GpsCommunicator::InitializeCommunicator() { this->m_isRegistered = false;}
    GpsCommunicator::~GpsCommunicator() { // TODO Auto-generated destructor stub this->StopPollTimer(); delete this->pollTimer; geolocation_stop_events(0); bps_shutdown();}
    double GpsCommunicator::latitude() { return this->m_latitude;}
    double GpsCommunicator::speed() { return this->m_speed;}
    double GpsCommunicator::altitude() { return this->m_altitude;}
    double GpsCommunicator::longitude() { return this->m_longitude;}
    double GpsCommunicator::accuracy() { return this->m_accuracy;}
    double GpsCommunicator::heading() { return this->m_heading;}
    double GpsCommunicator::satellites() { return this->m_num_satellites;}
    bool GpsCommunicator::isRegistered(){ return this->m_isRegistered;}
    bool GpsCommunicator::isSpeedValid() { return this->m_speed_valid;}
    bool GpsCommunicator::isAccuracyValid() { return this->m_accuracy_valid;}
    bool GpsCommunicator::isAltitudeValid() { return this->m_altitude_valid;}
    bool GpsCommunicator::isHeadingValid() { return this->m_heading_valid;}
    void GpsCommunicator::StartPollTimer(int i) { this->pollTimer->start(i);}
    void GpsCommunicator::StopPollTimer() { this->pollTimer->stop();}
    void GpsCommunicator::InitializeGps() {
    if( bps_initialize() != BPS_FAILURE) { if ( geolocation_request_events( 0 ) != BPS_SUCCESS ) { //Report that the initialize failed this->m_isRegistered = false; //emit this->registeredChanged(this->m_isRegistered); } else { geolocation_set_period(1);
    //Update that the communicator is now registered and emit the signal this->m_isRegistered = true; //emit this->registeredChanged(this->m_isRegistered);
    //Create the timer instance this->pollTimer = new QTimer();
    //Connect it to the polling function this->connect(this->pollTimer, SIGNAL(timeout()), this, SLOT(CheckForGPSEvent())); this->StartPollTimer(100); } }}
    void GpsCommunicator::CheckForGPSEvent() {
    bps_event_t *event = NULL; bps_get_event(&event, 100); // -1 means that the function waits // for an event before returning if (event) {
    if (bps_event_get_domain(event) == geolocation_get_domain()) {
    if (event == NULL || bps_event_get_code(event) != GEOLOCATION_INFO) { return; }
    // TODO: change this so the emit is only called if the information is new
    this->m_latitude = geolocation_event_get_latitude(event); //emit this->latitudeChanged(this->m_latitude);
    this->m_longitude = geolocation_event_get_longitude(event); //emit this->longitudeChanged(this->m_longitude);
    this->m_accuracy = geolocation_event_get_accuracy(event); //emit this->accuracyChanged(this->m_accuracy);
    this->m_altitude = geolocation_event_get_altitude(event); //emit this->altitudeChanged(this->m_altitude);
    this->m_altitude_valid = geolocation_event_is_altitude_valid(event);
    this->m_altitude_accuracy = geolocation_event_get_altitude_accuracy(event);
    this->m_altitude_accuracy_valid = geolocation_event_is_altitude_accuracy_valid(event);
    this->m_heading = geolocation_event_get_heading(event); //emit this->headingChanged(this->m_heading);
    this->m_heading_valid = geolocation_event_is_heading_valid(event);
    this->m_speed = geolocation_event_get_speed(event); //emit this->speedChanged(this->m_speed);
    this->m_speed_valid = geolocation_event_is_speed_valid(event);
    this->m_num_satellites = geolocation_event_get_num_satellites_used(event); //emit this->satellitesChanged(this->m_num_satellites);
    this->m_num_satellites_valid = geolocation_event_is_num_satellites_valid(event); } }
    return;}
    

    I was checking to see if the deconstructor was called, but it doesn't seem to be. So I think it might be the QTimer not cleaned but I don't know how I get it to call on family members since I thought that once I signed with qml my QObject class would be deconstructed with other resources in a certain order.

    Thanks in advance for any help

    Do not call bps_get_event from an application of stunts that you might fly the main event loop events.  Rather implement AbstractBpsEventHandler to the BPS events delivered on the thread of your event.

  • appeal of XHTML to servlet return do not answer, do not call servlet

    I xhtml in a web app using a servlet, but the answer of the servlet does not appear. The original xhtml displays once you press the submit button. I tried different alternatives for the servlet response, but I get the same result every time. I added logging to the servlet, but it seems that the servlet is not called at all.

    XHTML:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ejstreegrid="https://unfccc.int/nais/ejstreegrid"
    xmlns:grid="http://java.sun.com/jsf/composite/gridcomp"
    xmlns:nais="http://java.sun.com/jsf/composite/naiscomp">
    <body>
    <ui:composition template="/templateForm.xhtml">
    <ui:define name="title">Some title</ui:define>
    <ui:param name="currentPage" value="somepage.xhtml" />
    <ui:define name="body">
    name to be added<br/><br/>
    <form action="someServlet" method="post">
    <input type="text" name="someName" />
    <input type="submit" />
    </form>
    </ui:define>
    </ui:composition>
    </body> 
    </html>
    servlet web app called:
    package netgui.servlet;
    
    import java.io.IOException;
    import java.util.Enumeration;
    
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    public class someServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;
    
    public someServlet() {
    super();
    }
    
    protected void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException   {
    processRequest(request, response);
    }
    
    protected void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException {
    processRequest(request, response);
    }
    
    private void processRequest(HttpServletRequest request,
    HttpServletResponse response) throws IOException {
    
    try {
    response.getWriter().write("some response");
    } catch (Exception e) {
    logger.error(e.getMessage());
    e.printStackTrace();
    response.getWriter().println("Error: " + e.getMessage());
    }}}
    
    I also have a menu.xhtml that is calling the xhtml file:
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    
    <body>
    <script type="text/javascript">
    $(document).ready(function() {
    $("#btn").click(function() {
    $("#upload").click(); 
    return false; 
    }); 
    });
    </script>   
    <ui:composition>
    <div id="navigation_bar">
    <ul id="topbarleft">
    <c:choose>                  
    <c:when test="${currentPage=='somepage.xhtml'}">
    <li><b>Some Page display</b></li>
    </c:when>
    <c:otherwise>
    <li><h:outputLink value="somepage.jsf">
    <h:outputText value="some page" />
    </h:outputLink></li>
    </c:otherwise>
    </c:choose>
    </ul>
    </div>
    </ui:composition>
    </body>
    </html>
    Y at - it a special format to send a form to a servlet of xhtml? Any ideas what could be the problem?

    Published by: Atlas77 on April 16, 2012 06:53

    Published by: Atlas77 on April 16, 2012 06:54

    Published by: Atlas77 on April 16, 2012 06:56

    Published by: Atlas77 on April 16, 2012 07:27

    Call it a guess, you're not the first to fall into the trap of the nested :) form Its too easy to simply slap a high h:form somewhere near the top of the tree and forget it.

    For the future: remember that the browser is actually doing the work when you submit a form. If something goes wrong, it appears in the HTML source as you can see by using the function "view page source" from the browser. It pays to know HTML and especially the limits if you want to understand such things by yourself. When you locate the faulty HTML code, it is usually not so hard more to trace what is bad in the JSF source.

  • SD card slot does not work on Windows Vista

    I just installed Windows Vista RC1, which has just been published

    Just about everything works except the secure digital memory card slot.

    Until I installed Vista I ran the Compatibility Wizard and he said a few things that may not work, but the one that stood out was "SD Memory Card Format Utility.

    I guess that's why the memory card slot is not working?

    Anyone know how to operate? This isn't the end of the world because I can use the docking station, but his practice which he just work directly at the exit.

    Any help would be great.

    Thank you

    Maybe the new operating system Vista doesn t include the compatible driver for the SD card controller.
    Right now the Vista is not supported by Toshiba because this OS is not official on the market.

  • PC card slot does not have 32-bit cardbus PC card

    Hey,.

    My pc card slot does not recognize my pc card. It is a 32 - bit cardbus pc card card and the card slot supports 32-bit cards, so it must work! I downloaded the new drivers, but it still does not work. Anyone know what to do now?

    Thank you very much

    Symen

    I think it would be very interesting to know what laptop you have exactly and if PC card really supports the 32-bit cards?  :|

    Anyway. some BIOS on different laptops offer option and unique settings for the PC card slot. Have you checked the BIOS?

    Do this!

  • the disk you inserted is not called by this computer

    Whenever I start the computer, it starts flashing on the screen "the disk you inserted was not called by this computer.

    When I booted into it, it shows me the Macintosh HD. I activated the 'first aid' keys and able to diagnose and the result was ok.

    Is - it my Fusion drive is causing the problem?

    Mr. Chua

    Mr. Chua,

    Please post a report of EtreCheck of your system. We then look for obvious problems. Please click on the link, download the application and run the report. Once you have the report, please copy and paste into your response to this post.

  • You can not call a method on a null value expression.

    Hello

    We are working on the tool of basic hygiene WMI for windows 2008 server of health check of the scent system but in error during the run automation tool

    "Cannot call a method on a null expression."

    LE000561ERROR: You can not call a method on a null value expression.
    ERROR: The value of the argument cannot be an empty string.

    Please suggest the same

    Hi Diakité Srivastava,

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet forum.

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • Windows call you if you have not called?

    I got a strange call today. The guy calling said it was Windows support and that I had something encrypted in my computer that sent many emails and it would destroy my hard drive if I don't go to my computer and let it guide me through the connection and it allow to correct the problem. What's up with that? I have NOT called Windows with any problem and have had my PC scanned with 3 anti virus and anti malware programs and does not appear in case of problems. I went in my history of scanning and it shows that someone tried to get into my computer but have been blocked several times. Would it be legitimate? The number he called from is 201-338-6150 located in Dumont, NJ (fixed) listed in teleport communications group. Someone advised me that it is. Thank you

    Hello

    These are SCAMS!

    In the United States, you can contact the FBI, Attorney general, the police authorities and consumer
    Watch groups. Arm yourself with knowledge.

    No, Microsoft wouldn't you not solicited. Or they would know if errors exist on your
    computer. So that's the fraud or scams to get your money or worse to steal your identity.

    Avoid scams that use the Microsoft name fraudulently - Microsoft is not unsolicited
    phone calls to help you fix your computer
    http://www.Microsoft.com/protect/fraud/phishing/msName.aspx

    Scams and hoaxes
    http://support.Microsoft.com/contactus/cu_sc_virsec_master?ws=support#tab3

    Microsoft Support Center consumer
    https://consumersecuritysupport.Microsoft.com/default.aspx?altbrand=true&SD=GN&ln=en-us&St=1&wfxredirect=1&gssnb=1

    Microsoft technical support
    http://support.Microsoft.com/contactus/?ws=support#TAB0

    Microsoft - contact technical support
    http://Windows.Microsoft.com/en-us/Windows/help/contact-support

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • HP 15af131dx laptop: How can the 15af131dx be upgraded to 8 GB of ram if slots are not available?

    I recently bought a HP 15af131dx laptop.  I read the manual and was led to believe it was expandable up to 8 GB of ram.  I just read an ad that says that the two ram slots are not accessible by the client.  So, how can I bring my laptop?  I already bought a stick of ram to 8 GB of Crucial.

    HP 15 - af131dx Notebook PC product specifications and the HP Notebook PC (AMD) / HP 255 G4 Notebook PC - Maintenance and Service of Guide, , it seems that this model is limited to 1 x 8 or 2 x 4 GB. In both cases, the maximum memory based on the MSG is 8 GB of DDR3L/PC3L, 12800 1600 MHz. In addition, removal/replacement of the module memory is listed as a "procedure for only authorized service providers. There are 56 screws that must be removed, replaced or loosened when the upgrade of the memory of this unit. Please begin on page 24 of the GMS and see page 44 for the extent of what it takes.

    If you have any other questions, feel free to ask.

    Please click the 'Thumbs Up' white LAURELS to show your appreciation

  • Extended method of field paint will not called

    I would go to a field and would like to paint something there.

    By extending the field I must apply setLayout (int x, int y) wcich get is called successfully.

    Thing strange number one: x is 360 (that's fine because I have it returned by getPreferredWitdh), there is

    1073741803 which is more hell? In getPreferredHeight I returned 480...

    Second, my method of painting is not called at all! See code below.

    You forgot to call your layout() setExtent() while defining the scope of the field is the main object of the layout () - to tell the parent Manager how much space you wish to occupy. Without putting your width and height are (0, 0), which explains why your parent Manager never calls object of your field.

    The fact that you get almost unlimited height in your layout() is also easy to explain: you probably use screen that has default VERTICAL_SCROLL.  And managers who have VERTICAL_SCROLL allocates Integer.MAX_VALUE > 1 pixel at the start for their children.  Your LabelField consumed 14 of this value (using setExtent (textWidth, 14), of course) and then screen offered the rest of your domain.

    Also note that getPreferredHeight() and getPreferredWidth() are ignored by the vast majority of managers and fields.

  • onExposed not called

    Hello

    I have a problem that a screen is not be changed because it's "onExposed" method is not called when I expect to be.

    Here's the scenario:

    1 screen 'foo' extends screen and is displayed.

    2. the user selects a menu item which, among other things, displays the 'bar' screen that extends PopupScreen.

    -'bar' screen in the event thread by using the following statement

    application.pushGlobalScreen (bar, 0, Dialog.GLOBAL_STATUS);

    3. the 'bar' screen gets popped display by a background with the following thread.

    synchronized (application.getAppEventLock ()) {}
    application.popScreen (bar);
    }

    4. after step 3 I was expecting the overloaded method 'onExposed' of the screen 'foo' to be called and refresh the data in the form. But this isn't the case.

    I tried a number of things, but I can't get the screen hidden to cool off when it is displayed.

    I run on the global phone OS4.2.1 Simulator.

    Any suggestions would be greatly appreciated.

    News Flash! The problem was in my code. onExposed has been called, but not when I thought it would be.

  • Run not called in thread

    I'm trying to get a thread that runs in the background to update a label field in a screen, but for some reason any of the thread run() method is not called. I'm using JDE 4.3.0.

    package UpdateTest;
    
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.system.DeviceInfo;
    import java.lang.Runnable;
    import java.lang.Thread;
    
    public class UpdateTest extends UiApplication
    {
        public UpdateTest()
        {
          pushScreen(new UpdateTestScreen());
        }
    
        public static void main(String[] args)
        {
            UpdateTest bm = new UpdateTest();
            bm.enterEventDispatcher();
        }
    } 
    
    final class UpdateTestScreen extends MainScreen
    {
        LabelField _field;
    
        UpdateThread upThread;
    
        public UpdateTestScreen()
        {
            super();
    
            upThread = new UpdateThread();
            upThread.start();
    
            setTitle("Update field test");
    
            add( new LabelField("field: ") );
            _field = new LabelField("0");
            add(_field);
        }
    
        public boolean onClose()
        {
            Dialog.alert("exit");
            upThread.stop();
            System.exit(0);
            return true;
        }
    
        public class UpdateThread extends Thread
        {
            private volatile boolean _start = false;
            private volatile boolean _stop = false;
            private static final int TIMEOUT = 500;
    
            public UpdateThread()
            {
                super();
                System.out.println("UpdateThread Created");
            }
    
            public void stop()
            {
                _stop = true;
                System.out.println("UpdateThread Stopped");
            }
    
            public void start()
            {
                _start = true;
                System.out.println("UpdateThread Started");
            }
    
            public void run()
            {
                System.out.println("UpdateThread running");
                for(;;)
                {
                    while( !_start && !_stop)
                    {
                        try {
                            sleep(TIMEOUT);
                            System.out.println("UpdateThread sleeping");
                        } catch (InterruptedException e) {
                            System.err.println(e.toString());
                        }
                    }
    
                    if (_stop)
                        return;
    
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
                        public void run() {
                            _field.setText("" + System.currentTimeMillis());
                        }
                    });
                    System.out.println("invoked");
                }
            }
        }
    
    }
    

    If you go to substitute Thread.start, then call super.start () somewhere in there, like after your DD.

  • Background switch detected for MyApp (24) who doesn't have the tunnels open - defocus is NOT called

    I get the error "background switch detected for MyApp (24) who doesn't have the tunnels open - defocus is NOT called. Then the Simulator freezes and I can't do anything. Tried to debug but no luck!

    My application has two other entry points implemented from article http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/How_To _...

    Please see code below

    public class UserInterface extends UiApplication{
    
        public static void main(String[] args){
    
            if ((args != null) && (args.length > 0) && (0==StringUtilities.compareToIgnoreCase(args[0].toString(), "GUI"))){
    
                UserInterface theApp = new UserInterface();
                theApp.enterEventDispatcher();
            }
            else {
                try
                {
                    Wait();
                                SetTimer();
                    ManageResources mg = new ManageResources();
                    System.exit(0);
    
                }
                catch (Exception ex)
                {
                    if (RuntimeConfig.DEBUG)
                    {
                        System.out.println("UserInterface, main:  " + ex);
                    }
                }
            }
        }
        public UserInterface() {
            //  DialogDisplay dd = new DialogDisplay();
            pushScreen(new UserInterfaceScreen(this));
        }
    

    I also had this problem, the cause is that my computer is behind a proxy firewall so that MDS services Simulator cannot connect to internet, I added the following lines in the file rimpublic.property in the directory "Eclipse\plugins\net.rim.eide.componentpack4.7.0_4.7.0.46\components\MDS\config".

    application.handler.http.proxyEnabled = true
    application.handler.http.proxyHost = proxyserver
    application.handler.http.proxyPort = 8080

    These lines must be placed in the [MANAGER HTTP] section.

    It will be useful.

  • 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.

  • Dell Studio 1450 Sim Card slot does not

    I have a dell studio 1450. The sim card slot does not work after you insert an active GSM sim I can't access the net. Help, please. Thanks in advance.

    Currently, your laptop will have a wireless WLAN inside card that does not require that a GSM sim card.

    In order to make the use of the GSM sim card, you need to replace the internal WIFI card with an internal WWAN card...

    Here's how...

    http://support.Dell.com/support/eDOCS/systems/ins1110/en/SM/MiniCard.htm#wp1189718

    It will be important to make the right card for your machine. You need to know what is compatible from Dell. If you don't like the price of Dell, you can take a chance on eBay...

Maybe you are looking for