• 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: Newbie UI questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie UI questions


  • Subject: Re: Newbie UI questions
  • From: Andy Bettis <email@hidden>
  • Date: Tue, 7 Jun 2005 11:37:50 +0100

On 7 Jun 2005, at 09:40, m wrote:

On Jun 7, 2005, at 1:09 AM, Andy Bettis wrote:

It's me again, switching from PowerPlant to Cocoa.

A large number of my apps use dialogs for data input and editing, and so I use a lot of text edit fields. With PP I can set maximum content sizes, key filters for controlling allowable characters, and text traits for font name, size, style, etc. Are there equivalents for these in Cocoa?

[etc]

I used to do a lot of work in PowerPlant as well. In my transition to Cocoa I found that it was best not to try to understand Cocoa by leveraging my understanding of PowerPlant. Conceptually, Cocoa and PowerPlant aren't completely orthogonal, but if you stick too close to PowerPlant as a guide, you miss out on the idioms that the dynamic nature of Objective-C affords and that Cocoa exploits to good advantage. I found my progress to be a lot quicker once I "let go" of the C++/PowerPlant mindset.

I appreciate the comment but I think in this case it's the final effect I'm talking about rather than the underlying conceptual framework (no pun intended). If I want to limit the input in a field to a certain number of characters, or a particular character subset, then I can either intercept the key strokes or accept anything and generate appropriate error messages afterwards. If the system I'm using has built-in classes/functions/hooks/whatever to make it easier to do one or the other then this will affect my decision. In PP I found it easiest to use the built-in classes to perform the 'crude' validation (size, character subset) as a beep was generally enough information for the user, and then do the 'content' validation in code, where a more meaningful message could be provided. If there are no built-in 'crude' methods in Cocoa then I'll need to look at a NSTextField subclass as this sort of validation is very common in my apps.


Unless I'm barking up the wrong tree?

Many thanks.

Rev. Andy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Newbie UI questions
      • From: m <email@hidden>
References: 
 >Newbie UI questions (From: Andy Bettis <email@hidden>)
 >Re: Newbie UI questions (From: m <email@hidden>)

  • Prev by Date: Font menu items staying enabled when they shouldn't
  • Next by Date: CoreData and arrays
  • Previous by thread: Re: Newbie UI questions
  • Next by thread: Re: Newbie UI questions
  • Index(es):
    • Date
    • Thread