Log of the #nice channel on irc.freenode.net

Using timezone: Central European Time
* lodewijk joins01:57
anyone awake? :)
apparently not. oh well.01:58
* lodewijk leaves
* arjanb leaves02:10
* profet joins07:34
* profet leaves
* comrad joins07:46
* comrad leaves07:47
* arjanb joins08:21
* bonniot joins14:01
what about adding a nice.util package?14:42
there are so many java utility packages around that do almost the things14:45
the same
<Bluelive>porting je jakarta commons lang is also a good idea14:48
contains for example alot of often used functionality missing in the default jdk14:49
<bonniot>are there retypings needed to use those packages?14:52
what would be in nice.util?
<arjanb>various functions like in commons lang14:53
<bonniot>why not use the jakarta code itself?14:57
<arjanb>because it's very java specific14:58
<bonniot>so what would be in nice.util?14:59
<arjanb>various string fiddling escaping, base64 and other things that are missing in the jdk but are not important enough be in nice.lang
<bonniot>aren't these the same in Java or in Nice?15:07
* bonniot leaves15:08
* bonniot joins
* ChanServ leaves15:10
* ChanServ joins
<arjanb>commons lang handles things like primitives arrays too and it doesn't care about null mostly
* arjanb leaves15:13
* arjanb joins15:14
and I expect utility functions that are using Nice features will emerge over time
* arjanb leaves15:19
* ChanServ leaves
* bonniot leaves
* ChanServ joins
* arjanb joins
* bonniot joins
primitive arrays are also valid for Nice, no?15:23
for null, OK, but it can be handled by retyping only
<arjanb>why doing retypings when the implementation is only a few lines15:34
cvs server looks still down15:39
<bonniot>isn't jakarta commons a big piece?15:44
<arjanb>it's a collection of dozen things like commons lang, commons collections, ...15:45
i vote for new(...) in CCs15:47
<arjanb>this suggest the existence of super and CC are so different from java constructor that a different syntax is useful17:05
<bonniot>yes, but 'this' makes it clear that you call another constructor from this class (just like in Java)17:08
and new already has a different meaning...17:09
daniel working on something?17:16
<bonniot>i'd like to get highlight integrated in the documentation generation, to have automatic syntax highlighting17:36
<arjanb>so you are writing a highlighter in nice?17:38
<bonniot>no, it already exists
andr? simon announced it on nice-info
<arjanb>i see but that is written in c++ and only a keyword highlighter17:55
<bonniot>it does not matter what it is written in for this purpose18:03
<arjanb>but how can it be intergrated with doc generation then?18:04
<bonniot>it's not nicedoc18:06
it's generating HTML/PDF/... from the XML sources
<arjanb>i see
* lodewijk joins19:16
<lodewijk>ah, hi! I've got a new problem to pester you with :)
<bonniot>fire up!19:18
<lodewijk>I have a JMenu and I want to add an item to it: file.add(menuItem);
and then the compiler complains:
(it's compiling, I've got enough code that it takes a while :)19:19
Ambiguity for symbol add. Possibilities are :
javax.swing.JMenuItem add(javax.swing.JMenu, ?javax.swing.JMenuItem)
java.awt.Component add(java.awt.Container, Component)
I can sidestep this by making a Component variable, assigning the menu to it and invoking add() on that, but that's not very nice.19:20
<bonniot>did you retyping any method?
<lodewijk>no, not that I know of. this is just in a regular private JMenuBar createMenuBar();19:21
this is with a CVS nice-swing by the way, so maybe there's something inthere come to think of it.
<bonniot>so there are two overloaded versions of ad in Swing19:22
ah ok
and why do you want to call the second method?
do they do different things?
<lodewijk>bonniot: I want to call the first method if at all possible, but I only figured out how to force a call to the second. or should I make my JMenuItem a ?JMenuItem ?19:23
ah, never mind, that was it :)
<bonniot>what did you change?
<lodewijk>bonniot: JMenuItem menuItem into ?JMenuItem menuItem.19:25
<bonniot>the local variable?
<lodewijk>that's strange though, I would expect a JMenuItem to be pluggable where a ?JMenuItem is expected.
bonniot: yes, the local variable.
<bonniot>yes, it should be
now which version of the method is called? can you tell?
<lodewijk>bonniot: I can't tell yet if the only way to tell is to see if it works, because there's a lot more stuff to clear out. this is Java code I'm porting over.19:26
<bonniot>this is a mystery tht should be understood19:27
what's the type of file? JMenu?19:28
<lodewijk>bonniot: yes, a regular JMenu.
so now the snippet is:
?JMenuItem menuItem;19:29
JMenu file = new JMenu("File");
menuItem = new JMenuItem("Open", KeyEvent.VK_O);
where it was a regular JMenuItem menuItem before.
<bonniot>ok, I got it
now the second one is not applicable
because it expects a non-null value19:30
<bonniot>the thing is that one would expect the compiler to chose the first one even in case of ambiguity, since it is more specific
but since the second one is more specific regarding nullness, it does not19:31
does the first one really accept a null menu item?
<lodewijk>it's weird that the first method takes a ?JMenuItem anyway. the API docs don't say anything about passing null being acceptable.
<bonniot>nor that it's unacceptable...19:32
anyway, the compiler is not clever enough yet to read the javadoc comments, understand it, and guess the correct type ;-)
it seems the second one was retyped in Nice-Swing but not the first19:33
<lodewijk>bonniot: no, but the swing source does make it unacceptable to pass a null. the first line is:
AccessibleContext ac = menuItem.getAccessibleContext();
so this should be added to Nice-Swing :-)
then you can go back to your original code19:34
<lodewijk>aha. right. I'll go see if I can get that to work. haven't looked at the nice-swing source much yet.
<bonniot>would you like write access in CVS?
<lodewijk>bonniot: let's first see if I can come up with a sensible patch :)19:35
don't want to go around committing stuff when I'm on day two of doing stuff with Nice
<bonniot>ok, let's see your patch19:36
but that would only touch a library, so it's not ultra-sensitive :-)
<lodewijk>okay, I'll be back when I have something. thanks for the help :)19:37
* lodewijk leaves
* lodewijk joins20:45
is there some way to dump a .class file? the java VM complains about me not having implemented an abstract method and I'd like to see what the nice compiler put inthere..20:49
<arjanb>javap -c 20:50
<lodewijk>ah, thanks.20:51
<bonniot>maybe you declare a new method instead of implementing the existing one?20:52
<arjanb>have you a return type at the implemention of that method?
<lodewijk>it's right, the .class doesn't include the implementation..
public boolean accept(?java.io.File f) {
return notNull(f).toString().endsWith(".cube");
accept(f) { ... }
<lodewijk>doh, I keep forgetting that :(
<arjanb>accept(java.io.File f) {
then you don't need the notNull()20:54
<bonniot>yes, but the method would not be fully implemented
<lodewijk>arjanb: yes, I prepended the ? because I thought that without would produce a method with a different signature.
<arjanb>same signature is simply leaving the argument types away20:56
<bonniot>can accept be called with null?20:57
<lodewijk>whee, that worked. I now have a Swing window with a menu bar (without ugly Component hack after adding stuff to NiceSwing) and a working FileFilter in the open dialog :)
bonniot: no.
<lodewijk>yes, without notNull() now also works.
<bonniot>did you retypine accept?
<arjanb>i did21:00
<lodewijk>bonniot: no, I didn't.
<arjanb>it's in java-io.nice
<lodewijk>no, that's the FileFilter interface, this is the abstract javax.swing.filechooser.FileFilter, retyped in types/swing/java.nice21:01
three cheers for whoever thought that up, and made the two totally unrelated to boot.21:02
bonniot: there's a dcc send for you with the patch21:03
* arjanb leaves21:04
* bonniot leaves
* ChanServ leaves
* ChanServ joins
* bonniot joins
* arjanb joins
<lodewijk>bonniot: there's a dcc send for you with the patch re: jmenu21:05
* arjanb leaves
* bonniot leaves
* ChanServ leaves
* ChanServ joins21:06
* arjanb joins
* bonniot joins
<lodewijk>bonniot: did you get the patch?21:09
info tells me: IP Number:
maybe you have a config pb?
are you behind a router?
<lodewijk>bonnoit: ouch, apparently I have.
<bonniot>you could send by good old email :-)21:10
<lodewijk>bonniot: that's probably better.
it's on its way.21:13
<bonniot>OK, it looks perfect :-)21:17
<lodewijk>shamelessly cut&pasted from Menu and MenuItem, pruned and edited until there were no complaints :)21:18
<bonniot>from awt?
<lodewijk>bonniot: yes. JMenu and Menu aren't actually related, but are somewhat alike.21:19
so what's your SF account? :-)
<lodewijk>just like java.io.FileFilter and javax.swing.filechooser.FileFilter aren't related but somewhat alike. sigh.
bonniot: hah, I don't have one :)21:20
<bonniot>you need it, then!
<lodewijk>bonniot: okay, I'll sign up.
<arjanb>btw daniel have you heard anything from martin recently?21:21
<lodewijk>bonniot: okay, my username is lvoge21:23
some nasty person already took 'lodewijk' >:(
<arjanb>not surprising with so many sf users21:24
<bonniot>is that a common name? (doesn't look like one to _me_ ;-)21:25
<lodewijk>I got harassed on IRC a while ago, some kid claiming I stole his nick! :) I've been on IRC longer than he was alive!
<arjanb>it's a common dutch name21:27
<bonniot>first name?
<lodewijk>there's a french version of the name which I can't think of now..
<lodewijk>no, some king way back when. <..> the sixteenth
<..> quatorze, pardon my french :)21:29
<lodewijk>yes, right.
anyway, I'm going to write some more code. thank you both for your help yet again :)21:30
<bonniot>OK, you're a member
<lodewijk>oh. okay, what does that mean?
<bonniot>that you can commit your changes to swing21:31
you can have a look at http://sourceforge.net/cvs/?group_id=12788
<lodewijk>ah, it's in the My Projects list.21:32
<bonniot>Developer CVS Access via SSH
<lodewijk>bonniot: okay, I'll figure it out and commit.
hmm, apparently it needs some time to sync up the account. I can log into sf.net, but get rejected by cvs.21:33
<arjanb>you need to upload a ssh key for cvs access21:34
<bonniot>unless you type your password each time, no?
<lodewijk>okay, I uploaded my key, that should sync in 10 minutes according to the documentation21:36
anyway, I really must go, see you later :)21:37
* lodewijk leaves

Generated by Sualtam