| Reply | « Previous Thread | Next Thread » |
|
B]self arg can't be coerced to[/b]
What does this error mean? I get it upon using these commands; it's Jython, but I guess this is a standard Python error: >>> import javax.power.monitor.PowerMonitor >>> pm = javax.power.monitor.PowerMonitor >>> print pm.getBatteryLevel() TypeError: getBatteryLevel(): expected 1 arg; not 0 If I specify an argument: >>> print pm.getBatteryLevel(0) I get: getBatteryLevel(): self arg can't be coerced to |
|
Quote:
Code:
pm = javax.power.monitor.PowerMonitor() Quote:
|
|
That's right, this is the working version:
>>> import javax.power.monitor.PowerMonitor >>> pm = javax.power.monitor.PowerMonitor.getInstance() >>> print pm.getBatteryLevel() Unfortunately, it always returns same value (0x07fff.ffff); I wonder if some initialisation is required before using this function... Does any Nokia phone support Javaphone API? Thus I could ask somebody for help... ![]() |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| problem in returning length thru TSockXfrLength Arg. in RSocket class | mishrasaurabh | General Symbian C++ | 4 | 2003-12-17 15:42 |
| problem in returning length thru TSockXfrLength Arg. in RSocket class | mishrasaurabh | Symbian Networking & Messaging | 0 | 2003-12-17 05:34 |
| Problem in returning length thru TSockXfrLength Arg. in RSocket class | mishrasaurabh | General Symbian C++ | 0 | 2003-12-15 12:32 |