Enum method overrides and WO bindings

2013-06-07 Thread Musall Maik
Hi, some time ago, I discovered the following problem with Enums and WO bindings (broken down to a simple example): package com.foo.bar; public class MyClass { public static enum Status { one{ @Override public String description() { return eins; } },

Re: Enum method overrides and WO bindings

2013-06-07 Thread Kieran Kelleher
Declare the enum as its own java class file and see if that works: MyClass.java public class MyClass { } Status.java public enum Status { one{ @Override public String description() { return eins; } }, two{ @Override public String description() {

Re: Enum method overrides and WO bindings

2013-06-07 Thread Musall Maik
Hi Kieran, makes no difference. java.lang.IllegalAccessException: Class? com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1 can not access com.foo.bar.Status$1! Maik Am 07.06.2013 um 11:40 schrieb Kieran Kelleher kelleh...@gmail.com: Declare the enum as its own java class file and

Re: Enum method overrides and WO bindings

2013-06-07 Thread D Tim Cummings
Another workaround which is less ugly. public enum Status { one (eins), two (zwei); private final String description; Status(String description) { this.description = description; } public String description() { return description; } } Tim On 07/06/2013, at 5:58 PM, Musall

Re: Enum method overrides and WO bindings

2013-06-07 Thread Musall Maik
Got that already by private mail. All right, let's modify the example. Returning a fixed string was oversimplifying. public enum Status { one { @Override public DateTime computeValue() { new DateTime().plusDays( 1 ); }, two { @Override public DateTime computeValue() { new

Re: Enum method overrides and WO bindings

2013-06-07 Thread D Tim Cummings
public enum Status { one (1), two (2); private final int days; Status(int days) { this.days = days; } public DateTime computeValue() { return new DateTime().plusDays(days); } } On 07/06/2013, at 8:34 PM, Musall Maik wrote: Got that already by private mail. All right,

Re: Enum method overrides and WO bindings

2013-06-07 Thread Bogdan Zlatanov
This should work, hopefully. public enum Status implements NSKeyValueCoding { one { @Override public String description() { return one; }}, two { @Override public String description() { return two; }}; public abstract String description(); @Override public

Re: Enum method overrides and WO bindings

2013-06-07 Thread Musall Maik
Uh, I should have made the implementation more different in the two. In general, the enums I have are more lengthy, and they do all sorts of different stuff to compute something in their methods. They can't share a common implementation, or at least there could be a common one, but the point

Re: Enum method overrides and WO bindings

2013-06-07 Thread Musall Maik
Good one! Although this isn't exactly reducing boilerplate, it shows up a completely different way that actually works. I didn't really think of implementing NSKeyValueCoding in an enum class. I think this is worthwhile at least for long complicated enums where two more methods are ok. Thanks!

Re: Enum method overrides and WO bindings

2013-06-07 Thread D Tim Cummings
Fair enough. Looks like your original workaround is the way to go. I haven't come across a situation where I needed to override methods in enums. Tim On 07/06/2013, at 9:22 PM, Musall Maik wrote: Uh, I should have made the implementation more different in the two. In general, the enums

remote service search widget?

2013-06-07 Thread Jesse Tayler
I'm wondering if anyone has written any components or have experience they'd like to share I'll be searching remote services, like those with certified APIs such as google or foursquare and thought ERMD2WEditToOneTypeAhead seemed like a good component to use. any advice or suggestions?

High Load with Apache/mod_webobjects

2013-06-07 Thread Michael Graupner
Dear List, i found a severe problem with one of our Web Servers: One of the apache processes running mod_webobjects is generating a really high load and the only thing it does is writing useless data into the error log: [error] Error receiving content (expected 25463 bytes, got 0) I googled

Re: High Load with Apache/mod_webobjects

2013-06-07 Thread Chuck Hill
This has been fixed in the Wonder version, use that one. Chuck On 2013-06-07, at 8:22 AM, Michael Graupner wrote: Dear List, i found a severe problem with one of our Web Servers: One of the apache processes running mod_webobjects is generating a really high load and the only thing it

Re: Enum method overrides and WO bindings

2013-06-07 Thread Chuck Hill
This would be my suggestion of how to make this work. Chuck On 2013-06-07, at 4:34 AM, Musall Maik wrote: Good one! Although this isn't exactly reducing boilerplate, it shows up a completely different way that actually works. I didn't really think of implementing NSKeyValueCoding in an

Re: malformed bundle version number in deployment with Java 1.6

2013-06-07 Thread David Holt
That did it! With a restart to the server the version for wotaskd is now 1.6 as well. Thanks very much, David On 2013-06-06, at 4:46 PM, Johnny Miller jlmil...@kahalawai.com wrote: Hi David, See my other email. I forgot to mention that you will need to restart the server after making

Re: Enum method overrides and WO bindings

2013-06-07 Thread Bogdan Zlatanov
If you plan to keep all your enums in one package your only alternative I see is to: 1. Create your own NSKeyValueCoding.ValueAccessor and place it in the same package as your enums. 2. Register your newly created NSKeyValueCoding.ValueAccessor by something like this

Re: malformed bundle version number in deployment with Java 1.6

2013-06-07 Thread Johnny Miller
Cool. Glad I remembered having that problem but I can't remember who the kind soul was that told me how to fix it. Have a nice weekend, Johnny On Jun 7, 2013, at 6:24 AM, David Holt programming...@mac.com wrote: That did it! With a restart to the server the version for wotaskd is now 1.6

Re: malformed bundle version number in deployment with Java 1.6

2013-06-07 Thread David Holt
A quick search on the list reveals: Philippe Rabier pointed me to this solution a few months back - http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x; So thanks, Philippe too :-) On 2013-06-07, at 12:03 PM, Johnny Miller jlmil...@kahalawai.com wrote: Cool.

Re: malformed bundle version number in deployment with Java 1.6

2013-06-07 Thread Philippe Rabier
Yes I wanted to tell you and I was wondering if I didn't right something in the wiki. But as I was traveling from Paris to SF today, I was unable to answer you. Philippe Sent from my iPhone On 7 juin 2013, at 12:14, David Holt programming...@mac.com wrote: A quick search on the list