• 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: Using a text formatter on a WOBuilder WOString object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using a text formatter on a WOBuilder WOString object


  • Subject: Re: Using a text formatter on a WOBuilder WOString object
  • From: Jonathan Rochkind <email@hidden>
  • Date: Tue, 17 Jun 2003 16:08:22 -0500

You have to write an implementation of java.text.Format. Which isn't too hard to do, but a little bit annoying since you need to deal with StringBuffer and a FieldPosition object. Try looking around on the web for examples (don't need to be WO specific, just Java examples).

Bound to a WOString, WO won't ever call parseObject on the Format object, WO will only call format(). So you can leave parseObject with an empty implementation, or throw an exception, whatever. If you bind a Format object to a WOTextField, however, WO will use it in both directions, parseObject and format. This makes sense if you think about it.

--Jonathan

At 01:38 PM 6/17/2003 -0700, Nat Fast wrote:
I am having trouble finding an example of how to construct a formatter that could be bound to the "formatter" field of a WOString.

I have a string that is being returned as
("text here")
 and I want it formatted to
text here

What do I have to do?


Thanks,
Nat
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Using a text formatter on a WOBuilder WOString object (From: Nat Fast <email@hidden>)

  • Prev by Date: Using a text formatter on a WOBuilder WOString object
  • Next by Date: Re: Using a text formatter on a WOBuilder WOString object
  • Previous by thread: Using a text formatter on a WOBuilder WOString object
  • Next by thread: Re: Using a text formatter on a WOBuilder WOString object
  • Index(es):
    • Date
    • Thread