×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Platformservices 2.0 troubles with WRT 7.3

    Hi,
    There is a problem with the platformservices and Anna... I hope my english is good enough that you can understand my problem... And I am sure at 99% that the error is not in my code. The biggest problem is that I am not able to create any homescreen widget now.

    I had a code, and it works on the old Symbian^3:
    Code:
    function result(iterator)
    {
        var entrydata;
        var count;
        while(entrydata = iterator.next()) {
            count++;
        }
        alert(count + " entries found with matching criteria");
    }
    
    try {
        so = nokia.device.load("calendar");
    
        var matchpattern = {type:"Meeting"};
    
        var transactionId = so.getList(result, matchpattern, errorCB);
        alert("Transaction ID: " + transactionId);
    }
    catch(e) {
        alert(e);
    }
    Now, in the iterator function the javascript crash and will exit without continue. So I inserted a try-catch block and I got this message:
    TypeError: Result of expression '_36c.close' [undefined] is not a function.

    In the platformservices.js, line 6350 we have this code:
    function __sp_calendar_iterator_get_next(){
    var _36c=this.iter.getNext();
    if(typeof _36c=="undefined"){
    return null;
    }
    var _36d=new __sp_device_calendar_entry(_36c);
    _36c.close();
    return _36d;
    };
    How is it possible that close worked fine on the old Symbian and not now?

    Maybe there is a problem in this file?

    If I read this page, I think there could be an error on this script, right?
    http://www.developer.nokia.com/Resou...pressions.html

    But there is no new file... because the last script is from march 2010:
    http://www.developer.nokia.com/info/...vices_2_0.html

    Hope you can solve soon this problem. Because I am not able to write any widget using this service on the moment.

    Thanks. Tiger54
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  2. #2
    Registered User
    Join Date
    Sep 2010
    Posts
    10

    Re: Platformservices 2.0 troubles with WRT 7.3

    Sorry, can't help with the problem but I confirm that it exists!

    The thing is, Platformservices 2.0 stopped working totally along with the Anna release.

    Our WRT Widgets heavily rely to serviceObject.camera and photo importing functions. They just hang up now. Tested with E7 and N8, the newest public and some custom Anna releases (022.014).

    If you get any ideas to overcome this problem, just tell. Otherwise we have to withdraw the applications from the store for good. :/

  3. #3
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Platformservices 2.0 troubles with WRT 7.3

    Hi,

    Apologizes for taking so long to answer.

    We are working to find the root cause of this problem. There must have been some change in the underlying iterator code.

    What you could do for now is to revert back to Platform services 1.0 code. It should be working and it is not that much harder to use. I can try to find an example for you if you wish.

    Best regards,
    Ilkka

  4. #4
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: Platformservices 2.0 troubles with WRT 7.3

    Thanks isalento,
    I never userd platform services 1.0. I think version 2.0 is old enough to be the current release
    I resubmitted the widget on the store, without the calendar function now.

    But I don't want use platform services 1.0... I will wait.

    I think the problem is linked to this new feature:

    JavaScript compilation change for function declarations in conditional expressions
    Nokia Browser 7.3 for Symbian introduces a change to the underlying JavaScript engine that may require minor coding changes to widgets that run in this browser or in the corresponding Symbian Web Runtime environment. The JavaScript compilation change is inherited from a recent update to the WebKit engine that underlies Browser 7.3. The change makes Browser 7.3 behave similarly to other modern mobile browsers for this JavaScript compilation issue. Here's the details on the change.

    The way in which function declarations are interpreted inside conditional expressions has changed. If a function declaration and definition are in a conditional JavaScript expression that logically does not get evaluated, the Browser 7.2 JavaScript engine does not interpret that function declaration. In the Browser 7.3 JavaScript engine, regardless of whether the function can be executed or not, the JavaScript engine compiles all of the functions.
    Code:
    var calculateSum = true;
    
    if(calculateSum){
        function calculate(){
            alert("sum");
        }
    }else{
        function calculate(){
            alert("subtract");
        }
    }
    
    calculate();
    
    ;
    If the calculate function is called, the Browser 7.2 JavaScript engine prompts sum, whereas the Browser 7.3 JavaScript engine executes the last defined calculate function, hence prompting subtract.
    Last edited by Tiger54; 2011-09-09 at 10:20.
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  5. #5
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: Platformservices 2.0 troubles with WRT 7.3

    Is it possible to know when an update will be available?
    I found some worksarounds, but I don't want create some memory leaks on my app :P
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    35

    Re: Platformservices 2.0 troubles with WRT 7.3

    From my experiance: don't ever use Platformservices 2.0 API. It's more or less just a buggy javascript abstraction layout on top of the original 1.0 API. If you want to write something solid, always stick with the old (more bugfree) API.

  7. #7
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: Platformservices 2.0 troubles with WRT 7.3

    hope is the last to die

    Pleaaaassssseee Nokia Developers

    If you say: "we will never release an update for ps2.0", I will invest other 3-4 days to make my widget compatible with the old platform service.

    But after all the work I had on Symbian^3, it would be nice to hear something like "we are investigating and we will release an update soon".
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  8. #8
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: Platformservices 2.0 troubles with WRT 7.3

    I never stopped hoping for a new release of PS2.0.

    If I go to this page (download page):
    http://www.developer.nokia.com/dp/?u...es_v2_0_en.zip

    I see that I am the only person on this world, using PS2.0, is it right? The page was never passed though the QA because I can't see "I Acceppt" button.

    At beginning of this thread, I found a bug and I reported not only the bug but also the line of the PS-javascript. In 5 months I never get a reply (only from isalento).
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Platformservices 2.0 troubles with WRT 7.3

    You may want to post such feedback in a more visible way, like the Feedback board (http://www.developer.nokia.com/Commu...loper-Services, though it has a slightly different purpose) or the well-camouflaged green "Contact Us" link in the bottom-right of the pages (just above the blue footer).
    EDIT: I made a copy of this report in the Feedback board as http://www.developer.nokia.com/Commu...wnload-problem

  10. #10
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: Platformservices 2.0 troubles with WRT 7.3

    Yes I know, I already sent some feedbacks for some WRT pages.

    But the post of this thread is something different. There is a Javascript error/bug on PS2.0 and it seems that nobody will ever release a newer PS-API for Symbian.

    Today I rewrote my code using PS1.0 and now it works.
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

  11. #11
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Platformservices 2.0 troubles with WRT 7.3

    Yes, I see the thread, I was reflecting to the download/license agreement problem only (I can reproduce it). Generally I do not attend this board, I spotted the post solely because it appeared in the moderation list.

  12. #12
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Platformservices 2.0 troubles with WRT 7.3

    Hello Tiger54,

    Missing .close() issue in underlying iterator code has been fixed in Browser 7.4.2.

    Unfortunately there is no way to fix this issue in JavaScript side. That was the main reason why PS 2.0 library was not updated. Omitting calling .close() would only cause memory leaks. Of course WidgetUI will free the memory when closed, but usually there is multiple widgets running on the device and WidgetUI is seldom closed.

    Browser 7.4.2 is already available on some Symbian belle devices, such as latest version of Nokia 701.

    Br,
    Ilkka

  13. #13
    Registered User
    Join Date
    Dec 2009
    Location
    Switzerland
    Posts
    121

    Re: Platformservices 2.0 troubles with WRT 7.3

    Thank you Isalento!
    This was the answer I was waiting for

    When Belle will be published, I will try to write some apps reimplementing PS2.0.
    I discovered Qt in the summer 2010, it was sooo easy and nice to use, that I begun to write some apps.
    Thank you Nokia, for giving me this possibility!

Similar Threads

  1. Replies: 1
    Last Post: 2011-07-20, 06:25
  2. Still having troubles..
    By charlotteferyn in forum Automatic Feedback Channel
    Replies: 0
    Last Post: 2010-05-11, 15:21
  3. Is Bluetooth possible while FlashLite with PlatformServices?
    By KevinBoyd in forum [Archived] Flash Lite on Nokia Devices
    Replies: 2
    Last Post: 2009-12-03, 16:47
  4. N86 Troubles
    By mxjames in forum General Development Questions
    Replies: 3
    Last Post: 2009-10-26, 07:20
  5. S60 3rd FP1 troubles
    By Adriana_P in forum Symbian Tools & SDKs
    Replies: 10
    Last Post: 2007-07-12, 09:19

Posting Permissions

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