On Mon, Oct 26, 2009 at 5:41 PM, David LeBer <[email protected]> wrote: > > On 2009-10-26, at 8:37 PM, Joe Little wrote: > >> On Mon, Oct 26, 2009 at 5:29 PM, Miguel Arroz <[email protected]> wrote: >>> >>> Hi! >>> You don't have to do new Integer(x) for all the integers. I have this on >>> my code and it works: >>> private NSArray<Integer> monthList = new NSArray<Integer>( new Integer[] >>> { >>> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } ); >>> >>> Yours >> >> Wow, that doesn't work for me. The numbers are all marked red with the >> error of >> >> The expression of type int is boxed into Integer >> >> Buts its an error nonetheless that won't let me continue from. > > Works fine for me. What JDK are you on?
Eclipse says JVM 1.5.0 (MacOS X Default) -- though I thought 1.6 was the default on 10.6 > >> >>> >>> Miguel Arroz >>> >>> On 2009/10/27, at 00:26, Joe Little wrote: >>> >>> On Mon, Oct 26, 2009 at 5:22 PM, Miguel Arroz <[email protected]> wrote: >>> >>> Hi! >>> >>> 1) Try new Integer[] instead of new int[]. >>> >>> 2) Are you sure anAppliedClass.appliedYear is an integer? >>> >>> appliedYear is an Integer. >>> >>> I've added a formatter = "0000", but not help. I tried #1 but it >>> requires a "new Integer(2000)" etc for each. That should work, but I'm >>> just curious why its not handling the int to Integer conversion well. >>> Just something that I expected. I guess I'll do it the ugly way. >>> >>> >>> Yours >>> >>> Miguel Arroz >>> >>> On 2009/10/27, at 00:18, Joe Little wrote: >>> >>> I have a wo popup button >>> >>> YearPopUpButton: WOPopUpButton { >>> >>> item = intSelection; >>> >>> list = YearList; >>> >>> selection = anAppliedClass.appliedYear; >>> >>> } >>> >>> and the relevant code is >>> >>> public NSArray YearList = new NSArray(new int[]{2000, 2001, 2002, >>> >>> 2003, 2004, 2005, 2006, 2007, 2008, 2009}); >>> >>> public int intSelection; >>> >>> appliedYear is an Integer. >>> >>> When run, I get: >>> >>> While trying to set the field "intSelection" on an object of type >>> >>> edu.stanford.ee.classmgmt.apply.ui.AppliedClassPage we expected a int >>> >>> but received a [I with a value of [...@70d9cbcb. This often happens if >>> >>> you forget to use a formatter. >>> >>> Setting a formatter doesn't seem to help. I'm guessing I need some >>> >>> indirection to setting the appliedYear value, but it seems the error >>> >>> is more due to the fact that its not liking the NSArray. Do I need to >>> >>> generate a list of new Integer(2000), new Integer(2001).. etc? >>> >>> _______________________________________________ >>> >>> Do not post admin requests to the list. They will be ignored. >>> >>> Webobjects-dev mailing list ([email protected]) >>> >>> Help/Unsubscribe/Update your Subscription: >>> >>> http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com >>> >>> This email sent to [email protected] >>> >>> >>> _______________________________________________ >>> Do not post admin requests to the list. They will be ignored. >>> Webobjects-dev mailing list ([email protected]) >>> Help/Unsubscribe/Update your Subscription: >>> http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com >>> >>> This email sent to [email protected] >>> >>> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list ([email protected]) >> Help/Unsubscribe/Update your Subscription: >> >> http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com >> >> This email sent to [email protected] > > ;david > > -- > David LeBer > Codeferous Software > 'co-def-er-ous' adj. Literally 'code-bearing' > site: http://codeferous.com > blog: http://davidleber.net > profile: http://www.linkedin.com/in/davidleber > twitter: http://twitter.com/rebeld > -- > Toronto Area Cocoa / WebObjects developers group: > http://tacow.org > > > > > _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
