You Are Here:

Community: Developer Discussion Boards

#1 Old Classes - 2008-06-28, 01:45

Join Date: Mar 2008
Posts: 57
DrivingMobileInnovation
Offline
Regular Contributor
When I need to use classes? Any good examples?
Reply With Quote

#2 Old Re: Classes - 2008-06-28, 07:33

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
This is a question that is more about Python in general rather than Python for S60. See this.
Reply With Quote

#3 Old Re: Classes - 2008-06-28, 07:51

Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Online
Forum Nokia Champion
Quote:
Originally Posted by DrivingMobileInnovation View Post
When I need to use classes? Any good examples?
hi DrivingmobileInnovation
better you have a look at this


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#4 Old Re: Classes - 2008-07-03, 00:23

Join Date: Mar 2008
Posts: 57
DrivingMobileInnovation
Offline
Regular Contributor
I'm not sure how a module differs from a class. Could you explain me?
Reply With Quote

#5 Old Re: Classes - 2008-07-03, 06:18

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Quote:
Originally Posted by DrivingMobileInnovation View Post
I'm not sure how a module differs from a class. Could you explain me?
A module is like a plug-in, or an addon, if you will. It's a separate file whose contents you import. For example, appuifw is a module.

A class is an object, something that has attributes and methods. For example, app is a class in the appuifw module.
Reply With Quote

#6 Old Re: Classes - 2008-07-07, 23:19

Join Date: Mar 2008
Posts: 57
DrivingMobileInnovation
Offline
Regular Contributor
Quote:
A class is an object, something that has attributes and methods. For example, app is a class in the appuifw module.
But why I can't just use only functions (instead of classes)?
Reply With Quote

#7 Old Re: Classes - 2008-07-08, 04:57

Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Online
Forum Nokia Champion
hi DrivingMobileInnovation
i think the question is more of a object orientated concept rather than a PyS60.
As far as i know classes are nothing else but a group of functions only but classes keeps different types of function in one group and in an organized manner.
In functions we can have nested functions but its not a good programming technique it will be tedious and inefficient.
hope this helps.


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#8 Old Re: Classes - 2008-07-08, 06:18

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Quote:
Originally Posted by DrivingMobileInnovation View Post
But why I can't just use only functions (instead of classes)?
Of course you can use only functions to make your applications. I for one recommend it, as working with classes can get confusing. But don't forget classes can also be useful.
Reply With Quote

#9 Old Re: Classes - 2008-07-08, 06:44

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Module in Python:
The basic unit of code reusability in Python: a block of code imported by some other code. Three types of modules concern us here: pure Python modules, extension modules, and packages.

Read the docs at http://docs.python.org !

Br,
Croozeus
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
The following classes and resources could not be loaded ERROR!! keithgardiner Mobile Java Tools & SDKs 4 2007-02-01 21:03
Accessing an object across Classes in Dll yogpan General Symbian C++ 1 2006-06-22 19:05
T classes and destructors profoundwhispers General Symbian C++ 7 2004-08-26 11:02
Where are the classes? nreddy Mobile Java Tools & SDKs 0 2003-08-10 08:58
Including jar/zip classes to MIDP App lassilehto Mobile Java Tools & SDKs 0 2003-07-14 15:18

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