Re: stuck on "Incorrect type in assignment" error
Daniel Bonniot <[email protected]> Mon, 07 Mar 2005 01:02:48 +0100
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
>>>I'm trying to get a rather large Nice program written in a hurry, >> >>How come ? ;-) > > > Why, because I don't like to write them slowly, of course! :) ;-) > I'm implementing the same moderately-sized Swing application in > seven or so JVM languages, preparing to write a series of articles > comparing and contrasting them. Although there are over a hundred > languages for the JVM, only a handful of them are capable of handling > this (otherwise relatively simple) application because of the unique > challenges that Swing poses. Nice is one of the few. > > So think of me as a restaurant or movie critic! ;-) Very interesting project. Let us know how it's going. > Nice! *Ahem*, er, so to speak. Thanks for the tip. I should have noticed that > function. I usually dig around in nice.jar's > nice/functional/package.nicei when I'm > looking for a higher order-ish kind of function like that. It's quite > a package of > goodies, and should be committed to printed documentation someday. :-) Partly our fault, as it's not yet easy enough to browse the libraries. reading package.nicei is definitely not ideal. There is work underway to implement nicedoc. You can see the current output on the standard libraries at: http://nice.sourceforge.net/nicedoc/ We'll need to improve on this soon, especially as Bryn is keeping adding great libraries (nice.io recently). > Although there are a few places where > Nice has assumed I was passing a byte, and I wanted to cast it as an int. > Is there a way to specify that a literal argument like -1 should be treated > as an int? (Long is easy; -1L). byte is a subtype of int, so you should usually not need to do anything explicitly. In what case did you notice this? Actually, it can be apparent if you do: var x = 0; That will declare x as a byte. Of course you could as well say int x = 0; if you want to declare an int variable. For each primitive type, there is a function with the name of the type to convert a compatible value into that type (_that_ is in the manual: http://nice.sourceforge.net/manual.html#conversion ;-) So if you really need it, int(-1) is the value -1 as an int. > Yes, I just wanted to see how many of your buttons I could push, after being > pushed around by Nice all morning. :) I tried to stay nice ;-) > I like the general idea. There are > some implementation details that I'm still getting used to. OK. Feedback is always welcome. Surely some things could be explained better. Or the implementation could be perfected. It's feedback that will help moving in the right direction. Cheers, Daniel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click