Mark M. |
has entered the room |
Mark M. |
turned on guest access |
Jul 15 |
8:05 PM |
Brian C. |
has entered the room |
Mark M. |
howdy, Brian!
|
Brian C. |
Hi, Mark.
|
Brian
C. |
I have a question about the Application class
|
Mark M. |
um, OK
|
Brian C. |
In iPhone development, it is common to have a
bunch of methods attached to the AppDelegate class
|
Brian
C. |
doesn't seem like that is very common in Android
development
|
Mark M. |
I'm not sure what role AppDelegate plays, as I'm
not an iPhone developer
|
Brian C. |
but I've also read and heard that it is a good
place to stick global stuff
|
Mark M. |
it is certainly a candidate
|
Brian C. |
oh, it's kind of like the Application class. It
has a couple of callbacks and you can get a reference to it elsewhere in
the app
|
Mark M. |
Dianne Hackborn is on record as saying using a
custom Application class is not much better than using static data
members
|
Jul 15 |
8:10 PM |
Brian C. |
anyway, is it a bad idea to put methods on the
Application class and then call them from an Activity to manipulate
global data?
|
Mark M. |
I've used a custom Application class in a
production app, and the results were so-so
|
Mark M. |
it's not a bad idea per se
|
Mark M. |
I would be a bit nervous about using Application
as a Context, though
|
Mark M. |
lots of people get bit by problems there
|
Mark M. |
so long as you are treating Application as just
some magically-created singleton, I don't think there's any particular
problems
|
Brian C. |
OK, I might be conflating with Contexts. I
recalled there was an issue there.
|
Brian
C. |
with Application versus Activity context I mean
|
Mark M. |
Activity and Service are each subclasses of
Context and tend to be better choices when you need a Context
|
Mark M. |
besides, you only get an Application by way of
some other Context (e.g., getApplication())
|
Brian C. |
OK. Thanks, that helps a bit
|
Jul 15 |
8:15 PM |
Mark M. |
any other questions?
|
Mark J. |
has entered the room |
Mark M. |
howdy, Mark J!
|
Mark J. |
Heya :)
|
Mark M. |
it's your turn -- got a question?
|
Mark J. |
Not at the moment :) Just hanging out
|
Mark M. |
OK
|
Mark J. |
Oh by the way. You were correct in suggesting my
SQLite for my "Checklist" I am working on. I looked into the sdk "Notes"
example, it was also what they used.
|
Jul 15 |
8:20 PM |
Mark J. |
Or actually it was titled Notepad
|
Jul 15 |
8:20 PM |
Mark M. |
yes
|
Mark M. |
it's fairly simple to use
|
Mark J. |
seems to be, I started reading through the book
about it. Haven't gotten much work on it yet though.
|
Jul 15 |
8:40 PM |
Brian C. |
has left the room |
Jul 15 |
8:45 PM |
Mark M. |
Zzzzzzzzzzzzzzzzzzzzzzz...
|
Jul 15 |
8:55 PM |
Mark M. |
well, any questions before I close down this
office hour?
|
Mark M. |
ok, well, then, have a pleasant evening!
|
Jul 15 |
9:00 PM |
Mark J. |
has left the room |
Jul 15 |
9:00 PM |
Mark M. |
turned off guest access |