From: Garrett Smith on
Peter Michaux wrote:
> On Feb 27, 12:15 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>
>> Drag'n'drop in iPhone requires a lot of extra effort.
>
> How would drag and drop even work in iPhone's Safari browser? It seems
> that gestures are already so heavily used there aren't many gestures
> available for drag and drop functionality.
>

Touch-move-scrolls-the-viewport interferes touch move actions being
mapped to mousemove. So how do you make drag'n'drop work on iPhone?

To address this situation, Apple created a Touch Events API.

To use the Touch Events API for your typical drag'n'drop application,
register touch events "touchstart", "touchmove", and "touchend".

The the data need for the drag and drop event (pageX, etc) is not on the
event arg. Instead, it is found on from a Touch object on a TouchList
object. The TouchList object is found by eventArg.touches and the Touch
object is eventArg.touches[i].

In the touchmove event handler, call preventDefault to stop the browser
from scrolling the document around.

To unit test, Apple created the 18 parameter variable method
createTouchEvent.

Three of the 18 parameter variables to createTouchEvent are TouchList
objects. A TouchList object is created using document.createTouchList
and requires at least one Touch object.

A Touch object is created using document.createTouch.

I dislike the existence of proprietary APIs. This particular API is
significantly painful to use and test, so even if it were a standard
proposal, it has significant problems. The 18 parameter variables are
nearly impossible to remember and are irrelevant for most applications.

You'll also notice that scrolling works differently on iPhone. CSS
overflow auto and scroll values do not work.

I hold copyright to my counterproposal, which has been published on this
NG.

Most of the time the program can just allow single touch drag/drop, and
anything else might be just discarded. The "anything else" would be
user's palm touching the screen, or an attempt to do multi-finger drags.

If you'd like to see an example of some code, I can post a link.
>
>> Yes the makers of
>> the iPhone were not up to much tasks other than marketing.
>
> That statement doesn't mean much.
>

I guess I used the wrong word "maker" there.

The people who are actually *making* the iPhone (Chinese workers)
probably could not use there entire year salary to purchase one.

>
>> Try changing an iPhone's battery, for example.
>
> I can see Apple's argument that a user-changable battery requires more
> casing/size and so is not desirable. I should, however, be able to
> stop at a local Apple store and have the battery changed in a couple
> minutes.
>
Is that what Apple argued? I've got to see that. Where is it?
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Garrett Smith on
Garrett Smith wrote:
> Peter Michaux wrote:
>> On Feb 27, 12:15 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>>

[...]
> The people who are actually *making* the iPhone (Chinese workers)
> probably could not use there entire year salary to purchase one.
>
s/there/their
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Peter Michaux on
On Feb 27, 2:52 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> Peter Michaux wrote:
> > On Feb 27, 12:15 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:

> >> Try changing an iPhone's battery, for example.
>
> > I can see Apple's argument that a user-changable battery requires more
> > casing/size and so is not desirable. I should, however, be able to
> > stop at a local Apple store and have the battery changed in a couple
> > minutes.
>
> Is that what Apple argued? I've got to see that. Where is it?

I don't have a link but when the non-changable battery was first used
in the MacBook Pro the argument was that by saving the casing on the
battery and the housing where the battery mounts, they could instead
make the battery bigger for the same/similar weight and size.

Peter
From: Jorge on
On Feb 27, 11:52 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> (...)
> I hold copyright to my counterproposal, which has been published on this
> NG. (...)

Jeez, what a douchebag.

> Try changing an iPhone's battery, for example.
http://www.apple.com/support/iphone/service/battery/
-- 
Jorge.
From: David Mark on
Jorge wrote:
> On Feb 27, 11:52 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>> (...)
>> I hold copyright to my counterproposal, which has been published on this
>> NG. (...)
>
> Jeez, what a douchebag.
>

LOL. Internet tough-guy, huh? Not to mention freeloader. Perhaps you
think intellectual property is an antiquated notion? I know that other
have-nots share that view and it is obvious why that is the case. You
just can't have everything handed to you for free, Internet or no Internet.

Get better Jorge!