• 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: float values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: float values


  • Subject: Re: float values
  • From: Ricardo Strausz <email@hidden>
  • Date: Wed, 22 Jan 2003 16:49:43 -0600

I am using WO 5.2 on OSXS 10.2.3 ---PB Version 2.0.1 (July 2002
Developer Tools) and IB 2.3 (v283)---

In EOModeler, as you said so, there are a couple of columns which I did not describe:
Value class (java) and Value; they are Number and d, respectively.


Now, in the inspector, it say External type: "double precis" (insteed of precision, I do not know why) and Internal Data Type: "Double" ---not to be confused with Value class (Objective-C) "NSNumber" in the previous post (sorry)---

Any other idea?

On miircoles, ener 22, 2003, at 16:17 America/Mexico_City, Jonathan Rochkind wrote:

It may be the model. What version of WebObjects are you using? What OS? In WO5.x Windows, NSNumber shouldn't be available as an "internal type" in the inspector. It should be "Integer" instead. If you are looking, not in the inspector, but in the grid view in EOModeler, there are a bunch of confusing mis-designed things going on that I won't get into now, but: don't. Instead hilite the attribute and press the 'i' button to get the inspector. Make sure internal type is "Integer".

In addition, you sometimes need to mess with the "Value Type" which is something else again. In EOModeler click on the "Add Column" popup, and add the "Value Type" column to the grid view. The Value Type is (again, confusingly) not available in the Inspector, you need to use the grid view. The possible values of "Value Type" are documented > here:
http://developer.apple.com/techpubs/webobjects/UsingEOModeler/ 4WorkingWithAttributes/Value_Type.html
You probably want to try either 'f' or 'd'.


If you are using OS X instead of Windows, the EOModeler interface may be somewhat different; I'm not familiar with it. But the "Value Type" still exists somewhere, and should be set. If you are using WO 4.5 or earlier.... I'm really not sure.


At 12:07 PM 1/22/2003 -0600, you wrote:
Hi all,
I am facing a (may be simple) problem. In a d2w (and d2j) apps, i have a couple of fields which most be floats (cuantities which cannot be mesured by integers). The problem is that, eventhough I was able (via the assistent) to aloud the interface to accept decimal/float values, when commiting (say when saveing) the transaction, it is rounded to an integer and saved as that. e.g., 0.678 is saved as 1, 0.456 as 0 and so on.
Since this cuantities are the balance of a stock, this behave is unacceptable.


I know that:
it is not the database (in the squema the values are defined as floats)
it is not the model (I hope; the "internal" type is NSNumber and the external one is "double precision")
it is not the textfield (it has a formatter of the form: 0.000)


What else can it be???



Dino
http://homepage.mac.com/strausz
_______________________________________________
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.

  • Prev by Date: Fwd: Re DisplayGroups. Inserting and deleting objs
  • Next by Date: Re: Re DisplayGroups. Inserting and deleting objs
  • Previous by thread: Re: float values
  • Next by thread: WebObjects Mailing List Archives Are Now Searchable
  • Index(es):
    • Date
    • Thread