Re: Doubles are being converted to Integers by takeStoredValueForKey
Re: Doubles are being converted to Integers by takeStoredValueForKey
- Subject: Re: Doubles are being converted to Integers by takeStoredValueForKey
- From: Ken Anderson <email@hidden>
- Date: Fri, 04 Feb 2005 11:47:50 -0500
Mark,
Take a look at the model's plist files. You'll probably find that the
valueType is wrong for the attribute in question. It's probably an I
instead of a B.
Ken
On Feb 4, 2005, at 11:43 AM, Mark W. Shead wrote:
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:
email@hidden
This email sent to email@hidden
_______________________________________________
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