Re: [EXTERNAL] Latest working Eclipse/WOLips

2021-03-15 Thread Riccardo De Menna via Webobjects-dev
Thank you Maik and Mark,

I probably had some weird combination of an old 2018 eclipse with an out of 
date wolips and corrupted workspace metadata.
I just followed your advice, upgraded to 2020-12, got latest WOLips and 
reimported the whole workspace.
I’ll need to go through some tweaking but it should be fine. Thanks for the 
help.

Riccardo De Menna

> On 5 Mar 2021, at 23:52, Maik Musall  wrote:
> 
> Hi,
> 
> the most up to date info is here: 
> https://wiki.wocommunity.org/display/WOL/Install+WOLips+with+Eclipse+Update+Manager
> 
> which is basically, with Eclipse 2020-09 and newer, use this update site: 
> https://jenkins.wocommunity.org/job/WOLips_master/lastSuccessfulBuild/artifact/temp/dist/
> 
> Maik
> 
> 
>> Am 05.03.2021 um 20:33 schrieb Morris, Mark via Webobjects-dev 
>> :
>> 
>> Hi Riccardo,
>> 
>> I'm using Eclipse 2020-12, but I haven't heard anyone complaining about 
>> issues with the new 2021 release. For either one, you need to make sure to 
>> point to the most recent WOLips. You can find general instructions 
>> (referencing slightly older versions) at: 
>> https://wiki.wocommunity.org/display/WEB/Project+Wonder+Installation
>> 
>> Also, note that this mailing list has been unreliable lately, so there's now 
>> a new, community-maintained list. See the info at: 
>> https://wiki.wocommunity.org/display/WEB/Home
>> 
>> Hope this helps!
>> -- Mark
>> 
>> On 3/5/21, 1:00 PM, "Riccardo De Menna via Webobjects-dev" 
>>  wrote:
>> 
>>Security First: External email, use caution clicking links or opening 
>> attachments
>> 
>>Hi Everyone,
>> 
>>I’ve noticed there’s some recent development on the WO side. 
>>Can someone point me out what eclipse/wolips version currently works with 
>> WO.
>>I have some old WO-based projects that I need to update/maintain but Big 
>> Sur disagrees and is not being helpfull.
>> 
>>Regards,
>>Riccardo De Menna
>> ___
>>Do not post admin requests to the list. They will be ignored.
>>Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>Help/Unsubscribe/Update your Subscription:
>>
>> https://urldefense.com/v3/__https://lists.apple.com/mailman/options/webobjects-dev/mark.morris*40experian.com__;JQ!!MfzFaTml5A!3jsQi_9jmlbhwrmUZWbNOKdTWNbAhqBMgh6WjWcrC3TcD32vJIyiqZHburg4RYFgRDw$
>>  
>> 
>>This email sent to mark.mor...@experian.com
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/maik%40selbstdenker.ag
>> 
>> This email sent to m...@selbstdenker.ag
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Latest working Eclipse/WOLips

2021-03-05 Thread Riccardo De Menna via Webobjects-dev
Hi Everyone,

I’ve noticed there’s some recent development on the WO side. 
Can someone point me out what eclipse/wolips version currently works with WO.
I have some old WO-based projects that I need to update/maintain but Big Sur 
disagrees and is not being helpfull.

Regards,
Riccardo De Menna
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Standalone D2W RuleModeler update?

2020-01-18 Thread Riccardo De Menna via Webobjects-dev
In my case it launches but if you start using it a bit it crashes often.
The errors are mostly index out of bounds on arrays in relationship with 
NSTableView’s calls.

Riccardo De Menna

> On 16 Jan 2020, at 00:33, Jesse Tayler  wrote:
> 
> I’m on Catalina?
> 
> Did I miss?
> 
> Version 1.6.0 (4)
> 
> Is what I’m running and it seems fine, but I’m not sure about bits
> 
> 
> 
>> On Jan 15, 2020, at 2:36 PM, Riccardo De Menna via Webobjects-dev 
>>  wrote:
>> 
>> 
>> 
>>> On 28 Dec 2019, at 16:09, Markus Ruggiero via Webobjects-dev 
>>>  wrote:
>>> 
>>> Is there a new(er) version of the standalone macOS D2W RuleModeler 
>>> available? The version I have is 1.6.0.
>>> 
>>> I looked up the source in WonderSource but this also seems to be 1.6.0. 
>>> Opening the xcodeproj file throws hundreds of issues at me. That is way 
>>> over my head to fix (at leat at the moment).
>>> 
>>> Anyone compiled RuleModeler with a newer version of Xcode? 
>> 
>> Markus, Ted, Mark…
>> 
>> Anyone managed to get a working RuleModeler?
>> Mine exhibits the same out of range errors after the Catalina/64bit upgrade.
>> 
>> Regards,
>> Riccardo De Menna
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
>> 
>> This email sent to jtay...@oeinc.com
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Standalone D2W RuleModeler update?

2020-01-15 Thread Riccardo De Menna via Webobjects-dev


> On 28 Dec 2019, at 16:09, Markus Ruggiero via Webobjects-dev 
>  wrote:
> 
> Is there a new(er) version of the standalone macOS D2W RuleModeler available? 
> The version I have is 1.6.0.
> 
> I looked up the source in WonderSource but this also seems to be 1.6.0. 
> Opening the xcodeproj file throws hundreds of issues at me. That is way over 
> my head to fix (at leat at the moment).
> 
> Anyone compiled RuleModeler with a newer version of Xcode? 

Markus, Ted, Mark…

Anyone managed to get a working RuleModeler?
Mine exhibits the same out of range errors after the Catalina/64bit upgrade.

Regards,
Riccardo De Menna
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


WOLips unable to open source code from stack trace page and Click To Open does not work

2018-10-14 Thread Riccardo De Menna
Hello WOPeople,

I was wondering if someone can spare some insight about an issue I have with my 
IDE.

This is something that has been going on for years, but I never decided to look 
into it until now.

My eclipse has issues in dealing with, ** I think **, locating source code 
files for open projects.

Symptoms:
1. In any stack trace html page, the nice fancy linked methods never work. 
Clicking on the equivalent linked version in my console does work however.
2. All the WOLips framework / Click To Open features don’t work

To test it I created a new empty workspace and then two new empty projects. One 
with the WebObjects Application and the other with the Wonder Application.

The regular WebObject Application does not launch. I haven’t been trying a non 
wonder app since ages so I don’t know if it’s supposed to work out of the box 
or not. I get:
> java.lang.IllegalArgumentException:  Class 
> 'Session' exists (interface org.apache.axis.session.Session) but is not a 
> subclass of WOSession.

Googling I found Chuck suggestion to add the following to my Application class:
> protected Class _sessionClass() {
>   return Session.class;
> }
It got me past the Session issue but into a similar:
> com.webobjects.appserver.WOPageNotFoundException: 
> : Unable to create page 'Main’.
The pageWithName() method can't find the Main class. Is this known or is it 
only me?
This might or might not be connected with my original issue.

I then stopped and tried the Wonder Application. This one works flawlessly 
except for the stack trace issue. I wrote a method just to throw an exception 
and get the page. When I click on the links of the page I get:
> (ERXNSLogLog4jBridge.java:47) [DEBUG] _WOProject: could not find path to 
> source file for com.tuorlo.TestWo.components.Main Main.java

I spent half a day fumbling around the startup code of this app, decompiling 
_WOProject, _NSProjectBundle and _IDEProject but it get’s very confusing and 
eclipse seems a little inconsistent when it comes to breakpoints on the 
decompiled classes.

To test I just installed a fresh Eclipse Oxygen, I have Java 1.8, I’m on High 
Sierra. WebObjects was reinstalled recently. Wonder’s master branch from 
yesterday was freshly compiled from the command line.
My ~/Library/Application Support/WOLips/wolips.properties contains:

> wo.api.root=/Users/rdm/Library/WebObjects/Developer/Documentation/com.apple.ADC_Reference_Library.WebObjectsReference.docset/Contents/Resources/Documents/documentation/InternetWeb/Reference/WO_BundleReference
> wo.apps.root=/Users/rdm/Library/WebObjects/User/Applications
> wo.bootstrapjar=/Users/rdm/Library/WebObjects/System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar
> wo.dir.local.library=/Users/rdm/Library/WebObjects/Library
> wo.dir.local.library.frameworks=/Users/rdm/Library/WebObjects/Library/Frameworks
> wo.dir.reference.api=/Users/rdm/Library/WebObjects/Developer/Documentation/com.apple.ADC_Reference_Library.WebObjectsReference.docset/Contents/Resources/Documents/documentation/InternetWeb/Reference/WO_BundleReference
> wo.dir.system.library=/Users/rdm/Library/WebObjects/System/Library
> wo.dir.system.library.frameworks=/Users/rdm/Library/WebObjects/System/Library/Frameworks
> wo.dir.user.home.library=/Users/rdm/Library/WebObjects/User
> wo.dir.user.home.library.frameworks=/Users/rdm/Library/WebObjects/User/Frameworks
> wo.extensions=/Users/rdm/Library/WebObjects/Library/WebObjects/Extensions
> wo.external.root=/Users/rdm/Library/WebObjects/User/Build
> wo.local.frameworks=/Users/rdm/Library/WebObjects/Library/Frameworks
> wo.local.root=/Users/rdm/Library/WebObjects
> wo.network.frameworks=/Network/Library/Frameworks
> wo.network.root=/Network
> wo.package.root=/Users/rdm/Desktop
> wo.system.frameworks=/Users/rdm/Library/WebObjects/System/Library/Frameworks
> wo.system.root=/Users/rdm/Library/WebObjects/System
> wo.user.frameworks=/Users/rdm/Library/WebObjects/User/Frameworks
> wo.user.root=/Users/rdm
> wo.ws.root=/Library/WebServer/Documents
> wolips.properties=/Users/rdm/Library/WebObjects/WOLips/wolips.properties

What’s wrong with my IDE?
Can someone point out new roads to follow to figure out what might be 
incorrectly setup?

regards,
Riccardo

 
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


ERProfiling with Java8? Any working solution?

2017-11-21 Thread Riccardo De Menna
Hi all,

I’m having problems running ERProfiling with Java8. Does anyone know a way to 
have it work?

rdm 
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Tip request: How to avoid coercing twice in NSValidation

2017-05-23 Thread Riccardo De Menna
Hi all,

I have a request for tips on how to properly perform a task…

Whenever I have to deal with database fields that contain passwords I generally 
use some sort of ‘digest’ as early as possible and then only store and compare 
the digested data. I’d like to apply this digest in the validateValueForKey 
method of my EOGenericRecord subclass, coercing the value, but I’m having 
problems because validateValueForKey gets called twice, first at component 
validation level and then when things are actually saved (I think it’s called 
by validateTakeValueForKeyPath  first and validateForSave later right?).

Result: My digest algorithm is applied twice and this obviously messes up with 
the whole thing.

What should I do to avoid this?

One idea would be to intercept component validation on 
validateTakeValueForKeyPath and skip coercion there. Or skip it later on the 
validateForSave.

What would be the right way? Also… is it somehow guaranteed that validation 
happens twice? Could it happen three times? More? If so, my idea would not work.

What do you think?

Riccardo
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Return current page with direct actions

2016-10-08 Thread Riccardo De Menna

> On 08 Oct 2016, at 00:58, Ramsey Gurley <rgur...@smarthealth.com> wrote:
> 
> On the previous page that triggers the direct action, add the context id.
> 
> 
>?ctxKey=$context.contextID/>
> 
> 
> Then in the direct action
> 
> String cid = context().request().stringFormValueForKey(“ctxKey”);
> if(cid != null) return session().restorePageForContextID(cid);

Yesss Ramsey,
Works perfectly.

Google is now happy to see direct actions with language parameters everywhere 
instead of a component jump into the void.

Thank you so much,
Riccardo

> 
> 
> 
> On Oct 7, 2016, at 3:38 PM, Riccardo De Menna <deme...@tuorlo.net> wrote:
> 
>> 
>>> On 08 Oct 2016, at 00:11, Paul Hoadley <pa...@logicsquad.net> wrote:
>>> On 8 Oct 2016, at 8:10 AM, Riccardo De Menna <deme...@tuorlo.net> wrote:
>>>> With component actions I simply return null but how do I return the 
>>>> current page with direct actions?
>>> You should have access to context().page(). Does that achieve what you want?
>> 
>> I get a null page with that…
>> 
>> 
>> My direct action scenario is like the following...
>> 
>> public WOActionResults performActionNamed(String anActionName) {
>>   languageSetup();
>>   return super.performActionNamed(anActionName);
>> }
>> 
>> public void languageSetup() {
>>   Session s = session();
>>   if ( s != null ) {
>>   s.takeLanguageFromRequest(request()); // Method that looks for 
>> language parameters in different ways (URL, Cookies, Browser, 
>> Geolocalization ecc)
>>   }
>> }
>> 
>> public WOActionResults languageAction() {
>>   return context().page();
>> }
>> 
>> Is there anything wrong in this setup?
>> 
>> regards,
>> Riccardo
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>> 
>> This email sent to rgur...@smarthealth.com
> 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Return current page with direct actions

2016-10-07 Thread Riccardo De Menna

> On 08 Oct 2016, at 00:11, Paul Hoadley <pa...@logicsquad.net> wrote:
> On 8 Oct 2016, at 8:10 AM, Riccardo De Menna <deme...@tuorlo.net> wrote:
>> With component actions I simply return null but how do I return the current 
>> page with direct actions?
> You should have access to context().page(). Does that achieve what you want?

I get a null page with that…


My direct action scenario is like the following...

public WOActionResults performActionNamed(String anActionName) {
languageSetup();
return super.performActionNamed(anActionName);
}

public void languageSetup() {
Session s = session();
if ( s != null ) {
s.takeLanguageFromRequest(request()); // Method that looks for language 
parameters in different ways (URL, Cookies, Browser, Geolocalization ecc)
}
}

public WOActionResults languageAction() {
return context().page();
}

Is there anything wrong in this setup?

regards,
Riccardo


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Return current page with direct actions

2016-10-07 Thread Riccardo De Menna
Hi Everyone,

I have a question that I hope has a trivial answer.
I want to implement a simple language switch via direct actions but I don’t 
want the user to be returned to the default page of the website but rather stay 
where they are.
With component actions I simply return null but how do I return the current 
page with direct actions?

Thank you,
Riccardo


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ERRest skipping my NSDictionary

2014-10-10 Thread Riccardo De Menna
Anyone on this?

On 09/ott/2014, at 15:52, Riccardo De Menna deme...@tuorlo.net wrote:

 Hi all,
 
 This is an ERRest specific question.
 
 I have an iOS - WebObjects/ERRest setup regularly working.
 One of the entities on both sides has an attribute that returns an 
 NSDictionary.
 The problem is that when I try to update this attribute from the iOS side 
 into the WO side, it is silently skipped and left empty.
 
 The iOS side JSON-serializes everything before posting the Rest requests… as 
 a result, the dictionary attribute shows in the JSON output, very similar to 
 a relationship child node.
 
 I could be saying something stupid here so please don’t be too harsh…
 
 The thing is, together with any primitive type, I was assuming that the 
 Map/Dictionary kind was among the things I could “obviously” send.
 Now I’m not so sure… could anybody shed some light on this, since I could be 
 banging my head under the wrong tree?
 
 In other words… Can I send a Map/Dictionary type object inside my JSON 
 request and hope that WO/ERRest will catch that it is NOT a relationship to 
 other nodes, but simply a plain old dictionary and call my entity setter or 
 am I simply confusing ERRest?
 
 BTW, not sure if it means anything, but the attribute is actually a class 
 method and not a real model attribute since the dictionary needs to be 
 processed. Could that be the issue?
 
 Please help,
 Riccardo De Menna
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/demenna%40tuorlo.net
 
 This email sent to deme...@tuorlo.net


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ERRest skipping my NSDictionary

2014-10-10 Thread Riccardo De Menna
Hi Amedeo,

Thanks for the answer.

How would you pass a dictionary then? I mean what’s the best course of action?
Serializing it somehow into a non JSON, non Plist primitive type seems weird.
Could I maybe just escape it’s JSON representation?
Is there a way to force ERRest to interpret a specific property as an attribute 
and not a relationship?

Thank you,
Riccardo

On 10/ott/2014, at 23:58, Amedeo Mantica amedeomant...@me.com wrote:

 
 
 Sent from my iPhone
 
 On 10/ott/2014, at 23:45, Riccardo De Menna deme...@tuorlo.net wrote:
 
 Anyone on this?
 
 On 09/ott/2014, at 15:52, Riccardo De Menna deme...@tuorlo.net wrote:
 
 Hi all,
 
 This is an ERRest specific question.
 
 I have an iOS - WebObjects/ERRest setup regularly working.
 One of the entities on both sides has an attribute that returns an 
 NSDictionary.
 The problem is that when I try to update this attribute from the iOS side 
 into the WO side, it is silently skipped and left empty.
 
 The iOS side JSON-serializes everything before posting the Rest requests… 
 as a result, the dictionary attribute shows in the JSON output, very 
 similar to a relationship child node.
 
 I could be saying something stupid here so please don’t be too harsh…
 
 The thing is, together with any primitive type, I was assuming that the 
 Map/Dictionary kind was among the things I could “obviously” send.
 Now I’m not so sure… could anybody shed some light on this, since I could 
 be banging my head under the wrong tree?
 
 In other words… Can I send a Map/Dictionary type object inside my JSON 
 request and hope that WO/ERRest will catch that it is NOT a relationship to 
 other nodes, but simply a plain old dictionary and call my entity setter or 
 am I simply confusing ERRest?
 
 
 Yes
 
 BTW, not sure if it means anything, but the attribute is actually a class 
 method and not a real model attribute since the dictionary needs to be 
 processed. Could that be the issue?
 
 Please help,
 Riccardo De Menna
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/demenna%40tuorlo.net
 
 This email sent to deme...@tuorlo.net
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/amedeomantica%40me.com
 
 This email sent to amedeomant...@me.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ERRest skipping my NSDictionary

2014-10-10 Thread Riccardo De Menna
Hi Philippe,

The filters seem ok to me… I’ve stepped through the ERRest code and it does 
match them. (BTW in this particular case the filter explicitly includes that 
property).
The thing is that after matching it, it looks for a relationship property or a 
primitive one.
Since the dictionary is neither, it discards the value.

Let me post some code…

I have a “location” property that holds geographic data (very similar to iOS’s 
CLPlacemark and CLLocation).
I need to move this data back and forth between server and client, where it 
will be “rebuilt” into a CLLocation object.

Since the “location” property is not primitive, I’ve excluded that one from the 
filter and instead included a custom “locationDictionary”.

Something like the following…

public NSDictionaryString,Object locationDictionary() {
return location() != null ? location().toPlistDictionary() : null;
}

public void setLocationDictionary(NSDictionaryString,Object dictionary) {
setLocation(TLocation.fromPlistDictionary(dictionary));
} 

When I try to update the record on the server posting from the client, the 
location remains null.

I was hoping that ERRest would detect that there is NO “locationDictionary” 
relationship and simply KVC post it to my EO.

Maybe I’m just assuming something wrong… but what’s the best way to move 
dictionary attributes then?

Thank you all in advance,
Riccardo

On 10/ott/2014, at 23:59, Philippe Rabier prab...@icloud.com wrote:

 Hi Riccardo
 
 Did you think to create an alias and use it in your filter? And didn't you 
 forget to add a filter that includes all the keys when you built your write 
 filter?
 
 Otherwise all map content is excluded if you just add the key/alias of your 
 map attribute without using the method which takes a key and a filter as 
 parameters.  
 
 Philippe Rabier
 -
 http://twitter.com/prabier
 
 Sent from my iPhone
 Philippe Rabier
 -
 http://twitter.com/prabier
 
 Sent from my iPhone
 
 
 Anyone on this?
 
 On 09/ott/2014, at 15:52, Riccardo De Menna deme...@tuorlo.net wrote:
 
 Hi all,
 
 This is an ERRest specific question.
 
 I have an iOS - WebObjects/ERRest setup regularly working.
 One of the entities on both sides has an attribute that returns an 
 NSDictionary.
 The problem is that when I try to update this attribute from the iOS side 
 into the WO side, it is silently skipped and left empty.
 
 The iOS side JSON-serializes everything before posting the Rest requests… 
 as a result, the dictionary attribute shows in the JSON output, very 
 similar to a relationship child node.
 
 I could be saying something stupid here so please don’t be too harsh…
 
 The thing is, together with any primitive type, I was assuming that the 
 Map/Dictionary kind was among the things I could “obviously” send.
 Now I’m not so sure… could anybody shed some light on this, since I could 
 be banging my head under the wrong tree?
 
 In other words… Can I send a Map/Dictionary type object inside my JSON 
 request and hope that WO/ERRest will catch that it is NOT a relationship to 
 other nodes, but simply a plain old dictionary and call my entity setter or 
 am I simply confusing ERRest?
 
 BTW, not sure if it means anything, but the attribute is actually a class 
 method and not a real model attribute since the dictionary needs to be 
 processed. Could that be the issue?
 
 Please help,
 Riccardo De Menna
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/demenna%40tuorlo.net
 
 This email sent to deme...@tuorlo.net
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/prabier%40icloud.com
 
 This email sent to prab...@icloud.com
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/demenna%40tuorlo.net
 
 This email sent to deme...@tuorlo.net


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

ERRest skipping my NSDictionary

2014-10-09 Thread Riccardo De Menna
Hi all,

This is an ERRest specific question.

I have an iOS - WebObjects/ERRest setup regularly working.
One of the entities on both sides has an attribute that returns an NSDictionary.
The problem is that when I try to update this attribute from the iOS side into 
the WO side, it is silently skipped and left empty.

The iOS side JSON-serializes everything before posting the Rest requests… as a 
result, the dictionary attribute shows in the JSON output, very similar to a 
relationship child node.

I could be saying something stupid here so please don’t be too harsh…

The thing is, together with any primitive type, I was assuming that the 
Map/Dictionary kind was among the things I could “obviously” send.
Now I’m not so sure… could anybody shed some light on this, since I could be 
banging my head under the wrong tree?

In other words… Can I send a Map/Dictionary type object inside my JSON request 
and hope that WO/ERRest will catch that it is NOT a relationship to other 
nodes, but simply a plain old dictionary and call my entity setter or am I 
simply confusing ERRest?

BTW, not sure if it means anything, but the attribute is actually a class 
method and not a real model attribute since the dictionary needs to be 
processed. Could that be the issue?

Please help,
Riccardo De Menna
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

REST + Subclassing NSIncrementalStore on iOS

2014-01-16 Thread Riccardo De Menna
Hi Everybody,

I know it’s a slightly off-topic question, but I think this community is 
probably the only one that REALLY knows about this stuff. I’m currently working 
on a client-server alas ios-webobjects application and I’m going the REST route 
(hihi). The server side is a rock (btw Mike et all… that’s a marvelous piece of 
work)… perfectly under control, routes, security, headers, cookies… it’s 
perfect.

So down to the client… 
I have a partial implementation that does some fetch and retrieve, serializing 
and deserializing the incoming dictionaries from the server. But I’m not really 
satisfied with it because it’s all done my hardcoding calls and queries. So, 
looking for a new angle, I tweaked my local objects into subclasses of 
NSManagedObject and pushed CoreData inside the loop.

What I want to do is to subclass NSIncrementalStore with a in-memory version of 
mine that basically acts as an adaptor to my REST service on the other side.
I’ve also found a few hints on the web about other people trying this.

What do you think? Is it doable? Is it easy? Has it already been done by 
someone I can steal from? ;-)

Thank you in advance,
Riccardo De Menna
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How do I configure an EOModel's connection info if it comes from a framework

2013-10-03 Thread Riccardo De Menna
Thanks to all guys,

I'll go the properties way ;-)

regards,
Riccardo De Menna

On 03/ott/2013, at 06:50, Klaus Berkling webobje...@berkling.us wrote:

 
 On Oct 2, 2013, at 3:04 PM, Riccardo De Menna deme...@tuorlo.net wrote:
 
 I have a question regarding how to configure an EOModel. The model is 
 complete with connection info, db driver setup and so on and it works fine.
 How should I behave if I wanted it to be more of an abstract thing and stick 
 it into a framework so that different apps can include it, but replace their 
 specific connection info that is relevant to them only?
 
 
 
 The Property files are your friend. :-)
 
 I have two apps, admin front-end and user front-end. Both apps use the same 
 EOModel framework.
 All the connection information is in the property file from each of the apps. 
 Since each app runs on different servers the connection information can be 
 different (e.g. localhost vs db.something.com, or different db usernames)
 In addition I use Properties.username in my development environments (work 
  home).
 You can also add the connection information to the command line arguments in 
 JavaMonitor, which is what I do on my test server.
 
 
 kib
 
 Klaus Berkling
 www.berkling.us | @kiberkli
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/demenna%40tuorlo.net
 
 This email sent to deme...@tuorlo.net


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

How do I configure an EOModel's connection info if it comes from a framework

2013-10-02 Thread Riccardo De Menna
Hi All,

I have a question regarding how to configure an EOModel. The model is complete 
with connection info, db driver setup and so on and it works fine.
How should I behave if I wanted it to be more of an abstract thing and stick it 
into a framework so that different apps can include it, but replace their 
specific connection info that is relevant to them only?

Putting the model in the framework seems straightforward, but when I run the 
app, the model uses the connection info it finds in the framework copy of 
itself .

I clumsily attempted to duplicate the model in the app, and it does seem to 
replace the original model in the framework while editing (allowing me to enter 
custom connection details), but at runtime, it still picks up the original one.

Am I missing an obvious way of doing this?

regards,
Riccardo
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How do I configure an EOModel's connection info if it comes from a framework

2013-10-02 Thread Riccardo De Menna
Yes... Wonder is in place.

Riccardo De Menna

 On 03/ott/2013, at 00:18, Chuck Hill ch...@global-village.net wrote:
 
 Are you using Project Wonder?  If not, start.  It provides all of this for
 free.  E.g. there is a property for that
 
 Chuck
 
 
 On 2013-10-02 3:04 PM, Riccardo De Menna deme...@tuorlo.net wrote:
 
 Hi All,
 
 I have a question regarding how to configure an EOModel. The model is
 complete with connection info, db driver setup and so on and it works
 fine.
 How should I behave if I wanted it to be more of an abstract thing and
 stick it into a framework so that different apps can include it, but
 replace their specific connection info that is relevant to them only?
 
 Putting the model in the framework seems straightforward, but when I run
 the app, the model uses the connection info it finds in the framework
 copy of itself .
 
 I clumsily attempted to duplicate the model in the app, and it does seem
 to replace the original model in the framework while editing (allowing me
 to enter custom connection details), but at runtime, it still picks up
 the original one.
 
 Am I missing an obvious way of doing this?
 
 regards,
 Riccardo
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-vill
 age.net
 
 This email sent to ch...@global-village.net
 
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ERMailDeliveryHTML + Localization ?!?!

2012-10-26 Thread Riccardo De Menna
Hi Kieran,

As you suggested I went a little deeper and found the problem.

I'm often faced with the need to send a quick email from my code while building 
a response page for the user. For example, in this case, the admin user of the 
website has a button to reset regular user passwords and the system 
automatically sends an email with the new password to them.
If I build the ERMailDeliveryHTML passing my current context to it, it messes 
up the context that, I assume, expects to work on the admin response page 
rather than the email. I usually build the page with something like:

ERMailDeliveryHTML mail = new ERMailDeliveryHTML( ERXWOContext.newContext() );

This would give me a fresh new context suitable for the email while leaving the 
regular one building the page response untouched.
Problem is that, by doing this, this new context does not seem to pick up the 
localizer because it probably has no track of the session.

The solution that works for me is to create the email passing a clone of the 
current context as in:

ERXWOContext regularContext = 
(ERXWOContext)ERXThreadStorage.valueForKey(ERXWOContext.CONTEXT_KEY);
ERXWOContextnewContext = (ERXWOContext)context.clone();
ERMailDeliveryHTML mail = new ERMailDeliveryHTML( newContext );

Don't know if this is the advisable course of action. Hope this helps someone,

Regards,
Riccardo

On 24/ott/2012, at 19:26, Kieran Kelleher kelleh...@gmail.com wrote:

 ERMailDeliveryHTML content is WOComponent-based, so assuming you are using 
 localized string elements, why not try debugging what's going on with getting 
 the current localizer in 
 er.extensions.localization.ERXLocalizer.currentLocalizer()  if you are 
 generating emails in a background thread you may need to stuff the 
 appropriate localizer into ERXThreadStorage or sth like that.
 
 
 On Oct 24, 2012, at 7:06 AM, Riccardo De Menna deme...@tuorlo.net wrote:
 
 Hi all,
 
 I'm delivering a standard password reset email using ERMailDeliveryHTML. It 
 works perfectly but my client has asked me to localize the website in 
 multiple languages and, I don't know why, but ERMailDeliveryHTML does not 
 seem to pickup the different .lprj folders in the components directory. 
 Setting the localizer to a different language has no effect and the email is 
 always sent in english.
 
 I'm not even sure ERMailDeliveryHTML does support localization. Anyone knows 
 more about it?
 
 Thank you,
 Riccardo De Menna
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
 
 This email sent to kelleh...@gmail.com
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


ERMailDeliveryHTML + Localization ?!?!

2012-10-24 Thread Riccardo De Menna
Hi all,

I'm delivering a standard password reset email using ERMailDeliveryHTML. It 
works perfectly but my client has asked me to localize the website in multiple 
languages and, I don't know why, but ERMailDeliveryHTML does not seem to pickup 
the different .lprj folders in the components directory. Setting the localizer 
to a different language has no effect and the email is always sent in english.

I'm not even sure ERMailDeliveryHTML does support localization. Anyone knows 
more about it?

Thank you,
Riccardo De Menna
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How do I change the classpath order?

2012-10-18 Thread Riccardo De Menna
Hi Paul, Hi Michael,

Sorry for the late reply but I was abroad and have just come back. So…
Yes I'm using a regular ant build from eclipse. Right-clicking on the project 
and selecting Install.

This is my app build order in eclipse:
http://hati.tuorlo.net/ClasspathIssue/ApplicationBuildOrder.png

This is my framework build order in eclipse:
http://hati.tuorlo.net/ClasspathIssue/FrameworkBuildOrder.png

This is my build.xml file:
http://hati.tuorlo.net/ClasspathIssue/build.xml
(You can ignore the rsync parts I've added)

And this is the resulting classpath file I get when I install:
http://hati.tuorlo.net/ClasspathIssue/UNIXClassPath.txt

As you can see… the build order has TFramework as the first thing, but the 
classpath only has it down after the ERJavaMail.framework.

Is this a misbehavior? Should the ant-built classpath conform to the eclipse 
build order?

regards,
Riccardo

On 10/ott/2012, at 23:44, Paul Hoadley pa...@logicsquad.net wrote:

 Hi Riccardo,
 
 On 10/10/2012, at 6:00 PM, Riccardo De Menna wrote:
 
 The order I define in WOLips works fine in development but not in deployment 
 where I get a totally different setup.
 Manually updating the classpath file every time I redeploy is not an option 
 and is prone to a lot of errors.
 There must be a way to act on the deployed classpath file?!?
 
 How are you building for deployment?  Standard Ant build scripts?
 
 
 -- 
 Paul Hoadley
 http://logicsquad.net/
 
 
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How do I change the classpath order?

2012-10-10 Thread Riccardo De Menna
Hi Paul,

The order I define in WOLips works fine in development but not in deployment 
where I get a totally different setup.
Manually updating the classpath file every time I redeploy is not an option and 
is prone to a lot of errors.
There must be a way to act on the deployed classpath file?!?

rdm

On 10/ott/2012, at 00:39, Paul Hoadley pa...@logicsquad.net wrote:

 Hi Riccardo,
 
 On 05/10/2012, at 3:20 AM, Riccardo De Menna wrote:
 
 Question… How do I change the order of the entires in the generated 
 classpath files on deployment?
 I have a class that patches one from Wonder to add some functionality. It 
 works fine locally but when I deploy, the generated classpath file puts 
 ERXExtensions above my framework. I can see that ERXExtension.jar and 
 Ajax.jar are the first ones so I assume that the order is not random but it 
 does not look like it's following my eclipse order. Is there a way to act on 
 it?
 
 The .classpath file in your project's root should handle this.  You can edit 
 it manually, or use WOLips:
 
 [Project]  Build Path  Configure Build Path...  Order and Export
 
 
 -- 
 Paul Hoadley
 http://logicsquad.net/
 
 
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How do I change the classpath order?

2012-10-09 Thread Riccardo De Menna
Nobody for this one? Where should I look? I just need my framework to be listed 
above ERXExtension.

rdm

On 04/ott/2012, at 19:50, Riccardo De Menna deme...@tuorlo.net wrote:

 Hi all,
 
 Question… How do I change the order of the entires in the generated classpath 
 files on deployment?
 I have a class that patches one from Wonder to add some functionality. It 
 works fine locally but when I deploy, the generated classpath file puts 
 ERXExtensions above my framework. I can see that ERXExtension.jar and 
 Ajax.jar are the first ones so I assume that the order is not random but it 
 does not look like it's following my eclipse order. Is there a way to act on 
 it?
 
 As a side note to all wonder dev's… Use more protected and less private. It's 
 a nightmare to subclass sometimes ;-)
 
 regards,
 Riccardo
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/demenna%40tuorlo.net
 
 This email sent to deme...@tuorlo.net


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

How do I change the classpath order?

2012-10-04 Thread Riccardo De Menna
Hi all,

Question… How do I change the order of the entires in the generated classpath 
files on deployment?
I have a class that patches one from Wonder to add some functionality. It works 
fine locally but when I deploy, the generated classpath file puts ERXExtensions 
above my framework. I can see that ERXExtension.jar and Ajax.jar are the first 
ones so I assume that the order is not random but it does not look like it's 
following my eclipse order. Is there a way to act on it?

As a side note to all wonder dev's… Use more protected and less private. It's a 
nightmare to subclass sometimes ;-)

regards,
Riccardo
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

WebObjects + ERRest + iOS + CoreData (Yes another post on this)

2012-05-22 Thread Riccardo De Menna
Hi all,

I'm writing an iOS app that will fetch data from an ERRest-based-WOApp. I want 
it to use CoreData on the iOS side and be as integrated as I can get it.
The whole ERRest thing seems really built to that end and the CoreData stack is 
obviously an EO spin-off, but I did not find around some design guidelines to 
help me identify a correct course of action.

In particular the very interesting WWDC2010 Session 117 - Building a 
Server-driven User Experience, clearly identifies key points to follow, but I 
was not able to find any sample code to show the details of that design. I'm 
talking mostly about the iOS side as WO+ERRest basically do everything for me 
on the server side.

Anyway, I'm building something based on those slides… so…

On my WO side:

I have an ERRest based app with a custom authentication system that allows for 
a login/logout/check action. These are simple DirectActions but with correct 
HTTP response codes, and they return the sessionID on success. The client app 
should store it in a cookie or provide it on any URL request, it doesn't matter.
Various entity controllers that provide data in json/plist/xml/whatever with 
the added option to request only certain keys on show to minimize traffic if 
needed (my showFilter is limited to certain values server-side but the 
remaining ones can be on-demand so that, if I only need Person.firstName for 
9000 records, I don't have to fetch unnecessary data.

On my iOS side I have:

A category that extends NSManagedObjectContext and provides:
  - (NSManagedObject *)localInstanceOfObject:(NSManagedObject *)iObject;

A category that extends NSEntityDescription and provides:
  - (NSString *)route;
  - (BOOL)allowsFetch;
  - (BOOL)allowsInsert;
  - (BOOL)allowsUpdate;
  - (BOOL)allowsDelete;

A category that extends NSManagedObject and provides:
  - (NSManagedObject *)localInstanceInContext:(NSManagedObjectContext *)context;
  - (NSDictionary *)toDictionary;

A category that extends NSFetchRequest and provides:
  Incomplete… but would simply add a method that includes on optional endpoint 
for the fetch, as well as the qualifiers and sortorderings I want to pass to 
the server.

A subclass of NSManagedObjectContext with overrides for:
  - (NSArray *)executeFetchRequest:(NSFetchRequest *)request error:(NSError 
**)error;
  - (BOOL)save:(NSError **)error;

A subclass of NSManagedObject that provides a:
  @property (nonatomic, strong) NSString *endpoint;

A model that mimics the EO-counterpart, only with wy less attributes.

A subclass of my custom NSManagedObject for each entity

This, I hope, is roughly what that session was suggesting and I can see it 
would work nicely.
I'm trying to figure out how to implement the background operations that are to 
be performed by the two NSManagedObjectContext overrides. My idea is that the 
app just fetches on my CoreData stack and gets whatever data we already have 
persistently saved previously. But the fetch also initiates a server side check 
that eventually results in objects being updated in the UI. This has to be 
asynchronous on a custom RunLoop/thread and silently inform the various 
NSManagedObjectContexts that data has been updated from the server.

Has anyone gone down this road? I'd love to look at some code samples, ideas or 
design guidelines. Anything really ;-) 

regards,
Riccardo






 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Insight request into jstack output on constant eclipse hangs

2011-09-17 Thread Riccardo De Menna

On 17/set/2011, at 02:27, Paul Yu wrote:

 BTW Q, and Mike, we really appreciate your work on moving the tools forward…

Agree and thx for the deadlock pointer…

rdm

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Entity Modeler and java.io.Serialization

2011-08-11 Thread Riccardo De Menna
Hi there,

Is there a way to force the db adaptor to serialize and deserialize objects 
using java.io.Serializable?
To put it in other words, is there an easy way to serialize simple java objects 
without the need to write customized code?

For example, I was tweaking some of my prototypes and I just realized that it 
would be very useful to have an inetAddress prototype for all ip/host 
addresses. The class for it is java.net.InetAddress and it obviously already 
implements Serializable. Can I leverage that in entity modeler to save and 
restore those objects to blobs without having to write a serialization utility?

Also, why is the class field always disabled in entity modeler when the 
value class is visible? If there is no automatic way to deserializae using 
Serializable, then I was thinking of writing a custom serialization class.
I though I could use the class field to point to my deserialization class, 
the value class field to tell the system what to expect as a final output, 
and the value type field to help my class decide how to deserialize. But 
the class field is always grayed out and disabled and I can't find any 
documentation on how I would have to write my code.

Comments appreciated…

Riccardo ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Where's the Add Entry button for the userInfo dictionary ?

2011-02-27 Thread Riccardo De Menna
Hi Guys,

Just a quick one. I have coded some custom behaviors in my personal 
EOGenericRecord subclass and I have them take action based on the userInfo 
dictionary in the model.
For instance I have that convenient keywords like unique, encrypt or 
sequential trigger different behaviors on the various augmented transaction 
and validation methods.
I've been using this thing since a while but I was never able to add entries to 
the userInfo panel inside eclipse via the entity modeler panels. I'm always in 
a hurry and I simply open the model with a text editor and type in the value I 
need. But hey, there MUST be a way to do it in eclipse. Editing is fine... 
adding is what I can't figure out.
I'm sure I will regret asking as someone will point out there's an obvious 
gigantic red glowing button named ADD ENTRY that's pulsating in front of my 
eyes... I'll take my chances :-)

Riccardo De Menna

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Where's the Add Entry button for the userInfo dictionary ?

2011-02-27 Thread Riccardo De Menna
Thank you Dave, works like a charm...

Now please don't laugh at me... but... now that I did press return and got my 
key. What if I want to delete it? :-)
Did try the delete key with no success. Don't see any delete entry in the 
buttons or the menus.

Shock me again...

rdm

On 27/feb/2011, at 11.26, David Avendasora wrote:

 Hi Riccardo,
 
 Select the key you want to add a new child key for, then press the 
 Return/Enter key on your keyboard.
 
 Not the most intuitive, but it works.
 
 Dave
 
 On Feb 27, 2011, at 4:57 AM, Riccardo De Menna wrote:
 
 Hi Guys,
 
 Just a quick one. I have coded some custom behaviors in my personal 
 EOGenericRecord subclass and I have them take action based on the userInfo 
 dictionary in the model.
 For instance I have that convenient keywords like unique, encrypt or 
 sequential trigger different behaviors on the various augmented 
 transaction and validation methods.
 I've been using this thing since a while but I was never able to add entries 
 to the userInfo panel inside eclipse via the entity modeler panels. I'm 
 always in a hurry and I simply open the model with a text editor and type in 
 the value I need. But hey, there MUST be a way to do it in eclipse. Editing 
 is fine... adding is what I can't figure out.
 I'm sure I will regret asking as someone will point out there's an obvious 
 gigantic red glowing button named ADD ENTRY that's pulsating in front of 
 my eyes... I'll take my chances :-)
 
 Riccardo De Menna
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Where's the Add Entry button for the userInfo dictionary ?

2011-02-27 Thread Riccardo De Menna
On 27/feb/2011, at 18.00, Chuck Hill wrote:

 Backspace.  :-)

Liar !!! Does not work !!! :-)

Seriously... should it remove the entries? Does not work here. I'm on a laptop 
so I don't have a forward delete button to try but the backspace does nothing.

rdm

 
 On Feb 27, 2011, at 7:30 AM, Riccardo De Menna wrote:
 
 Thank you Dave, works like a charm...
 
 Now please don't laugh at me... but... now that I did press return and got 
 my key. What if I want to delete it? :-)
 Did try the delete key with no success. Don't see any delete entry in the 
 buttons or the menus.
 
 Shock me again...
 
 rdm
 
 On 27/feb/2011, at 11.26, David Avendasora wrote:
 
 Hi Riccardo,
 
 Select the key you want to add a new child key for, then press the 
 Return/Enter key on your keyboard.
 
 Not the most intuitive, but it works.
 
 Dave
 
 On Feb 27, 2011, at 4:57 AM, Riccardo De Menna wrote:
 
 Hi Guys,
 
 Just a quick one. I have coded some custom behaviors in my personal 
 EOGenericRecord subclass and I have them take action based on the userInfo 
 dictionary in the model.
 For instance I have that convenient keywords like unique, encrypt or 
 sequential trigger different behaviors on the various augmented 
 transaction and validation methods.
 I've been using this thing since a while but I was never able to add 
 entries to the userInfo panel inside eclipse via the entity modeler 
 panels. I'm always in a hurry and I simply open the model with a text 
 editor and type in the value I need. But hey, there MUST be a way to do it 
 in eclipse. Editing is fine... adding is what I can't figure out.
 I'm sure I will regret asking as someone will point out there's an obvious 
 gigantic red glowing button named ADD ENTRY that's pulsating in front of 
 my eyes... I'll take my chances :-)
 
 Riccardo De Menna
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Where's the Add Entry button for the userInfo dictionary ?

2011-02-27 Thread Riccardo De Menna
 Backspace.  :-)
 
 Liar !!! Does not work !!! :-)
 
 Seriously... should it remove the entries? Does not work here. I'm on a 
 laptop so I don't have a forward delete button to try but the backspace does 
 nothing.
 
 fn (function) Delete on a laptop

Thank you guys,

Works fine and It's always nice to get help on this list,
I'll now go on and add a million entries to my userInfo dictionaries :-)

Cheers,
rdm ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Inline Task into Task component extravaganza

2010-01-20 Thread Riccardo De Menna
Hi all,

A D2W related question...

I want a component that allows me to edit a record and also edit another one 
through a relationship. An InlineEditRelationship thing. I want it because I 
often have correlation tables in to-many relationships that only hold a few 
fields and it's too confusing for the user to force them to jump and edit 
another record all together. To the average user, fields of a correlation table 
are often viewed as data of one or the other side of the relationship.

Let's say we have a Movie  Correlation  Actor scenario. And we need to keep 
track of what was the name of the character the actor played in a movie (or his 
salary or anything related only to that movie). I want to build an EditMovie 
page that allows me to select the actors that participated to the movie via a 
very simple and straightforward popup menu and every time I add a new actor I 
get also a single field for the character name to appear directly inline in the 
ui. No faults... I'm assuming the actor list is a short one.

Now my question... how should I do this? I thought about two examples.

Example one:

I build a D2W component that edits a relationship by basically sticking a 
InspectRepetition in it (obviously in a compact short form). When I try to do 
this I constantly fight against the fact that the D2WContext is setup to edit 
another entity. So I thought I could build a subcontext by cloning the 
current one and setting it to edit the other entity and pass this via the 
d2wcontext binding of the repetition component. Would it work or am I going to 
face a million problems? Forms into forms being the first I can think of.

Example two:

I generate a totally different EditPage via the D2WFactory methods and stick it 
in my parent component via WOSwitchComponents. This also basically does what 
I'm doing in example one since the newly created page will have it's own 
D2WContext.

Or is there a simpler way? I tried just sticking embedded components without 
touching the d2wContext by simply binding everything I could think of 
(d2wContext, datasource, object, keys for the relationships... everything) but 
I constantly run into something that get's pulled out of the d2wcontext instead 
of the bindings and messes everything up.

I'm in a wonder enabled scenario so I can use anything there as well. I saw 
Ravi does something similar in one of his tutorials but it's a single field. I 
want a full fledged edit-in-edit thing. Will I be fighting windmills by trying?

Any opinion is welcome and btw, happy start of year to everyone,
Riccardo







 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Qualifier through relationship

2009-12-03 Thread Riccardo De Menna
Hi,

How do I build a fetch specification that qualifies objects based on the 
content of relationship and not an attribute?

In other words let's say I want all the records from the 'Book' entity that 
have an 'author' relationship to a specific record in the 'Author' entity.

Riccardo De Menna

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Qualifier through relationship

2009-12-03 Thread Riccardo De Menna
Ok ok... I suck at writing examples as I incorrectly explained myself.

The relationship is a toMany so... rewording my request:

I want all the records from the 'Book' entity that have an 'authors' 
relationship that CONTAINS a specific record coming form the 'Author' entity.

rdm


On 03/dic/2009, at 12.10, Stefan Klein wrote:

 Hi,
 
 new EOKeyValueQualifier(_Book.AUTHOR, EOQualifier.QualifierOperatorEqual, 
 author)
 
 EOF is doing the rest
 
 Stefan
 
 Riccardo De Menna schrieb:
 Hi,
 
 How do I build a fetch specification that qualifies objects based on the 
 content of relationship and not an attribute?
 
 In other words let's say I want all the records from the 'Book' entity that 
 have an 'author' relationship to a specific record in the 'Author' entity.
 
 Riccardo De Menna
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/stefan.klein%40buero-sde.de
 
 This email sent to stefan.kl...@buero-sde.de
 
  

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How do I restore the 'previous' page with DirectActions

2009-11-21 Thread Riccardo De Menna
Hi Chuck, thx for answering,

 On 20/nov/2009, at 14.08, Chuck Hill wrote:
 
 I want to return the same page a user is viewing after he clicks a 
 directAction.
 
 Why a direct action?  If the page is the result of a component action, why 
 not use a component action.

I want external referers to be able to link directly to a specific language of 
the website. Still... you pointed out an easy workaround for me. I can use the 
component action to swap the language and leave the direct one in place for 
external references... those coming from outside won't have a 'previous' page 
to be restored so I don't have to face the issue at all.

 I'd look in the headers for the referrer URL and use a WORedirect to that.

Yeah but how do I restore the page if I'm missing the contextID?

rdm ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


How do I restore the 'previous' page with DirectActions

2009-11-20 Thread Riccardo De Menna
Hi all,

Just a quickie...

I want to return the same page a user is viewing after he clicks a 
directAction. Specifically I'm talking about a language switch link in the 
pageWrapper to change languages. I want a simple url like 
http://www.domain.com/cgi-bin/WebObjects/App.woa/wa/English

What I'm doing atm is adding a link with the following binding:

 LanguageLink : WOHyperlink {
   directActionName = aLanguage;
   ?contextID = context.contextID;
 }


And then in my DirectAction.class I'm intercepting it with:

 public WOActionResults performActionNamed(String anActionName) {
...
 
// Do the language switching here
 
...
 
String stringContextID = (String)req.formValueForKey(contextID);
return s.restorePageForContextID(stringContextID);
 }


This mostly works... but sometimes I get errors since for no apparent reason 
the WOHyperlink does not include the ?contextID thing sometimes.
Am I doing it correctly?

I just want the equivalent of returning null on a component based action.

rdm ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


EntityModeler fails to recognize localized attributes in fetch specifications

2009-11-17 Thread Riccardo De Menna
Hi,

If I write a Fetch Specification in entity modeler that uses a qualifier with 
an attribute name that contains an underscore (for instance when using 
localized attributes) my generated templates end up containing errors.

To be more clear... putting something like visible = 1 and name_en = $name in 
the qualifier field of the fetch specification.

Result: Any entry like ${binding.attributePath.childClassName} in the template 
fails to be resolved.

${binding.attributePath} alone returns [EORelationshipPath: invalid]

Is there a workaround? I'm stuck not being able to use fetch specifications if 
the argument is localized in the db.

Riccardo De Menna ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Postponed validation possible?

2009-11-12 Thread Riccardo De Menna
 Oh, and the push changes thing appears to be controlled by a property. It 
 appears that if you want to turn it on you would put
 
 er.extensions.ERXValidationShouldPushChangesToObject=true
 
 In your properties file.

It doesn't seem to work for me. Even though I turn it on, a model based 
exception due to non null field that has been left empty doesn't get pushed.
I'm not sure to grasp all the flow of it, but for what I see the push setting 
acts when an old NSValidation.ValidationException gets converted through the 
ERXValidation class.
Backstepping the validation the main point where this could happen but doesn't 
(in my particular case) looks like ERD2WPage. The code checks for e instanceof 
ERXValidationException and since it's already the case, no call to 
ERXValidation is made and so no pushing is honored.

I can obviously call it myself... but is there a more appropriate way? Anjo?

rdm ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Postponed validation possible?

2009-11-11 Thread Riccardo De Menna
Hi,

I'd like some help in figuring out if what I'm doing has dangerous implications.
EOF objects that are edited in WOComponents go through two validations for what 
I see.
The first is done on assignment by WOComponent and the second by EOCustomObject 
on save.

This can sometimes hamper my ui as for example when using tabs to edit values 
of a complex EO in steps. Having validation to occur on assignment right away 
means that my user can't leave a tab if he has not filled the mandatory fields 
of a new object. And it might be convenient to let him do it sometimes and just 
check everything when he pushes the save button.

So I added the following to my 'common' EOGenericRecord subclass:

 public boolean postponeValidation() {
return false;
 }
 
 @Override
 public Object validateTakeValueForKeyPath(Object value, String keyPath) {
if ( postponeValidation() ) {
takeValueForKeyPath( value, keyPath );
return value;
}
return super.validateTakeValueForKeyPath(value,keyPath);
 }

My eo's can override the postponeValidation and return true to force 
assignments to occur anyway and just leave it to the save-validation to catch 
any errors.
Am I doing something I will regret here? Can you foresee problems in using such 
practice?

rdm ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Owns destination implies mandatory?

2009-11-11 Thread Riccardo De Menna
Hi,

Does the owns destination concept imply that the relationship is also 
mandatory for the owned object?
If yes, is it enforced somehow if I don't turn on the mandatory flag in the 
model?

I'm asking since I'm having issues with ERDEditOwnedRelationship (I posted a 
message on the wonder list for that but didn't find someone to discuss it)...

I have something like the following:

Person  Membership  Club

A person HAS to have at least one membership to a club. I'd go with:

Person owns membership
Club owns membership
Person.memberships is mandatory
Membership.person is mandatory

But this is conflicting with ERDEditOwnedRelationship that wants to postpone 
relationship linking to the NextDelegate phase. This clashes with validation.
So my question is... if I drop the two mandatory concepts does the ownership 
still imply they are needed and will anyone enforce it?

rdm


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Owns destination implies mandatory?

2009-11-11 Thread Riccardo De Menna
Hi,

Does the owns destination concept imply that the relationship is also 
mandatory for the owned object?
If yes, is it enforced somehow if I don't turn on the mandatory flag in the 
model?

I'm asking since I'm having issues with ERDEditOwnedRelationship (I posted a 
message on the wonder list for that but didn't find someone to discuss it)...

I have something like the following:

Person  Membership  Club

A person HAS to have at least one membership to a club. I'd go with:

Person owns membership
Club owns membership
Person.memberships is mandatory
Membership.person is mandatory

But this is conflicting with ERDEditOwnedRelationship that wants to postpone 
relationship linking to the NextDelegate phase. This clashes with validation.
So my question is... if I drop the two mandatory concepts does the ownership 
still imply they are needed and will anyone enforce it?

rdm

P.S.
Sorry if someone received a double posting. I messed up the headers by replying 
to another thread. ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Postponed validation possible?

2009-11-11 Thread Riccardo De Menna
Ok,

I'm in a wonder-enabled scenario so how do I use it? Need to call 
setPushChangesDefault(true) somewhere?

rdm

On 11/nov/2009, at 14.38, Anjo Krank wrote:

 Because then the user loses what they typed which can sometimes be 
 annoying (e.g., if it's too long a string etc)
 
 As i said: then push the invalid value. This is what ERXValidation does.
 
 And if the value's of the wrong type or can't be coerced?
 
if (eo instanceof EOEnterpriseObject) {
// the exception is coming from EREnterpriseObject
// WE PUSH THE WRONG VALUE INTO THE EO ANYWAY!
if (pushChanges)  {
try {
((EOEnterpriseObject)eo).takeValueForKeyPath(value, 
 key);
} catch(NSKeyValueCoding.UnknownKeyException  ex) {
// AK: as we could have custom components that have 
 non-existant keys
// we of course can't push a value, so we discard the 
 resulting exception
} catch(Exception ex) {
log.error(Can't push value to key ' + key + ':  + 
 value, ex);
}
}
 
 Cheers, Anjo
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com
 
 This email sent to deme...@rdm-web.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Inner Java Enum as value class in EntityModeler

2009-11-07 Thread Riccardo De Menna

Hi,

This issue was already discussed once but I can't really find if it  
was fixed somehow and I'm missing the obvious.


I'm trying more and more to force myself to use Java Enums whenever  
possible (instead of static fields) and often I find myself in need to  
serialize them to db for storage.


So I write nice to/from PLIST/BLOB factory and conversion methods to  
dump my Enums into whatever storage I'm using. This unfortunately  
requires me to fill in Entity Modeler's 'Value Class' field using an  
inner class (actually it's an inner Enum).


I can't use the Class.InnerClass notation. It only works with the Class 
$InnerClass notation. The problem is that the template then will also  
pickup the $ thing and wrongly write bugged templates that I have to  
manually fix.


It's only a matter of searching all the '$' and replacing them with a  
'.', but it can be tedious when you are tweaking the model often.


Is there a way to use an inner class without having to manually patch  
the generated templates?


rdm
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Inner Java Enum as value class in EntityModeler [SOLVED]

2009-11-07 Thread Riccardo De Menna

Hi Johann,

Thank you for your advice. As you suggested, solving the issue was  
just a matter of tweaking the templates. I'm using some custom written  
ones but for anyone with the same issue it's just a matter of  
sprinkling a bunch of '.replace('$','.')' after any occurrence of the  
misspelled class name.


As an example taken from the usual _WonderEntity.java, replacing line

public static final ERXKey$attribute.javaClassName $ 
{attribute.uppercaseUnderscoreName} = new ERXKey 
$attribute.javaClassName(${attribute.uppercaseUnderscoreName}_KEY);



with line:

public static final ERXKey$attribute.javaClassName.replace('$','.') 
 ${attribute.uppercaseUnderscoreName} = new ERXKey 
$attribute.javaClassName.replace('$','.')($ 
{attribute.uppercaseUnderscoreName}_KEY);



Fixes the issue... hope this can help others as well,

Cheers,
rdm

On 07/nov/2009, at 02.46, Johann Werner wrote:


Hi Riccardo,

some time ago I had the very same problem using inner enums in  
Entity Modeler. I found that the easiest way was to move those enums  
out of their outer class and make them normal enums. The other,  
more laborious, way would be to tweak the eogenerator templates to  
do the replacement of '$' by '.' automatically.


jw


Am 07.11.2009 um 10:03 schrieb Riccardo De Menna:


Hi,

This issue was already discussed once but I can't really find if it  
was fixed somehow and I'm missing the obvious.


I'm trying more and more to force myself to use Java Enums whenever  
possible (instead of static fields) and often I find myself in need  
to serialize them to db for storage.


So I write nice to/from PLIST/BLOB factory and conversion methods  
to dump my Enums into whatever storage I'm using. This  
unfortunately requires me to fill in Entity Modeler's 'Value Class'  
field using an inner class (actually it's an inner Enum).


I can't use the Class.InnerClass notation. It only works with the  
Class$InnerClass notation. The problem is that the template then  
will also pickup the $ thing and wrongly write bugged templates  
that I have to manually fix.


It's only a matter of searching all the '$' and replacing them with  
a '.', but it can be tedious when you are tweaking the model often.


Is there a way to use an inner class without having to manually  
patch the generated templates?


rdm






___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Access Control [was: Digging up a Session object from an EOGenericRecord]

2009-03-10 Thread Riccardo De Menna

Hi,

Well... After reading your RBAC and what Chuck uses, my stuff looks  
pretty plain. Anyway I was writing this class while posting the  
original msg of this thread so I decided to share.


It's not even alpha... I've not had the time to even run it twice (I'm  
serious) so just check the idea, not the code. I fixed some fast  
JavaDoc comments in the code. ;)


http://rdm.rdm-web.com/jSamples/Privileges.java.html

It's a centralized class to store all privileges in compact BitSets.  
It's designed with static constructors to fit perfectly in the  
Custom attribute scenario of the wolips entity modeler.


My User entity has an attribute like the following:

inline: eosetup.png



Different classes can define and use their privilege with a static  
block without any prior knowledge of other privileges. Also classes  
define their privilege in their files and use them there as well.  
This keeps me from cluttering all my app with references to privileges  
that might not exist anymore.


I decided to use the static block constructor cause I feel that since  
the code relies on the privileges, defining them in property files  
paves the road to problems. This also gives me a startup check that  
privileges don't conflict. I'm not happy of the redundant ID/CODE  
thing I picked and of the need to manually choose a unique ID, but I  
can live with it.
After reading Chucks post I think I'll look into ways of making it  
work seamlessly with KVC.


Any comments/bugs are absolutely welcome. It's a work in progress so  
I'd love advice from others and as Kieran, I'm curious about how you  
do it yourself.


rdm ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Digging up a Session object from an EOGenericRecord

2009-03-07 Thread Riccardo De Menna

Hi folks,

I've encountered this issue (or similar ones) very often now and I'd  
love to know how others tackle the problem.


I have implemented a standard way of adding a special timestamp to all  
my records in my TGenericRecord (subclass of EOGenericRecord,  
superclass of all my eo). The timestamp holds information on when a  
record was last modified as well as who did it.
To do this I need to query my session for something like a  
currentUser method inside the validateTimestamp method of my eo...


Is there a way to climb up to the Session from an EO?

One possible (failed) attempt:

One first clumsy attempt of mine was to override  
defaultEditingContext() in my Session object and setting the ec  
delegate object to the session itself before returning it. Then from  
the eo I would ask for the ec.delegate() and get the session back.
Should work in theory, even though I dislike the fact that I use the  
delegate() that's meant for other things. In practice it doesn't...
When I factor in my D2W pages my eo don't have the same ec I passed in  
at factory creation time and so there's no session there.


Am I blind? Is there a fast an easy way to do it?

rdm
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Digging up a Session object from an EOGenericRecord

2009-03-07 Thread Riccardo De Menna

Also...

What's the best place to add the code for the update of the timestamp?

I'm not supposed to change anything about an EO in  
validateForOperation methods so that rules out validateForSave().


I can use validateTimestamp()... but that means that the object is  
always saved even if nothing has changed since the timestamp is always  
different.


rdm
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Digging up a Session object from an EOGenericRecord

2009-03-07 Thread Riccardo De Menna


On 07/mar/09, at 14:02, Mike Schrag wrote:

ERXThreadStorage in Wonder is an option ... you don't want to tie  
your model to your WO layer -- if you ever want to use your model  
outside of a web app, it's going to be a huge pain


You are right there. But the value is only stored for inspection.  
Nothing depends on it and it's only to satisfy my client that want's  
to know who wrote/modified what (it's an online newspaper). In other  
words it is perfectly fine for it to be empty if I ever used it from  
outside of my webapp. If it where only for the timestamp I could rely  
on specific db features like MySQL's ability to auto set the  
timestamp. But I need the user as well.


How does ERXThreadStorage work? What can I assume to be in the same  
thread?


rdm
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Digging up a Session object from an EOGenericRecord

2009-03-07 Thread Riccardo De Menna
Ok... as suggested by Jérémy I injected my own editing context using  
wonder's factory.
I now have a nice place to store my session object directly into the  
context.


Question 1: Can you foresee any problems in my editing context holding  
a reference to the session? Could it cause garbage collection delays  
or stuff like that?


... let's go on I have another question coming :)

Now I placed all this in my code and I still don't get the desired  
result. That's because my objects are being fumbled by Wonder D2W  
pages. And as I find out, at the time of pressing the edit or  
inspect button, wonder makes his own context and pulls a local  
instance of the edited object in it.
So hey... if the guys wrote it like that there must be a good reason.  
The following comment from Anjo made me laugh:


//CHECKME ak: I don't remember why we would use a local instance  
when we just want to inspect...


Anyway... skipping over the Inspect stuff, when it comes to the Edit,  
scrolling through the code I found that there was a binding I could  
stick in my rules file to force wonder to at least nest his new  
context into mine. So I added useNestedEditingContext and  
useExistingEditingContext in my rules and changed my code to climb  
the hierarchy of the parentObjectStore() and it now works.


Question 2: What are the implications of having turned on the nested  
contexts? Am I going to face some weird undetectable issue in the near  
future that will make me regret this choice?


thx,
rdm


On 07/mar/09, at 14:04, Jérémy DE ROYER wrote:


Hi,

We do superclass the EOEditingContext according to Chuck's method  
with his ValidatingEditingContext.

When créating the new editing context, we pass our Session.
So it's easy to get the session from a enterprise object :  
this.editingContext().getSession().


public Session() {
super();
setDefaultEditingContext(new ValidatingEditingContext(this));
}

Jérémy

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Digging up a Session object from an EOGenericRecord

2009-03-07 Thread Riccardo De Menna


On 07/mar/09, at 17:34, Mike Schrag wrote:
Whatever you put in it ... It's a ThreadLocal place to shove data,  
so you can push the current user (or current user GID) into it.  You  
really shouldn't access the Session from model classes, it's just  
bad form and eventually there's good odds you're going to regret  
it.  Also, putting the current user into ERXThreadStorage means that  
you don't have to worry about other code making new editing contexts  
where your state isn't setup.  I've seen several people subclassing  
EC's to add custom app state, but for me, it misrepresents what an  
EC's role is, and invariably leads to weird issues (like the local  
instancing into other ec's, etc).


Yes I can see your point there. I can't really force every line of  
code not to use my EC. Like for instance all the mess I wrote to  
detect/climb the parentObjectStores.
BTW... don't bother to answer my question 2 on my previous msg. I  
already stumbled in the obvious. Having nested the contexts means that  
when I save, data is not propagated to the db as it sits waiting for  
the original ec to be saved as well. And that's clearly not feasible.


My question is rather about the scope of the thread. The docs speak of  
scope of a thread handling a particular request. It dies on each  
request so you are implying that I should populate it with my data on  
a session awake call for example?


rdm
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Digging up a Session object from an EOGenericRecord

2009-03-07 Thread Riccardo De Menna


On 07/mar/09, at 19:32, Chuck Hill wrote:

I used to do that nasty EC stuff as I could not see another way.   
Now that I have found ThreadLocal religion, I never use that  
malignant hack.  I think of the information stashed in the thread as  
an ExecutionContext (similar to a WOContext).  That feels like the  
right solution to this common need.  I've even created an object  
to aggregate the bits under one object.  This is also very useful  
for recording things like user activity (set into the thread /  
execution context by the UI component) so that you you can not only  
record who and what and when, but why as well.


ThreadLocal (ERXThreadStorage).  Good stuff!


Lucky I have you guys then... I rearranged the code a bit and it's  
working like a charm. Hail to ERXThreadStorage then... a newly digged  
out fanta-tool of this never ending source of help that was wisely  
called Wonder. ;)


rdm

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Custom attribute class conversion in entity modeler

2009-02-08 Thread Riccardo De Menna

BTW... I'm having a lot of issues with the custom classes setup.
Now for instance I'm trying to use a static inner class and it fails  
at runtime.


Immagine the following:

public static class Status {
public final static Status ACTIVE = new Status(0);
public final static Status DISABLED = new Status(1);
public final static Status TRIAL = new Status(2);
public final static Status DELETED = new Status(3);
public static Status forID(int id) { return new Status(id); }
private final int _id;
private Status(int id) { _id = id; }
public int id() { return _id; }
public boolean equals(Status s) { return _id == s.id(); }
}

or even the more fancy

public static enum Status {
ACTIVE(0),
DISABLED(1),
TRIAL(2),
DELETED(-2);
	private static final MapInteger,Status lookup = new  
HashMapInteger,Status();

public static Status forID(int id) { return lookup.get(id); }
private final int _id;
private Status(int id) { _id = id; }
public int id() { return _id; }
static {
for( Status s : EnumSet.allOf(Status.class) )
lookup.put(s.id(), s);
}
}

I'd like to have these factored/converted directly from the db (with  
the forID/id methods) but since they are strongly related to the  
specific entity class their perfect setup for me is to have them as  
static inner classes of the entity itself (or even better as java  
enums).


The static inner setup fails at runtime with:
java.lang.IllegalStateException: adaptorValueType: unable to load  
class named 'com.tuorlo.hdm.eo.Client.Status' for attribute status on  
entity Client


Is there a workaround?
rdm


On 06/feb/09, at 20:21, Mike Schrag wrote:

someone else had an issue with a static initializer previously,  
which is why i was considering this change ...


On Feb 6, 2009, at 11:50 AM, Riccardo De Menna wrote:


Nevermind,

The issue was not caused by the Entity Modeler setting but rather  
from a static piece of code in the Entity class. The static code is  
being executed by entity modeler as soon as the class initializes I  
guess.


This is the static code:

static {
TEvent.define(1,SOMETHING NASTY HAS HAPPEND);
TEvent.define(2,SOMETHING FUNNY HAS HAPPEND, TEvent.forID(1) );
}

If I remove the second TEvent.define it works. It's the nested  
TEvent causing the problem. As if entity modeler can't find the  
class for the nested one but it can for the non nested.


In this case it's just a matter of slightly changing the  
TEvent.define parameters so that it takes an int instead of itself.  
Simple workaround... it works now but I guess there could be more  
complicate cases where this might not be possible.


No idea what it could be. Just wrote this reply to clear what was  
going on and thank mike for his usual kindness.


rdm

On 06/feb/09, at 16:04, Mike Schrag wrote:


And my com.tuorlo.user.TEvent class has these two methods:
Does this class actually exist in your project?  And is it in the  
classpath?  Entity Modeler constructs its classpath based on you  
project's classpath definition.


ms

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com

This email sent to deme...@rdm-web.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com

This email sent to deme...@rdm-web.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Custom attribute class conversion in entity modeler

2009-02-08 Thread Riccardo De Menna
Actually with the $ I get now the EOGenerated template line flagged as  
error claiming that:


The nested type com.tuorlo.hdm.eo.Client$Status cannot be referenced  
using it's binary name


The generated accessors look like this one:

public com.tuorlo.hdm.eo.Client$Status status() {
return (com.tuorlo.hdm.eo.Client$Status)  
storedValueForKey(status);

}

rdm

On 08/feb/09, at 13:44, Anjo Krank wrote:


Inner classes end up with a '$' instead of a '.' as the class name:

com.tuorlo.hdm.eo.Client$Status

Cheers, Anjo

Am 08.02.2009 um 12:50 schrieb Riccardo De Menna:


BTW... I'm having a lot of issues with the custom classes setup.
Now for instance I'm trying to use a static inner class and it  
fails at runtime.


Immagine the following:

public static class Status {
public final static Status ACTIVE = new Status(0);
public final static Status DISABLED = new Status(1);
public final static Status TRIAL = new Status(2);
public final static Status DELETED = new Status(3);
public static Status forID(int id) { return new Status(id); }
private final int _id;
private Status(int id) { _id = id; }
public int id() { return _id; }
public boolean equals(Status s) { return _id == s.id(); }
}

or even the more fancy

public static enum Status {
ACTIVE(0),
DISABLED(1),
TRIAL(2),
DELETED(-2);
	private static final MapInteger,Status lookup = new  
HashMapInteger,Status();

public static Status forID(int id) { return lookup.get(id); }
private final int _id;
private Status(int id) { _id = id; }
public int id() { return _id; }
static {
for( Status s : EnumSet.allOf(Status.class) )
lookup.put(s.id(), s);
}
}

I'd like to have these factored/converted directly from the db  
(with the forID/id methods) but since they are strongly related to  
the specific entity class their perfect setup for me is to have  
them as static inner classes of the entity itself (or even better  
as java enums).


The static inner setup fails at runtime with:
java.lang.IllegalStateException: adaptorValueType: unable to load  
class named 'com.tuorlo.hdm.eo.Client.Status' for attribute status  
on entity Client


Is there a workaround?
rdm


On 06/feb/09, at 20:21, Mike Schrag wrote:

someone else had an issue with a static initializer previously,  
which is why i was considering this change ...


On Feb 6, 2009, at 11:50 AM, Riccardo De Menna wrote:


Nevermind,

The issue was not caused by the Entity Modeler setting but rather  
from a static piece of code in the Entity class. The static code  
is being executed by entity modeler as soon as the class  
initializes I guess.


This is the static code:

static {
TEvent.define(1,SOMETHING NASTY HAS HAPPEND);
TEvent.define(2,SOMETHING FUNNY HAS HAPPEND, TEvent.forID(1) );
}

If I remove the second TEvent.define it works. It's the nested  
TEvent causing the problem. As if entity modeler can't find the  
class for the nested one but it can for the non nested.


In this case it's just a matter of slightly changing the  
TEvent.define parameters so that it takes an int instead of  
itself. Simple workaround... it works now but I guess there could  
be more complicate cases where this might not be possible.


No idea what it could be. Just wrote this reply to clear what was  
going on and thank mike for his usual kindness.


rdm

On 06/feb/09, at 16:04, Mike Schrag wrote:


And my com.tuorlo.user.TEvent class has these two methods:
Does this class actually exist in your project?  And is it in  
the classpath?  Entity Modeler constructs its classpath based on  
you project's classpath definition.


ms

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com

This email sent to deme...@rdm-web.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com

This email sent to deme...@rdm-web.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your

Re: Custom attribute class conversion in entity modeler

2009-02-06 Thread Riccardo De Menna

Is it possible? Am I doing anything wrong?

On 05/feb/09, at 15:52, Mike Schrag wrote:

But as soon as I push the generate SQL button in the entity modeler  
window I get an error window from wolips with the following  
exception:


java.lang.NoClassDefFoundError
I've been thinking that maybe I should turn all entities into  
EOGenericRecord going into SQL generation ... I haven't thought  
through all the edge cases to see if it will be a problem ...


ms

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com

This email sent to deme...@rdm-web.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Custom attribute class conversion in entity modeler

2009-02-06 Thread Riccardo De Menna

Nevermind,

The issue was not caused by the Entity Modeler setting but rather from  
a static piece of code in the Entity class. The static code is being  
executed by entity modeler as soon as the class initializes I guess.


This is the static code:

static {
TEvent.define(1,SOMETHING NASTY HAS HAPPEND);
TEvent.define(2,SOMETHING FUNNY HAS HAPPEND, TEvent.forID(1) );
}

If I remove the second TEvent.define it works. It's the nested TEvent  
causing the problem. As if entity modeler can't find the class for the  
nested one but it can for the non nested.


In this case it's just a matter of slightly changing the TEvent.define  
parameters so that it takes an int instead of itself. Simple  
workaround... it works now but I guess there could be more complicate  
cases where this might not be possible.


No idea what it could be. Just wrote this reply to clear what was  
going on and thank mike for his usual kindness.


rdm

On 06/feb/09, at 16:04, Mike Schrag wrote:


And my com.tuorlo.user.TEvent class has these two methods:
Does this class actually exist in your project?  And is it in the  
classpath?  Entity Modeler constructs its classpath based on you  
project's classpath definition.


ms

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com

This email sent to deme...@rdm-web.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cannot connect to VM, Socket Closed

2008-10-31 Thread Riccardo De Menna
I'm replying to myself just in case someone stumbles on the same  
thing. I don't know why but the stock MacOs that came with my new  
MacBookPro (or maybe the 'migrate from another mac' procedure) messed  
up with Java and WebObjects.
Reinstalling the OS and using the 'import users and network settings'  
at the end fixed it.


rdm 

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Cannot connect to VM, Socket Closed

2008-10-25 Thread Riccardo De Menna

Hi all,

I just got my new MacBookPro and I migrated my account with Apple's  
automated system. After that my Eclipse refuses to start anything.
If I launch in debug mode I get a cryptic Cannot connect to VM,  
Socket Closed. If I run not in debug it simply silently does nothing.  
Does someone have similar issues? Is there something plain obvious I'm  
missing?


rdm

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Cannot connect to VM, Socket Closed

2008-10-25 Thread Riccardo De Menna

To follow up on my previous post my crash log shows:

Process: java [247]
Path:/System/Library/Frameworks/JavaVM.framework/Versions/ 
1.5.0/Home/bin/java

Identifier:  java
Version: ??? (???)
Code Type:   X86-64 (Native)
Parent Process:  eclipse [245]

Date/Time:   2008-10-25 08:50:15.404 -0700
OS Version:  Mac OS X 10.5.5 (9F2114)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000d, 0x
Crashed Thread:  0

Thread 0 Crashed:
0   ??? 0x0001000111c1 0 + 4295037377
1   ??? 0x00010001276f 0 + 4295042927
2   ??? 0x000100012a1c 0 + 4295043612
3   ??? 0x00010001104d 0 + 4295037005

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0041  rbx: 0x7fff5fbfcfd0  rcx:  
0x  rdx: 0x0014
  rdi: 0x000100014708  rsi: 0x636170736b726f57  rbp:  
0x7fff5fbfc9c0  rsp: 0x7fff5fbfc9c0
   r8: 0x90a8d5e2   r9: 0x  r10:  
0x  r11: 0x
  r12: 0x0014  r13: 0x000100014708  r14:  
0x0015  r15: 0x
  rip: 0x0001000111c1  rfl: 0x00010293  cr2:  
0x000100014708


Binary Images:
0x7fff5fc0 - 0x7fff5fc2e583  dyld 96.2 (???)  
3fafece64819e50390b02865582716ec /usr/lib/dyld




On 25/ott/08, at 06:50, Riccardo De Menna wrote:


Hi all,

I just got my new MacBookPro and I migrated my account with Apple's  
automated system. After that my Eclipse refuses to start anything.
If I launch in debug mode I get a cryptic Cannot connect to VM,  
Socket Closed. If I run not in debug it simply silently does  
nothing. Does someone have similar issues? Is there something plain  
obvious I'm missing?


rdm ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm-web.com

This email sent to [EMAIL PROTECTED]




smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

How do I get EO's instantiated with dynamic class?

2007-08-17 Thread Riccardo De Menna

Hi all,

I was wondering if anyone could point me out in the right direction  
on this problem of mine.
I'm writing a domain registration app and I have a model that holds  
an entity domain.
It's generic in nature as it will accomodate many different domain  
endings (com net org eu etc).


Since I need to fit in a lot of custom behavior I was wondering if I  
can force my editing context to retrieve data from the database but  
then instantiate custom subclasses of a generic abstract domain  
class (ie DotComDomain, DotNetDomain) instead of what I provide in  
the model.
Is there a way to decide on the fly what class gets used to generate  
fetched EO's?


Thanks in advance,
Riccardo De Menna

smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: How do I get EO's instantiated with dynamic class? Sorry for the spam

2007-08-17 Thread Riccardo De Menna
I apologize for the unwanted spam on the list. For some reason the  
message I wrote got stuck in the outbox and was resent every time I  
launched the app.

I manually removed it via terminal...

Again sorry,
Ric

On 17/ago/07, at 08:38, Riccardo De Menna wrote:


Hi all,

I was wondering if anyone could point me out in the right direction  
on this problem of mine.
I'm writing a domain registration app and I have a model that holds  
an entity domain.
It's generic in nature as it will accomodate many different domain  
endings (com net org eu etc).


Since I need to fit in a lot of custom behavior I was wondering if  
I can force my editing context to retrieve data from the database  
but then instantiate custom subclasses of a generic abstract  
domain class (ie DotComDomain, DotNetDomain) instead of what I  
provide in the model.
Is there a way to decide on the fly what class gets used to  
generate fetched EO's?


Thanks in advance,
Riccardo De Menna ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/demenna%40rdm- 
web.com


This email sent to [EMAIL PROTECTED]


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: How do I get EO's instantiated with dynamic class?

2007-08-17 Thread Riccardo De Menna

Hi Guido,

I might have badly explained my issue. I have successfully used EO  
inheritance in another context, but my aim here is exactly the  
opposite. I don't want to model my DB with all sort of empty tables  
for every possible domain ending (there are more than 200 different  
country codes and such).
I'm perfectly fine with one single table holding domain info... I  
simply want to fetch from it and receive specific subclasses of the  
main domain class. These would simply differ from the common  
superclass in the custom logic in them and NOT in the fields they  
hold. Let's say for example that the DotCOM domain subclass would  
validate domains up to 63 chars in length while the DotEU would start  
bitching for anything longer than 25 or so, even though the table  
holds any length.
That said I'm ordering Chuck's book anyway but it will take some time  
to get my hands on it since I'm traveling through Europe atm.
If someone could simply tell me you can't do it or you do it by  
subclassing this or such it would speed me up a lot...


Cheers,
Ric



On 17/ago/07, at 17:15, Guido Neitzer wrote:


On 17.08.2007, at 00:38, Riccardo De Menna wrote:

I was wondering if anyone could point me out in the right  
direction on this problem of mine.
I'm writing a domain registration app and I have a model that  
holds an entity domain.
It's generic in nature as it will accomodate many different domain  
endings (com net org eu etc).


Since I need to fit in a lot of custom behavior I was wondering if  
I can force my editing context to retrieve data from the database  
but then instantiate custom subclasses of a generic abstract  
domain class (ie DotComDomain, DotNetDomain) instead of what I  
provide in the model.
Is there a way to decide on the fly what class gets used to  
generate fetched EO's?


You can use EOF inheritance (get Chuck's book to really learn how  
to do it).


cug




smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: How do I get EO's instantiated with dynamic class?

2007-08-17 Thread Riccardo De Menna


Oh thank you Guido. I had used restricting qualifiers before in a  
horizontal inheritance setup when I needed non-abstract superclasses  
but I had not realized that in fact a single table inheritance was  
exactly what I was asking for. I used to skip over that kind of  
inheritance back when I read about it in the EOmodeler pdf cause it  
looked messy in Apples example context. Now it suddenly makes  
perfectly sense.
Not only... you also forced me to find out there was a contextual  
menu with cool shortcuts in entity modeler ;-)


On 17.08.2007, at 10:20, Kieran Kelleher wrote:
I prefer using the Strategy Design Pattern instead of inheritance  
whenever possible


About the strategy design pattern route suggested by Kieran... yes  
please... send me some links.. I'm eager to look into it. A sort of  
plugin scenario would also fit perfectly well and I would enjoy some  
new design patterns to feed on.


Thanks again to you both for the help provided,
Cheers,
Ric

On 17/ago/07, at 18:06, Guido Neitzer wrote:


On 17.08.2007, at 09:46, Riccardo De Menna wrote:

I'm perfectly fine with one single table holding domain info... I  
simply want to fetch from it and receive specific subclasses of  
the main domain class.


It's called Single Table Inheritance.

Create Domain Entity, make it static. Have an attribute  
topLevelDomain. Make a subclass of Domain with Single Table  
Inheritance (it's an option in Entity Modeler), call it ComDomain  
and set the qualifier to be topLevelDomain = 'com'.


There you go. Whenever you query your database for Domain  
objects, all domains with topLevelDomain = 'com' come back as  
ComDomain objects.


You have one table and whatever number of Entities using it.

cug




smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: saveChanges() not saving

2007-05-03 Thread Riccardo De Menna

Chuck,

I had a similar problem with an ec not saving changes. I just came  
here to the list, was pointed to your stone tablets and voilà...
I found out I was infringing both commandment 1 and 3... my ec saves  
so nice now that I wanted to express a token of gratitude for putting  
up that page.
It has now been copied and pasted as a comment on top of all my ec- 
related classes, as eternal proof of the pain you have saved me :-)


Cheers,
Riccardo De Menna



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Framework build fails on network home directory

2006-07-17 Thread Riccardo De Menna

Hello all,

I'm having problems in building a wo framework from a network shared  
home directory on my xserve. From a local account it seems to work.
I simply open a new project, choose WebObjects Framework as a  
template and press build right away. On the local account it builds  
straight, while on the network home directory I get a Directory not  
empty error on a link operation.
Has anybody ever seen this? Can someone please cross-check my output  
with his to see if there's something I'm doing wrong? I'm sure there  
is something plain stupid I've missed somewhere but I can't figure  
out where.


My build log follows:

Building target “Application Server” of project “Test” with  
configuration “Development”



Checking Dependencies
JamToolExecution Application Server
cd /Network/Servers/xserve.myhost.com/Users/username/Desktop/Test
setenv ASCII_OUTPUT_ANNOTATION YES
setenv ENABLE_APPLE_JAM_EXTENSIONS YES
setenv ENABLE_APPLE_JAM_OUTPUT_ANNOTATION YES
setenv GROUP staff
setenv NATIVE_ARCH ppc
setenv USER username
/Developer/Private/jam -d1 -j2 JAMBASE=/Developer/Makefiles/ 
pbx_jamfiles/ProjectBuilderJambase JAMFILE=/Network/Servers/ 
xserve.myhost.com/Users/username/Desktop/Test/build/Test.build/ 
Development/Application\ Server.build/Application\ Server.jam build  
ACTION=build _DEFAULT_GCC_VERSION=4.0 GCC_VERSION_IDENTIFIER=4_0  
CONFIGURATION=Development BUILD_STYLE=Development  
CPP_HEADERMAP_FILE=/Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Test.build/Development/Application\  
Server.build/_WOServerTest.hmap SRCROOT=/Network/Servers/ 
xserve.myhost.com/Users/username/Desktop/Test OBJROOT=/Network/ 
Servers/xserve.myhost.com/Users/username/Desktop/Test/build  
SYMROOT=/Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build DSTROOT=/tmp/Test.dst


Mkdir /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp
/bin/mkdir  -p /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Development/_WOServerTest.tmp


Mkdir /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp/Versions/TMP
/bin/mkdir  -p /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Development/_WOServerTest.tmp/Versions/TMP


Mkdir /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp/Versions/TMP/Resources
/bin/mkdir  -p /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Development/_WOServerTest.tmp/Versions/ 
TMP/Resources


SymLink /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp/Versions/Current TMP
/bin/ln  -sf TMP  /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Development/_WOServerTest.tmp/Versions/ 
Current


SymLink /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp/Resources Versions/Current/ 
Resources
/bin/ln  -sf Versions/Current/Resources  /Network/Servers/ 
xserve.myhost.com/Users/username/Desktop/Test/build/Development/ 
_WOServerTest.tmp/Resources


PBXCp /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp/Versions/TMP/Resources/ 
Properties Properties
/System/Library/PrivateFrameworks/DevToolsCore.framework/ 
Resources/pbxcp  -exclude .DS_Store -exclude CVS -exclude .svn - 
resolve-src-symlinks  Properties  /Network/Servers/ 
xserve.myhost.com/Users/username/Desktop/Test/build/Development/ 
_WOServerTest.tmp/Versions/TMP/Resources


PBXCp /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp/Versions/TMP/Resources/ 
Info.plist /Network/Servers/xserve.myhost.com/Users/username/ 
Desktop/Test/build/Test.build/Development/Application Server.build/ 
Info.plist
/System/Library/PrivateFrameworks/DevToolsCore.framework/ 
Resources/pbxcp  -exclude .DS_Store -exclude CVS -exclude .svn - 
resolve-src-symlinks  /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Test.build/Development/Application  
Server.build/Info.plist  /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Development/_WOServerTest.tmp/Versions/ 
TMP/Resources


PBXCp /Network/Servers/xserve.myhost.com/Users/username/Desktop/ 
Test/build/Development/_WOServerTest.tmp/Versions/TMP/Resources/ 
pbdevelopment.plist /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Test.build/Development/Application  
Server.build/pbdevelopment.plist
/System/Library/PrivateFrameworks/DevToolsCore.framework/ 
Resources/pbxcp  -exclude .DS_Store -exclude CVS -exclude .svn - 
resolve-src-symlinks  /Network/Servers/xserve.myhost.com/Users/ 
username/Desktop/Test/build/Test.build/Development/Application  
Server.build/pbdevelopment.plist  /Network/Servers/