Hello,
I have writen some code around the Web Runtime environment Platform Services 1.0 JavaScript API, and think that I found a bug or something that. In fact, I use the Nokia Web Developer Environment version 3.0.1, and write something like this to reproduce the error:
Please, take attention to the commented lines "Here is the problem!" in the above code. In fact, the documentation said that "ReturnValue" contain here a property "NetworkInfo", that itself contain an object with the network information. But this is not true: the "ReturnValue" contain itself the "NetworkInfo" object properties, not a property with this name pointing to this.Code:var so = device.getServiceObject( 'Service.SysInfo', 'ISysInfo' ); function testGetInfo() { so.ISysInfo.GetInfo ( { Entity : 'Network', Key : 'CurrentNetwork' }, function( transId, eventCode, result ) { // Here is the problem! console.info( result.ReturnValue ); } ); } function testGetNotification() { var ref = so.ISysInfo.GetNotification ( { Entity : 'Network', Key : 'CurrentNetwork' }, function( transId, eventCode, result ) { // Here is the problem! console.info( result.ReturnValue ); // Cancel the transaction // so.ISysInfo.Cancel({ TransactionID : ref.TransactionID }); } ); } testGetInfo(); testGetNotification();
In other words (sorry for my english, but maybe the bellow code explain the problem better) see this other code that work like a charm, just like the documentation said:
In the above code you can see that the "ReturnValue" dont have the value that we looking for, but this is placed onto the "Status" property of "ReturnValue". Well, this is the same in all the mayor System Attributes in the API, some use the "Status" property, other use "StringData", "DriveList", "DriveInfo", etc.Code:function goodGetInfo() { so.ISysInfo.GetInfo ( { Entity : 'Battery', Key : 'batteryStrength' }, function( transId, eventCode, result ) { console.info( result.ReturnValue.Status ); } ); } goodGetInfo();
I found that when you request the "Network > CurrentNetwork" combination all "GetInfo()" and "GetNotification()" fails, in the manner that I commented above: the "ReturnValue" not contain the "NetworkInfo" property (like the documentation said) but contain itself the network information.
Please, sorry my bad english. If cannot undertandme or need more information... feel free to write a response to this message! In cany case thanks very much for your patience!

Reply With Quote

