×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    26

    WRTKit / Installation crash on S60 emulator

    I am going through the examples of the wrt kit and the following simple code crashes the emulator:

    Code:
    var uiManager; 
    var mainView; 
    
    function init()
    {
    	uiManager = new UIManager();
    	mainView = new ListView("example", "Example View"); 
    	uiManager.setView(mainView);
    	var exampleButton = new FormButton("exampleButton", "Press me!"); 
    	mainView.addControl(exampleButton); 
    }

    On the N95 8Gig the installation and the widget works. The error message while installing is "Unable to install error occurred"

  2. #2
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    60

    Re: WRTKit / Installation crash on S60 emulator

    Quote Originally Posted by patmarc View Post
    I am going through the examples of the wrt kit and the following simple code crashes the emulator:
    ...
    On the N95 8Gig the installation and the widget works. The error message while installing is "Unable to install error occurred"
    Are you sure it's the code and not something about how the widget is packaged? Try simplifying the widget to an absolute minimum with only an html file that displays a static piece of text or something like that. If that works then try adding stuff until it fails. If it doesn't work then the problem is in how the widget is packaged, e.g. the widget descriptor file or the zip-file somehow being corrupt.

    Peppe

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    26

    Re: WRTKit / Installation crash on S60 emulator

    I am using the nokia web runtime tool to pack the files. I also did it manually and it doesn't help. As mentioned before the widget installed and run on a real device like the n95 8G but not on the s60 emulator. The widget includes the WRTKit library

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    26

    Re: WRTKit / Installation crash on S60 emulator

    The selection list won't display once I add to it a listener like demonstrated in one of the example of the WRTKit developer's guide, chapter "Using selection controls".

    Code:
    var uiManager; 
    var mainView; 
    
    window.onload = init;
    
    function init()
    {
    	widget.setNavigationEnabled(false);
    	uiManager = new UIManager();
    	mainView = new ListView("example", "Example View");
    	uiManager.setView(mainView);
    	
    	var exampleButton = new FormButton("exampleButton", "Press me!");
    	exampleButton.addEventListener("ActionPerformed", exampleButtonPressed);
    	mainView.addControl(exampleButton);
    	
    	
    	var options = [
    	{ value: 1, text: "Coffee"},
    	{ value: 2, text: "Tea"},
    	{ value: 3, text: "Water"}
    	];
    	 
    	var selectedOptions = [ options[1], options[2]];
    	 
    	var drinkList = new SelectionList("selection1", "Favorite drinks",
    	options, true, selectedOptions);
    	 
    	drinkList.addEvenListener("SelectionChanged", favoriteDrinkChanged);
    	 
    	mainView.addControl(drinkList);
    	
    }
    	 
    function exampleButtonPressed(event)
    {
    	uiManager.showNotification(3000, "info", "You pressed the button!");
    }
    
    
    function favoriteDrinkChanged(event)
    {
    	uiManager.showNotification(3000, "info", "Selection changed!");
    }

  5. #5
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    60

    Re: WRTKit / Installation crash on S60 emulator

    Quote Originally Posted by patmarc View Post
    The selection list won't display once I add to it a listener like demonstrated in one of the example of the WRTKit developer's guide, chapter "Using selection controls".
    Wait! I'm confused. I thought the issue was that installation fails? So what is the situation again? The code and the widget works (including installation) in an actual device but not in the emulator? But it fails to install on the emulator when you add an event listener to the selection control? That sounds very strange!

    Peppe

  6. #6
    Registered User
    Join Date
    Sep 2006
    Posts
    26

    Re: WRTKit / Installation crash on S60 emulator

    Terve Peppe don't be confused . On my first post from the thread "WRTKit/installation crash on S60" I wrote :
    I am going through the examples of the wrt kit and the following simple code crashes the emulator:
    var uiManager;
    var mainView;

    function init()
    {
    uiManager = new UIManager();
    mainView = new ListView("example", "Example View");
    uiManager.setView(mainView);
    var exampleButton = new FormButton("exampleButton", "Press me!");
    mainView.addControl(exampleButton);
    }
    And then I mentioned that the code of this widget was installing fine on a real device like my Nokia N95 8gig. I wrote that I have packed the widget with the nokia web runtime tool and then also manually to make sure that it had nothing to do with the package process. The manifest plist is fine and if it was not it wouldn't install on the real device anyway.
    The fourth post from the same thread "WRTKit/Installation crash on S60 emulator" is about selection list and event listener. The code which is using the selection list is tested on the real device as the emulator refuse to install the widget. The selection list is somehow another matter but it is nevertheless still based on the examples of the WRTKit developer's guide.

  7. #7
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    60

    Re: WRTKit / Installation crash on S60 emulator

    Quote Originally Posted by patmarc View Post
    Terve Peppe don't be confused
    ..
    The fourth post from the same thread "WRTKit/Installation crash on S60 emulator" is about selection list and event listener. The code which is using the selection list is tested on the real device as the emulator refuse to install the widget. The selection list is somehow another matter but it is nevertheless still based on the examples of the WRTKit developer's guide.
    Moi! All WRTKit code (including the WRTKit example widgets) should run as-is on the Firefox and Safari web browsers, with the exception of the RSS Reader which won't be able to contact the RSS feed source without using the Greasemonkey AJAX-security bypass script. If you have problems with some code I'd recommend to install Firebug and Greasemonkey on Firefox and trying the widget that is causing you problems with that setup. Finding the cause for the problem is usually a matter of seconds with that setup since you can set breakpoints, do watches, etc.

    Another thing you could try with Firefox is enable WRTKit logging (the log output is to the Firebug console). Unfortunately I don't have the WRTKit code in front of me right now but check the init script in the WRTKit directory where the uiLogger is created and its logging level is set. By default it's disabled or set to log warnings and errors only but you can set it to a much more verbose level to see what's going on and where the code fails.

    Peppe

  8. #8
    Registered User
    Join Date
    Sep 2006
    Posts
    26

    Re: WRTKit / Installation crash on S60 emulator

    Kiitos Peppe, as you suggested it I'm gonna use the uilogger to try to debug this problem. Yes I already use greasemonkey to bypass the xmlhttprequest security policy and firebug to debug javascript code on firefox.

  9. #9
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    60

    Re: WRTKit / Installation crash on S60 emulator

    Quote Originally Posted by patmarc View Post
    Kiitos Peppe, as you suggested it I'm gonna use the uilogger to try to debug this problem. Yes I already use greasemonkey to bypass the xmlhttprequest security policy and firebug to debug javascript code on firefox.
    If the code is straight from the documentation it might even be a documentation bug.. E.g. an argument was added to a function somewhere but the documentation wasn't updated, or similar. If it fails in Firebug can you tell me what the error message is and what the offending line is?

    Peppe

  10. #10
    Registered User
    Join Date
    Sep 2006
    Posts
    26

    Re: WRTKit / Installation crash on S60 emulator

    I spotted the culprit for the selection list display problem. That was simply a typo error

    Code:
    drinkList.addEvenListener


    Code:
    drinkList.addEventListener
    I will still have to investigate why some widget code crash the installation on the S60 emulator but not on a real device

  11. #11
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    60

    Re: WRTKit / Installation crash on S60 emulator

    Quote Originally Posted by patmarc View Post
    I spotted the culprit for the selection list display problem. That was simply a typo error

    Code:
    drinkList.addEvenListener


    Code:
    drinkList.addEventListener
    I will still have to investigate why some widget code crash the installation on the S60 emulator but not on a real device
    If that typo was in the documentation too then please report that as a bug!

    Peppe

  12. #12
    Registered User
    Join Date
    Sep 2006
    Posts
    26

    Re: WRTKit / Installation crash on S60 emulator

    Nop that was my own typo error I did while experimenting and altering a little bit the examples from the WRTKit developer's documentation

Similar Threads

  1. Experiences with J2ME, Netbeans, Eclipse and S60 3rd emulator
    By neil.young in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2008-02-14, 16:14
  2. sync4j sync with the S60 emulator
    By vtulai in forum OMA DM/DS/CP
    Replies: 4
    Last Post: 2007-05-11, 06:12
  3. S60 3rd Edition Emulator under Netbeans 5.5 ?
    By Tiger79 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-05-02, 13:52
  4. Carbide.c++ and installation of Nokia S60 3rd Edition SDK
    By mitesh_thakkar in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2007-04-19, 14:20
  5. What is going on with Vibration on S60?
    By amd_rikus in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-16, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×