×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    11

    Unhappy what is wrong with this statement ???

    Code:
     def discovered(error, devices, cb_param):
        if error == 0:
           #tell("devices: " + str(devices))
            tell(" ")
            for address, name in devices:      
                tell("Found: " + address + " | " + name)
          
              
            if address == "00:10:dc:e9:50:37" :
    	     fireupfile1()
    	    
                
            elif address == "00:11:67:1e:62:a0" :
    	     fireupfile2()
    
             else :
    	     fireupfile3()            
    
    
    while(1):
        try:
            _discoverer = BtDeviceLister()
            _discoverer.discover_all(discovered, None)
            tell("discovering")
            e32.ao_sleep(100)
            print "scanning again"
        except:
            tell("init failure")
            appuifw.note(u"Fatal error.", "error")

    This program should scan from 100 to 100 seconds for Bluetooth devices.
    If it finds 2 particular devices ( by their MAC address ) then it sends 2 different files through ftp GPRS -fireupfile1() and fireupfile2()
    If not then sends another file through ftp GPRS -fireupfile3()
    My problem is :
    the program sends fireupfile1() and fireupfile2() if it finds the particular Bluetooth devices but does not send fireupfile3() if it does not find any Bluetooth device in the area or not the Bluetooth device mentioned above.

    Can u give me a clue pleaseeee!!?
    Last edited by claudiuandreii; 2006-05-14 at 17:44.

  2. #2
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: what is wrong with this statement ???

    Please post your code inside a [code] tag, otherwise it's unreadable.

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    11

    Unhappy Re: what is wrong with this statement ???

    please can anyone help me....!!??

  4. #4
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    158

    Re: what is wrong with this statement ???

    Well, there is one space too many before your 'else :'....
    That should throw an exception...

Similar Threads

  1. Update SQL statement doesn't work
    By asheeshv in forum Symbian
    Replies: 4
    Last Post: 2008-12-11, 05:41
  2. How to Prompt the user for IAP selection only if the wrong IAP is currently selected
    By kaiser_20 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-10-26, 15:19
  3. Replies: 0
    Last Post: 2005-02-16, 14:20
  4. whats wrong with this code?
    By Rx-lee in forum Symbian
    Replies: 4
    Last Post: 2004-03-25, 10:50

Posting Permissions

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