Justin,
What you saying is certainly true generically. But I am specifically
talking about a class as follows:
public class JakeService extends Service {
}
In example code I don't think I usually see calls up to the super
implementations. That seems wrong. So when extending the Service class
do you call super before or after you do your own work? Wouldn't the
answer to this question be the same regardless of what my Service
implementation does?
...Jake
>>>>> "JA" == Justin Anderson <[email protected]> writes:
JA> But DanH is right, it totally depends on what you want to do. It
JA> also depends on what super does... If your subclass is setting
JA> information that is also set by super then chances are you would
JA> want to call super first. If what super does varies based on
JA> settings in your implementation, then you would want to call
JA> super last. If there is no such relationship then it doesn't
JA> matter when you call.
JA> Also, IMHO, you would only want to skip calling super in
JA> extremely rare circumstances.
JA> And, technically speaking, you would be calling "up" to the super
JA> implementation, but that's just semantics... :-)
JA> ----------------------------------------------------------------------
JA> There are only 10 types of people in the world...
JA> Those who know binary and those who don't.
JA> ----------------------------------------------------------------------
JA> On Thu, Jul 15, 2010 at 1:54 PM, DanH <[email protected]> wrote:
>> Maybe, maybe not. It depends on what you want to do.
>>
>> On Jul 15, 2:46 pm, Jake Colman <[email protected]> wrote:
>> > When extending Service with your own Service, should you be calling down
>> > to the super implementation of the methods that are being overridden?
>> > If so, do you do it before or after you've invoked your own code?
>> >
>> > --
>> > Jake Colman -- Android Tinkerer
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>>
[email protected]<android-beginners%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
JA> --
JA> You received this message because you are subscribed to the Google
JA> Groups "Android Beginners" group.
JA> NEW! Try asking and tagging your question on Stack Overflow at
JA> http://stackoverflow.com/questions/tagged/android
JA> To unsubscribe from this group, send email to
JA> [email protected]
JA> For more options, visit this group at
JA> http://groups.google.com/group/android-beginners?hl=en
--
Jake Colman -- Android Tinkerer
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en