You Are Here:

Community: Developer Discussion Boards

#1 Old Item assignment in Form - 2008-06-27, 09:11

Join Date: Dec 2007
Posts: 409
Location: Tempe, AZ
Send a message via Yahoo to shubhendra Send a message via Skype™ to shubhendra
shubhendra's Avatar
shubhendra
Offline
Forum Nokia Champion
Code:
import appuifw
 
class MyFormView( object ):
    
    ## The constructor.
    def __init__( self ):
        ## Bool
        self._iIsEdited = False
        self._iFields = [( u'Amount1','number', 5 ),
                         ( u'Amount2','number', 5 ),
                         ( u'Amount3','number', 5 ),
				 ( u'Total','number', 5 )]
 
 
    ## Displays the form.
    def setActive( self ):
        self._iIsEdited = False
        self._iForm = appuifw.Form(self._iFields, appuifw.FFormDoubleSpaced)
        self._iForm.save_hook = self._markEdited
        self._iForm.flags = appuifw.FFormDoubleSpaced
        self._iForm.execute( )
 
 



    def _markEdited( self, aBool ):
        self._iIsEdited = aBool
	
         

    def isEdited( self ):
        return self._iIsEdited

    def abc(self):
	  self._iForm[3][2]=self._iForm[0][2]+self._iForm[1][2]+self._iForm[2][2]


   
 
if __name__ == "__main__":
    appuifw.app.title = u'Try Forms'
    myForm = MyFormView( )
    myForm.setActive( )
    
    if myForm.isEdited( ):
        myForm.abc()
Now it gives me error,

Quote:

self._iForm[3][2]=self._iForm[0][2]+self._iForm[1][2]+self._iForm[2][2]

Object doesn't support iten assignment
Now Can something be done here?


IDEAS is all they need but still they think only Genius can give them that.
Reply With Quote

#2 Old Re: Item assignment in Form - 2008-06-28, 14:06

Join Date: Nov 2006
Posts: 186
Location: Pune, india
sagars's Avatar
sagars
Offline
Regular Contributor
hi shubhendra

the below line mentioned by you will definitely give error,Object doesn't support iten assignment

self._iForm[3][2]=self._iForm[0][2]+self._iForm[1][2]+self._iForm[2][2]

just make one simple change :
Total=self._iForm[0][2]+self._iForm[1][2]+self._iForm[2][2]
and call this "Total" variable at new form execution.
It should work.
Regards
Girish
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Form troubles matdodgson Symbian User Interface 2 2008-12-06 11:49
Displaying Information In a form from Listbox Item mubx2000 Symbian User Interface 26 2007-05-26 08:38
Keep track of highlighted ITEM on form ymtoh Mobile Java General 1 2005-12-28 01:36
Resizing video in a Form Item mdtoxy Mobile Java Media (Graphics & Sounds) 4 2004-04-07 13:11
How to get selected index of Item in a Form ? akokchai Mobile Java General 1 2004-02-23 02:40

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia