On Aug 26, 2:37 pm, "Mark Murphy" <[email protected]> wrote:
>
> Can we back up a step or two and discuss what your actual objective is?
> PostMessage() is a means to an end -- if you can describe the end, we may
> be better able to give you an Android-flavored means.
>
Hello Mark,
Lots of different uses but if I had to choose one I'd say
notifications, especially event notifications with the ability to pass
a reference to an object to be used by the receiver of the
notification along with the notice (LParam stuffing for the Windows
types out there). In Windows the two main paradigms I've seen for
doing that are Windows PostMessage() message passing and function
callbacks. I lean towards they PostMessage() paradigm because it gets
you out of the call chain that a function callback can place you in
when your callback is invoked and there can be some fair degree of
nuisance that comes with that condition. For example, in many windows
callbacks it's a known practice to avoid doing any time consuming work
in the callback or you can crash/disrupt the mechanism that is driving
the callback, so you delay the processing and move it out of the
callback call context by posting a notifcation to some other code
you've written with a reference to a data object you created that has
all the necessary information to do what you need to do. Or you can
post the a notification to another thread and let it handle the time
consuming task. But mostly it's straightforward event notifications.
I know you know all of this, I'm just using these examples as a way to
indicate my area of focus.
Another example. One of the areas I know I'm going to have to read
deeply about, especially since I intend to be streaming audio from a
server to the handset, is how to do asynchrounous socket processing
which I assume Android has some standardized notification message
mechanism for..
Thanks,
Robert
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---