• 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
How To Check Attribute's Width Programmatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How To Check Attribute's Width Programmatically?


  • Subject: How To Check Attribute's Width Programmatically?
  • From: email@hidden
  • Date: Thu, 05 Feb 2004 17:07:05 -0500
  • Priority: normal

I realize you can set and get attributes of an entity or table programmatically (using either takeValueForKey or valueForKey())

I would however like to retrieve the maximum possible width of the attribute in my program. I ask this because of so : I have an attribute first_name in my table Subscribers. Its width attribut is 150 varchar2().

Now when subscribers are entering the first_name field through the web interface I would like to do some length check (what if the subscriber enters a name longer than 150 characters?) (please bear with me this is just an example albiet a bad one)

In my validation mathod I would like to check if the string entered is greater than the set width of the field of the table (whatever it may be). I can put in a preset 150 characters but that is no fun (because if you change the character width later on you will have to go through the code and change all instance of 150 character width).

Is it possible to retrieve the width of an attribute in the program ?


A. Shiraz
44 Executive Boulevard
Elmsford, NY 10523
(914) 592- 4203 x268
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: How To Check Attribute's Width Programmatically?
      • From: Kaj Hejer <email@hidden>
    • Re: How To Check Attribute's Width Programmatically?
      • From: Anjo Krank <email@hidden>
    • Re: How To Check Attribute's Width Programmatically?
      • From: Jonathan Rochkind <email@hidden>
  • Prev by Date: Re: Generating URL dynamically [Solved]
  • Next by Date: Re: How To Check Attribute's Width Programmatically?
  • Previous by thread: Official Response: Java 1.4.2 and WebObjects
  • Next by thread: Re: How To Check Attribute's Width Programmatically?
  • Index(es):
    • Date
    • Thread