Re: NSData could not cast to Long
Re: NSData could not cast to Long
- Subject: Re: NSData could not cast to Long
- From: Alexander Spohr <email@hidden>
- Date: Mon, 25 Jun 2012 19:04:43 +0200
What is your question here? Why a java.lang.Long is not a com.webobjects.foundation.NSData?
Answer: Because casting does not magically turn a Long into an NSData maybe?
Your array contains Longs, not NSDatas.
atze
PS. please read the text of the exception yourself.
Am 25.06.2012 um 18:05 schrieb Ron X:
> hi4all
>
> NSMutableArray<NSData> currentArtistID = (NSMutableArray<NSData>) validArtistsIDs.valueForKey("CURRENT_ARTIST_ID");
>
> byte[] bytes = currentArtistID.get(i).bytes(); << there get an exception
>
> if i write
>
> int concreteCurrentArtistID = new Integer(new String(currentArtistID.get(i).bytes()));
>
> i get the same exception:
>
> ClassCastException: java.lang.Long cannot be cast to com.webobjects.foundation.NSData
_______________________________________________
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