• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa et al as HCI usability problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa et al as HCI usability problem


  • Subject: Re: Cocoa et al as HCI usability problem
  • From: Greg Titus <email@hidden>
  • Date: Mon, 19 May 2008 10:48:07 -0700

Peter Duniho wrote:
In C#:

   void setColor(NSColor color)
   {
       undoManager.prepareWithInvocationTarget(this).setColor(mColor);
       mColor = color;
   }

Your point being? If you think your example is useful in presenting your claim, you'll need to be a lot more specific.

[...]
Well, I'm still waiting for someone to show me how that flexibility is used. You are certainly doing a great job of stating the same party line I've heard countless times already. But you're also failing to provide a compelling example of how this flexibility comes into play in the real world. Again, this is not only typical, it's characteristic of _every_ single time I've heard the party line stated.

You've translated the Objective-C syntax into C# syntax, but the point of the question is to think about what prepareWithInvocationTarget() does. How would you write that method in C#?


In Objective-C, after you call -prepareWithInvocationTarget: on an NSUndoManager, it then accepts _any_ message call of any kind. It is completely and totally dynamic. It accepts messages from your application which weren't defined and didn't exist when the NSUndoManager class was compiled. The undo manager accepts the message, saves the target and method invocation with an arbitrary number of arguments and is able to re-invoke it later on the original target when the user asks you to Undo.

This is an example of what a dynamic message dispatch mechanism can do for you. How would you implement that in a direct invocation or v- table environment? Of course Undo is still doable in Java or C#: these are all turing equivalent languages, but how much code would it take and how complicated would it be for the programmer using the undo management library to define this-is-something-to-undo?

Hope this helps,
	- Greg


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cocoa et al as HCI usability problem
      • From: Peter Duniho <email@hidden>
References: 
 >Re: Cocoa et al as HCI usability problem (From: Peter Duniho <email@hidden>)

  • Prev by Date: Re: Cocoa et al as HCI usability problem
  • Next by Date: Re: Cocoa et al as HCI usability problem
  • Previous by thread: Re: Cocoa et al as HCI usability problem
  • Next by thread: Re: Cocoa et al as HCI usability problem
  • Index(es):
    • Date
    • Thread