• 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
Doubles are being converted to Integers by takeStoredValueForKey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Doubles are being converted to Integers by takeStoredValueForKey


  • Subject: Doubles are being converted to Integers by takeStoredValueForKey
  • From: "Mark W. Shead" <email@hidden>
  • Date: Fri, 4 Feb 2005 11:43:17 -0500

I have a custom EO that includes the following method:

public void setExpenseAmount(Number value) {
System.out.println("Setting Expense Amount to: " + value);
takeStoredValueForKey(value,"expenseAmount");
System.out.println("Expense Amount has been set to: " + (Number)storedValueForKey("expenseAmount"));
}


If I try to pass it 1.5, it shows the following:

	Setting Expense Amount to: 1.5
	Expense Amount has been set to: 1

In EOModeler expense Amount is setup as:
External Type: double
Internal Data Type: double

In the database (Openbase), EXPENSE_AMOUNT is setup as type float.

I have another method called setBillingAmount that is setup in the same way, but functions as expected.

Is there something obvious I'm overlooking or some other place I should check that I'm not aware of?

Thanks!

Mark Shead

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


  • Follow-Ups:
    • Re: Doubles are being converted to Integers by takeStoredValueForKey
      • From: Ken Anderson <email@hidden>
References: 
 >Graphviz (From: David Holt <email@hidden>)

  • Prev by Date: Re: [closed]retrieve WOHyperlink url without tags?
  • Next by Date: Re: Doubles are being converted to Integers by takeStoredValueForKey
  • Previous by thread: Graphviz
  • Next by thread: Re: Doubles are being converted to Integers by takeStoredValueForKey
  • Index(es):
    • Date
    • Thread