Re: ERXRestEntityDelegate

2008-04-07 Thread Mike Schrag

This one should be on the Wonder list, but:


Is that a class that extends ERXStandardRestEntityDelegate?

Yes

I'm confused because the methods in ERXStandardRestEntityDelegate  
appear to require an EOEntity be passed in, but the name  
PersonRestEntityDelegate implies that it only handles the Person  
Entity.
The reason for the entity is that you COULD register the same delegate  
for multiple entities (for instance, a more generic delegate that  
might use a centralized ACL system for permissions).  If you're  
registering one-to-one, then you can just ignore the entity because it  
will always correspond to the entity you registered for.


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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


ERXRestEntityDelegate

2008-04-07 Thread jeremy_rosenberg
Thanks Mike and Chuck for your quick responses to my development flag question. 
 I got the test running and it's pretty slick.

Now I want to do it right.  Looking at the API I understand that I need to 
create an Authentication Delegate and an Entity Delegate (at least) and the 
documentation is pretty clear on how to register and use those.

I'm a little fuzzy on what, for example, the PersonRestEntityDelegate would 
look like from the Javadoc example.

Is that a class that extends ERXStandardRestEntityDelegate?

I'm confused because the methods in ERXStandardRestEntityDelegate appear to 
require an EOEntity be passed in, but the name PersonRestEntityDelegate implies 
that it only handles the Person Entity.  

Any advice would be greatly appreciated.

Jeremy

-- 
Jeremy Rosenberg 
Application Developer 
Institutional, Collaborative, and Academic Technologies 
IT Services 
Simon Fraser University 
Burnaby, BC, Canada V5A 1S6 

Email:  [EMAIL PROTECTED] 

"The first rule of WebObjects, you do not talk about 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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela tionship

2008-04-07 Thread David Avendasora
Unfortunately, no. There's _lots_ of differences. There are a number  
of attributes that they share, but they each have completely different  
business logic for deriving those values, and they each have  
attributes that are unique to themselves that would make no sense to  
have on the other.


As uncommon as it is to actually need inheritance in the Model, the  
amount of work I would have to do to not use it would far exceed the  
amount of work I have to do to use it.


Believe me, I'm not using it just because it is a cool OO concept. Not  
that I don't do that in other places in my app - just not here. :-)


Dave

On Apr 7, 2008, at 3:18 PM, Alexander Spohr wrote:

What are the other differences between RawMaterial and  
ManufacturedPart?
Wouldn’t it be enough to just flag the RawMaterial ones as such and  
just have one class for both?


atze


Am 07.04.2008 um 18:02 schrieb David Avendasora:
You know, I was hoping to avoid the whole question if the domain  
was actually well-modeled or not, but with such dispersions cast on  
my flawless modeling skills, I must respond! :-P


I have 2 types of Parts. One purchased from an outside vendor  
(RawMaterial), and ones that are manufactured (ManufacturedPart).   
A ManufacturedPart is made up of any number of component Parts.  
These component Parts can be _either_  a RawMaterial or another  
ManufacturedPart.


So I have modeled it like this:

ManufacturedPart ->> BillOfMaterial ->> BOMComponent -> Part

To make things more complicated each given Manufactured Part can  
have one or more ways of making it and therefor have multiple  
BillsOfMaterial.


Hence, I have a branching, recursive relationship tree that can be  
any number of levels deep:


ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> Rinse, lather, repeat.


Or it can be very simple

ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->> RawMaterial

What all this comes down to is that billsOfMaterial() does _not_  
belong on Part as it does not belong on RawMaterial because a  
RawMaterial is NOT manufactured by us so it will never have a  
BillOfMaterial.


But there are several places in my code that I want to recursively  
navigate this tree and I just don't see a "right" way to do that  
without some variation of instanceOf (in code or in a fetch), a  
case statement or adding the method to Part.


The simplicity of one simple method returning NSArray.emptyArray  
wins. Even though it sullies my object graph, it does so in a much  
less complicated, fragile way.


Dave


On Apr 7, 2008, at 11:26 AM, Chuck Hill wrote:

The real question is whether it makes sense in the domain for a  
Part to have a bill of materials.  The default implementation  
could be


public NSArray billOfMaterials() { return this; }

With complex parts overriding it as appropriate.  It could just be  
that the model / design is incomplete and leading David into doing  
Bad Things in code.


Otherwise, (a) the model is just wrong, or (b) David's processing  
is just wrong.




___
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/atze%40freeport.de

This email sent to [EMAIL PROTECTED]


---
Alexander Spohr
Freeport & Soliversum

Fax: +49 40 303 757 99
Web: http://www.freeport.de/
Box: http://dropbox.letsfile.com/02145299-4347-4671-aab9-1d3004eac51d
---







___
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: stateless component

2008-04-07 Thread Chuck Hill
pageWithName called for stateless com.foo.bar.SomePage, new instance  
being created.



Chuck



On Apr 7, 2008, at 12:38 PM, Tonny Staunsbrink wrote:

Hi Pierre and Chuck

Could you give an example of what a warning log messsage should look  
like?


/Tonny

On Fri, Apr 4, 2008 at 3:00 AM, Mr. Pierre Frisch <[EMAIL PROTECTED]>  
wrote:

May be we should log a warning for this?

Pierre
--
Pierre Frisch
[EMAIL PROTECTED]



On Apr 3, 2008, at 10:39, Chuck Hill wrote:


On Apr 3, 2008, at 10:28 AM, Tonny Staunsbrink wrote:
The top level component is allways created, subcomponents are  
reused, not sure why


Because they have to go in the page cache as unique instances  
recording page state.  Stateless and page state don't mix.



Chuck



Cheers
Tonny

On Wed, Apr 2, 2008 at 11:37 PM, Archibald Singleton <[EMAIL PROTECTED] 
> wrote:

Hello,

>From the WO API docs: "For extra efficiency, you can create  
stateless components: components that can be shared between  
sessions. Stateless components aren't replicated each time they're  
needed; rather, a single shared instance is referenced each time the  
component is used."


But logging calls to my stateless component constructor (subclass of  
ERXStatelessComponent), I see that's it's being called for every  
request and that new instances are created for each request.


Maybe worth noting is the fact that the component is instantiated by  
a direct action (hence there are no sessions).


I basically replicated what David showed in his lastest screencast  
re: the first  hit to the app being a default action instead of a  
component action.


I would have thought that that "shared instance" business means it's  
created once and reused all along?


Could someone please be kind enough to enlighten me as to what's  
happening?


TIA

= tmk =


___
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/mezz.dk%40gmail.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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]

--

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/pierre%40apple.com

This email sent to [EMAIL PROTECTED]




--

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 [EMAIL PROTECTED]


Re: stateless component

2008-04-07 Thread Tonny Staunsbrink
Hi Pierre and Chuck
Could you give an example of what a warning log messsage should look like?

/Tonny

On Fri, Apr 4, 2008 at 3:00 AM, Mr. Pierre Frisch <[EMAIL PROTECTED]> wrote:

> May be we should log a warning for this?
>
> Pierre
> --
> Pierre Frisch
> [EMAIL PROTECTED]
>
>
>
> On Apr 3, 2008, at 10:39, Chuck Hill wrote:
>
>
> > On Apr 3, 2008, at 10:28 AM, Tonny Staunsbrink wrote:
> >
> > > The top level component is allways created, subcomponents are reused,
> > > not sure why
> > >
> >
> > Because they have to go in the page cache as unique instances recording
> > page state.  Stateless and page state don't mix.
> >
> >
> > Chuck
> >
> >
> >
> > > Cheers
> > > Tonny
> > >
> > > On Wed, Apr 2, 2008 at 11:37 PM, Archibald Singleton <
> > > [EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > >From the WO API docs: "For extra efficiency, you can create stateless
> > > components: components that can be shared between sessions. Stateless
> > > components aren't replicated each time they're needed; rather, a single
> > > shared instance is referenced each time the component is used."
> > >
> > > But logging calls to my stateless component constructor (subclass of
> > > ERXStatelessComponent), I see that's it's being called for every request 
> > > and
> > > that new instances are created for each request.
> > >
> > > Maybe worth noting is the fact that the component is instantiated by a
> > > direct action (hence there are no sessions).
> > >
> > > I basically replicated what David showed in his lastest screencast re:
> > > the first  hit to the app being a default action instead of a component
> > > action.
> > >
> > > I would have thought that that "shared instance" business means it's
> > > created once and reused all along?
> > >
> > > Could someone please be kind enough to enlighten me as to what's
> > > happening?
> > >
> > > TIA
> > >
> > > = tmk =
> > >
> > >
> > > ___
> > > 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/mezz.dk%40gmail.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/chill%40global-village.net
> > >
> > > This email sent to [EMAIL PROTECTED]
> > >
> >
> > --
> >
> > 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/pierre%40apple.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: Best Way® to test for existence of a rela tionship

2008-04-07 Thread Alexander Spohr

What are the other differences between RawMaterial and ManufacturedPart?
Wouldn’t it be enough to just flag the RawMaterial ones as such and  
just have one class for both?


atze


Am 07.04.2008 um 18:02 schrieb David Avendasora:
You know, I was hoping to avoid the whole question if the domain was  
actually well-modeled or not, but with such dispersions cast on my  
flawless modeling skills, I must respond! :-P


I have 2 types of Parts. One purchased from an outside vendor  
(RawMaterial), and ones that are manufactured (ManufacturedPart).  A  
ManufacturedPart is made up of any number of component Parts. These  
component Parts can be _either_  a RawMaterial or another  
ManufacturedPart.


So I have modeled it like this:

ManufacturedPart ->> BillOfMaterial ->> BOMComponent -> Part

To make things more complicated each given Manufactured Part can  
have one or more ways of making it and therefor have multiple  
BillsOfMaterial.


Hence, I have a branching, recursive relationship tree that can be  
any number of levels deep:


ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> Rinse, lather, repeat.


Or it can be very simple

ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->> RawMaterial

What all this comes down to is that billsOfMaterial() does _not_  
belong on Part as it does not belong on RawMaterial because a  
RawMaterial is NOT manufactured by us so it will never have a  
BillOfMaterial.


But there are several places in my code that I want to recursively  
navigate this tree and I just don't see a "right" way to do that  
without some variation of instanceOf (in code or in a fetch), a case  
statement or adding the method to Part.


The simplicity of one simple method returning NSArray.emptyArray  
wins. Even though it sullies my object graph, it does so in a much  
less complicated, fragile way.


Dave


On Apr 7, 2008, at 11:26 AM, Chuck Hill wrote:

The real question is whether it makes sense in the domain for a  
Part to have a bill of materials.  The default implementation could  
be


public NSArray billOfMaterials() { return this; }

With complex parts overriding it as appropriate.  It could just be  
that the model / design is incomplete and leading David into doing  
Bad Things in code.


Otherwise, (a) the model is just wrong, or (b) David's processing  
is just wrong.




___
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/atze%40freeport.de

This email sent to [EMAIL PROTECTED]


---
Alexander Spohr
Freeport & Soliversum

Fax: +49 40 303 757 99
Web: http://www.freeport.de/
Box: http://dropbox.letsfile.com/02145299-4347-4671-aab9-1d3004eac51d
---



___
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: Best Way® to test for existence of a rela tionship

2008-04-07 Thread David Avendasora


On Apr 7, 2008, at 1:23 PM, Chuck Hill wrote:


I have 2 types of Parts. One purchased from an outside vendor  
(RawMaterial), and ones that are manufactured (ManufacturedPart).   
A ManufacturedPart is made up of any number of component Parts.  
These component Parts can be _either_  a RawMaterial or another  
ManufacturedPart.


Consider it from a different point of view.  You have parts that can  
be composed of sub-parts.  There are two sub-classes,


1. SimplePart (aka RawMaterial).  This never has any sub-parts.

2. ComplexPart (aka ManufacturedPart).  This has one or more sub- 
parts.


In this scenario, Part.subParts() makes sense for all types.


I'm not sure how this is much different conceptually than what I have  
already. The problem is that I cannot simplify it that far because  
there may be 5 or more ways of making a given part depending upon  
which Manufacturing Line is being used, the time of year, wether or  
not a piece of equipment on the manufacturing line is broken-down or  
not, etc. I do have the concept of the "default" BillOfMaterial for a  
given Part, but that is controlled by the user setting a flag on the  
one they want to be default.


So, in theory I could have convenience methods that return the  
"subParts" of the default BillOfMaterial for the given Part, but in  
most cases, that is not useful information for my users. I need to  
know much more before I can say what the subParts are.



So I have modeled it like this:

ManufacturedPart ->> BillOfMaterial ->> BOMComponent -> Part


What is BOMComponent?  Why not just ManufacturedPart ->>  
BillOfMaterial ->> Part


Or, in my terminology ComplexPart ->> ConstructionDescription ->> Part


It's actually even more complicated because there are "Steps" between  
the BillOfMaterial and BOMComponents like so:


BillOfMaterial ->> Step ->> BOMComponent

Think of the BillOfMaterial as a recipe to make a specific Part. In  
"Step 1" you will use 5 different BOMComponents. Each Step has  
attributes such as instructions, tools used, etc. Each BOMComponent  
has attributes like quantity, unit of measure, etc as well as the part.


To make things more complicated each given Manufactured Part can  
have one or more ways of making it and therefor have multiple  
BillsOfMaterial.


Hence, I have a branching, recursive relationship tree that can be  
any number of levels deep:


ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> Rinse, lather, repeat.


Or it can be very simple

ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->> RawMaterial

What all this comes down to is that billsOfMaterial() does _not_  
belong on Part as it does not belong on RawMaterial because a  
RawMaterial is NOT manufactured by us so it will never have a  
BillOfMaterial.


Why are you iterating over Parts calling billOfMaterial()?  What is  
the goal?  What exactly are you doing with this information?  I have  
an idea of what you are missing, but I will wait for an answer to  
this.


In this specific example, I'm adding the specified Part to a  
Manufacturing Schedule and I need to know what subParts (using your  
terminology) need to be scheduled in addition to the Part that was  
ordered. The way I find the subParts that need to be scheduled is to  
open the selected BillOfMaterial for the Part, drill down to the  
components and step through them to see if they need to be scheduled  
as well.


But there are several places in my code that I want to recursively  
navigate this tree and I just don't see a "right" way to do that  
without some variation of instanceOf (in code or in a fetch), a  
case statement or adding the method to Part.


The simplicity of one simple method returning NSArray.emptyArray  
wins. Even though it sullies my object graph, it does so in a much  
less complicated, fragile way.


Still seems wrong.


Tell me how to do it right. I'm all ears.

Thanks!

Dave


___
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: Development vs Deployment Error

2008-04-07 Thread Mike Schrag
If you're using ERXApplication it should know automatically (from a  
param WOLips sets).  If you're not, you need to set the property:


er.extensions.ERXApplication.developmentMode=true

ms

On Apr 7, 2008, at 1:29 PM, [EMAIL PROTECTED] wrote:


I'm experimenting with ERRest and I got the following error:

You attempted to create an unsafe request handler when you were not  
in development mode!


Which is a good thing as I understand it from reading the API.  But  
I am just testing and running it from Intellij.  Is there a flag I  
am supposed to set somewhere to let it know that I am only in  
development and that I can be trusted to use this unsafe request  
handler?


Many thanks,

Jeremy


--
Jeremy Rosenberg
Application Developer
Institutional, Collaborative, and Academic Technologies
IT Services
Simon Fraser University
Burnaby, BC, Canada V5A 1S6

Email:  [EMAIL PROTECTED]

"The first rule of WebObjects, you do not talk about 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/mschrag%40mdimension.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: Development vs Deployment Error

2008-04-07 Thread Chuck Hill

Hi Jeremy,

I have not used it, but I would guess the standard Wonder property is  
what you want:


er.extensions.ERXApplication.developmentMode=true

Chuck


On Apr 7, 2008, at 10:29 AM, [EMAIL PROTECTED] wrote:


I'm experimenting with ERRest and I got the following error:

You attempted to create an unsafe request handler when you were not  
in development mode!


Which is a good thing as I understand it from reading the API.  But  
I am just testing and running it from Intellij.  Is there a flag I  
am supposed to set somewhere to let it know that I am only in  
development and that I can be trusted to use this unsafe request  
handler?


Many thanks,

Jeremy


--
Jeremy Rosenberg
Application Developer
Institutional, Collaborative, and Academic Technologies
IT Services
Simon Fraser University
Burnaby, BC, Canada V5A 1S6

Email:  [EMAIL PROTECTED]

"The first rule of WebObjects, you do not talk about 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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--

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 [EMAIL PROTECTED]


Development vs Deployment Error

2008-04-07 Thread jeremy_rosenberg
I'm experimenting with ERRest and I got the following error:

 You attempted to create an unsafe request handler when you were not in 
development mode!

Which is a good thing as I understand it from reading the API.  But I am just 
testing and running it from Intellij.  Is there a flag I am supposed to set 
somewhere to let it know that I am only in development and that I can be 
trusted to use this unsafe request handler?

Many thanks,

Jeremy


-- 
Jeremy Rosenberg 
Application Developer 
Institutional, Collaborative, and Academic Technologies 
IT Services 
Simon Fraser University 
Burnaby, BC, Canada V5A 1S6 

Email:  [EMAIL PROTECTED] 

"The first rule of WebObjects, you do not talk about 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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela tionship

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 9:02 AM, David Avendasora wrote:

You know, I was hoping to avoid the whole question if the domain was  
actually well-modeled or not, but with such dispersions cast on my  
flawless modeling skills, I must respond! :-P


:-)


I have 2 types of Parts. One purchased from an outside vendor  
(RawMaterial), and ones that are manufactured (ManufacturedPart).  A  
ManufacturedPart is made up of any number of component Parts. These  
component Parts can be _either_  a RawMaterial or another  
ManufacturedPart.


Consider it from a different point of view.  You have parts that can  
be composed of sub-parts.  There are two sub-classes,


1. SimplePart (aka RawMaterial).  This never has any sub-parts.

2. ComplexPart (aka ManufacturedPart).  This has one or more sub-parts.

In this scenario, Part.subParts() makes sense for all types.




So I have modeled it like this:

ManufacturedPart ->> BillOfMaterial ->> BOMComponent -> Part


What is BOMComponent?  Why not just ManufacturedPart ->>  
BillOfMaterial ->> Part


Or, in my terminology ComplexPart ->> ConstructionDescription ->> Part


To make things more complicated each given Manufactured Part can  
have one or more ways of making it and therefor have multiple  
BillsOfMaterial.


Hence, I have a branching, recursive relationship tree that can be  
any number of levels deep:


ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> Rinse, lather, repeat.


Or it can be very simple

ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->> RawMaterial

What all this comes down to is that billsOfMaterial() does _not_  
belong on Part as it does not belong on RawMaterial because a  
RawMaterial is NOT manufactured by us so it will never have a  
BillOfMaterial.


Why are you iterating over Parts calling billOfMaterial()?  What is  
the goal?  What exactly are you doing with this information?  I have  
an idea of what you are missing, but I will wait for an answer to this.



But there are several places in my code that I want to recursively  
navigate this tree and I just don't see a "right" way to do that  
without some variation of instanceOf (in code or in a fetch), a case  
statement or adding the method to Part.


The simplicity of one simple method returning NSArray.emptyArray  
wins. Even though it sullies my object graph, it does so in a much  
less complicated, fragile way.


Still seems wrong.


Chuck




On Apr 7, 2008, at 11:26 AM, Chuck Hill wrote:

The real question is whether it makes sense in the domain for a  
Part to have a bill of materials.  The default implementation could  
be


public NSArray billOfMaterials() { return this; }

With complex parts overriding it as appropriate.  It could just be  
that the model / design is incomplete and leading David into doing  
Bad Things in code.


Otherwise, (a) the model is just wrong, or (b) David's processing  
is just wrong.







--

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 [EMAIL PROTECTED]


RE: File name issue

2008-04-07 Thread Yury Peskin
Thanks Chuck.  
It works as expected.

Yury Peskin
Director of IT Services
Cycle Software Services
8711 Lyndale Ave S.
Bloomington, MN 55420

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chuck Hill
Sent: Monday, April 07, 2008 11:50 AM
To: Yury Peskin
Cc: webobjects-dev@lists.apple.com
Subject: Re: File name issue


On Apr 7, 2008, at 9:17 AM, Yury Peskin wrote:
> Hello list,
> I'm having a problem with the file download.  I'd like to be able to  
> have the name of the file show up in the save as box, but right now  
> I'm getting the webobjects form id instead. This is on any windows  
> browser: Firefox, or IE 7.
> Any ideas?
> Thanks,
> Yury
>
> Here's my code:
>
>   public void appendToResponse(WOResponse r, WOContext c) {
> // super.appendToResponse(r, c);
>   if(proof != null && proof.pdfPath().length() > 0)
>   {
>   File f = new File(Application.PROOFSDIR + 
> File.separator +  
> proof.pdfPath());
>   try
>   {
>   NSData resultData = new NSData(new 
> FileInputStream(f),  
> (int)f.length());
>   if(resultData != null)
>   {
>   r.disableClientCaching();
>   r.removeHeadersForKey("Cache-Control");
>   r.removeHeadersForKey("pragma");
>   r.setHeader("application/pdf", 
> "content-type");
>   r.setHeader("inline; filename=\"" + 
> Application.PROOFSDIR +  
> proof.pdfPath() + "\"", "content-disposition");

Try attachment; instead of inline;


>   
> r.setHeader(Integer.toString(resultData.length()), "content- 
> length");
>   r.setContent(resultData);
>   }
>   }
>   catch(Exception e)
>   {
>   }
>   }
>   }
>
> ___
> 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 [EMAIL PROTECTED]

-- 

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/ypeskin%40cyclesoftware.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: File name issue

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 9:17 AM, Yury Peskin wrote:

Hello list,
I'm having a problem with the file download.  I'd like to be able to  
have the name of the file show up in the save as box, but right now  
I'm getting the webobjects form id instead. This is on any windows  
browser: Firefox, or IE 7.

Any ideas?
Thanks,
Yury

Here's my code:

public void appendToResponse(WOResponse r, WOContext c) {
//   super.appendToResponse(r, c);
if(proof != null && proof.pdfPath().length() > 0)
{
			File f = new File(Application.PROOFSDIR + File.separator +  
proof.pdfPath());

try
{
NSData resultData = new NSData(new FileInputStream(f),  
(int)f.length());

if(resultData != null)
{
r.disableClientCaching();
r.removeHeadersForKey("Cache-Control");
r.removeHeadersForKey("pragma");
r.setHeader("application/pdf", 
"content-type");
	r.setHeader("inline; filename=\"" + Application.PROOFSDIR +  
proof.pdfPath() + "\"", "content-disposition");


Try attachment; instead of inline;


	r.setHeader(Integer.toString(resultData.length()), "content- 
length");

r.setContent(resultData);
}
}
catch(Exception e)
{
}
}
}

___
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 [EMAIL PROTECTED]


--

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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela tionship

2008-04-07 Thread David Avendasora
You know, I was hoping to avoid the whole question if the domain was  
actually well-modeled or not, but with such dispersions cast on my  
flawless modeling skills, I must respond! :-P


I have 2 types of Parts. One purchased from an outside vendor  
(RawMaterial), and ones that are manufactured (ManufacturedPart).  A  
ManufacturedPart is made up of any number of component Parts. These  
component Parts can be _either_  a RawMaterial or another  
ManufacturedPart.


So I have modeled it like this:

ManufacturedPart ->> BillOfMaterial ->> BOMComponent -> Part

To make things more complicated each given Manufactured Part can have  
one or more ways of making it and therefor have multiple  
BillsOfMaterial.


Hence, I have a branching, recursive relationship tree that can be any  
number of levels deep:


ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->  
ManufacturedPart ->> Rinse, lather, repeat.


Or it can be very simple

ManufacturedPart ->> BillOfMaterial ->> BOMComponent ->> RawMaterial

What all this comes down to is that billsOfMaterial() does _not_  
belong on Part as it does not belong on RawMaterial because a  
RawMaterial is NOT manufactured by us so it will never have a  
BillOfMaterial.


But there are several places in my code that I want to recursively  
navigate this tree and I just don't see a "right" way to do that  
without some variation of instanceOf (in code or in a fetch), a case  
statement or adding the method to Part.


The simplicity of one simple method returning NSArray.emptyArray wins.  
Even though it sullies my object graph, it does so in a much less  
complicated, fragile way.


Dave


On Apr 7, 2008, at 11:26 AM, Chuck Hill wrote:

The real question is whether it makes sense in the domain for a Part  
to have a bill of materials.  The default implementation could be


public NSArray billOfMaterials() { return this; }

With complex parts overriding it as appropriate.  It could just be  
that the model / design is incomplete and leading David into doing  
Bad Things in code.


Otherwise, (a) the model is just wrong, or (b) David's processing is  
just wrong.




___
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]


File name issue

2008-04-07 Thread Yury Peskin

Hello list,
I'm having a problem with the file download.  I'd like to be able to  
have the name of the file show up in the save as box, but right now  
I'm getting the webobjects form id instead. This is on any windows  
browser: Firefox, or IE 7.

Any ideas?
Thanks,
Yury

Here's my code:

public void appendToResponse(WOResponse r, WOContext c) {
//   super.appendToResponse(r, c);
if(proof != null && proof.pdfPath().length() > 0)
{
			File f = new File(Application.PROOFSDIR + File.separator +  
proof.pdfPath());

try
{
NSData resultData = new NSData(new FileInputStream(f), (int) 
f.length());

if(resultData != null)
{
r.disableClientCaching();
r.removeHeadersForKey("Cache-Control");
r.removeHeadersForKey("pragma");
r.setHeader("application/pdf", 
"content-type");
	r.setHeader("inline; filename=\"" + Application.PROOFSDIR +  
proof.pdfPath() + "\"", "content-disposition");
	r.setHeader(Integer.toString(resultData.length()), "content- 
length");

r.setContent(resultData);
}
}
catch(Exception e)
{
}
}
}
  ___
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: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 8:45 AM, Mike Schrag wrote:

Using instanceof on a member of an inheritance hierarchy is a bad  
code smell.  It is the code's ways of telling you that your design  
is wrong.  IMO.
I was going to say in my original that instanceof is a code smell,  
also, actually, but we disagree on the level of ugliness :)  You're  
just cheating -- avoiding an instanceof by mucking up your object  
model doesn't fix the problem, it just hides it, and makes your  
object model more confusing at the same time.  If there are classes  
in your hierarchy that don't implement the method, it's not part of  
the interface.  This implies to me that the original design is  
wrong, unless it really is the case that it's reasonable to ask the  
other part types their billsOfMaterials, and they just don't have any.


Yes, that is what I was assuming by his trying to call billOfMaterials  
on a collection of Parts.



 But given the original description, I'm assuming the model is right  
and that's not the case.  Bob's suggestion of declaring an  
additional interface that defines that method definitely seems  
better, but it doesn't clean up the instanceof check.  Even better  
would be to construct your original fetch to only fetch the objects  
that this check actually applies to (though as I think about it,  
this is really just a variation on instanceof -- you push the  
instanceof, conceptually, into the fetch instead of in Java, but if  
the model doesn't allow incorrect traversal, that seems better to me).



If the original design is correct, then somehow selecting the  
appropriate subset of objects to iterate over seems like the correct  
solution.  If there is more than one disjoint class that has  
billOfMaterials, that again suggests a design flaw.



Chuck

--

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 [EMAIL PROTECTED]


Re:[SOLVED] ERXMigration Problem with Multiple Models

2008-04-07 Thread Aleksey Novicov
I updated Wonder using last night's build, and it does in fact fix the  
exception I was seeing.


Thanks again Mike.

Aleksey

On Apr 6, 2008, at 6:52 PM, Aleksey Novicov wrote:


Thanks Mike. Where is the signup for the Wonder list?

I do have a third model for accessing legacy data in a separate  
database, but on the same MySQL server. There are a couple of  
relationships that traverse models to the legacy data. But that  
third model does not use migrations at all.


I tried explicitly listing the third model in the model names list,  
and... it works! That fixed it.


Thanks!
Aleksey


This should really be on the Wonder list rather than wo-dev, but I
just committed a fix for this ... I saw this once before but didn't
end up looking into it.  Is it possible you are depending on another
framework that is bringing in a migration that only is being
discovered because of a relationship to a 3rd model?  For instance,
you are declaring Model1 and Model2, but do you have a relationship  
to

a Model3 that also uses migrations (like ERAttachment or ERTaggable,
maybe?).  Anyway, that was the scenario that would cause this ... If
you can track down that 3rd model and list it explicitly in the
modelNames list, it would probably fix the problem for you also, or
you can update Wonder after tonight's build and it should be properly
fixed.

As an aside, you no longer have to declare MigrationClassPrefix for
your models if the class name matches your EOModel name ...

ms

On Apr 6, 2008, at 4:43 PM, Aleksey Novicov wrote:


I love ERXMigration! But I seem to be having a problem when I use it
for multiple models. The models do not have any dependency on each
other, so I don't bother to implement modelDependencies() in either
of my Migration classes.

If I configure the settings so that the migration for only one model
runs, and not the other, everything runs fine. So it seems to be
gagging on the fact there are multiple models. Do I need to
configure some sort of default model dependency, even if there is
none? Both models refer to the same database, and the migrations are
both migration0.

Thanks,
Aleksey




 ___
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: Best Way® to test for existence of a rela tionship

2008-04-07 Thread Alexander Spohr

Fetch only ManufacturedParts.

Don’t use the relationship to Parts (if that’s what you do) to get the  
NSArray.
Either create a relationship to ManufacturedParts or fetch them using  
a qualifier.


Iterating over a mixed NSArray wanting only one special class is bad  
design. Filter it before you use it for such a task.


atze



Am 07.04.2008 um 15:12 schrieb David Avendasora:

Hi all,

This is more of a Java question than a WO-specific one

I have an Inheritance structure in my app:

Part (abstract Superclass)
RawMaterial (subclass of Part)
ManufacturedPart (subclass of Part)

I have an NSArray of Parts that could be, RawMaterial instances,   
ManufacturedPart instances, or most likely, a mixture of the two.


I want to iterate through the Array and get the contents of the  
Part.billsOfMaterial() (toMany) relationship. The problem is that  
while ManufacturedParts have this relationship, RawMaterials do not.


Right now, I'm using a try-catch block that catches the exception on  
RawMaterial.billsOfMaterial() and just ignores it.


I could also add a billsOfMaterial() method to the RawMaterial class  
that simply returns NSArray.emptyArray.


Is one way better than the other for any reason?

Thanks,

Dave
___
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/atze%40freeport.de

This email sent to [EMAIL PROTECTED]


---
Alexander Spohr
Freeport & Soliversum

Fax: +49 40 303 757 99
Web: http://www.freeport.de/
Box: http://dropbox.letsfile.com/02145299-4347-4671-aab9-1d3004eac51d
---



___
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: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 8:45 AM, Ken Anderson wrote:


Using instanceof on a member of an inheritance hierarchy is a bad  
code smell.  It is the code's ways of telling you that your design  
is wrong.  IMO.



Almost as bad as using case statements!  (doh!)


Case statements are right out!

Chuck

--

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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Mike Schrag
Using instanceof on a member of an inheritance hierarchy is a bad  
code smell.  It is the code's ways of telling you that your design  
is wrong.  IMO.
I was going to say in my original that instanceof is a code smell,  
also, actually, but we disagree on the level of ugliness :)  You're  
just cheating -- avoiding an instanceof by mucking up your object  
model doesn't fix the problem, it just hides it, and makes your object  
model more confusing at the same time.  If there are classes in your  
hierarchy that don't implement the method, it's not part of the  
interface.  This implies to me that the original design is wrong,  
unless it really is the case that it's reasonable to ask the other  
part types their billsOfMaterials, and they just don't have any.  But  
given the original description, I'm assuming the model is right and  
that's not the case.  Bob's suggestion of declaring an additional  
interface that defines that method definitely seems better, but it  
doesn't clean up the instanceof check.  Even better would be to  
construct your original fetch to only fetch the objects that this  
check actually applies to (though as I think about it, this is really  
just a variation on instanceof -- you push the instanceof,  
conceptually, into the fetch instead of in Java, but if the model  
doesn't allow incorrect traversal, that seems better to me).


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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Ken Anderson


On Apr 7, 2008, at 11:28 AM, Chuck Hill wrote:



On Apr 7, 2008, at 8:26 AM, Bob Stuart wrote:


At 11:20 AM -0400 4/7/08, David Avendasora wrote:

On Apr 7, 2008, at 10:36 AM, Mike Schrag wrote:

I'd expect the instanceof check will be much more efficient than  
catching an exception.

By far ...

From an OO design point of view, I'd add a billsOfMaterial()  
method to the Part class that simply returns NSArray.emptyArray.  
ManufacturedPart will then override this to return the correct  
result for a ManufacturedPart.

Ew gross ...


By far one of my favorite technical arguments.

If it's not an attribute of all Parts, then from an OO design  
standpoint it shouldn't be on Part.  I agree if your argument is  
based on "the convenience of being able to call billsOfMaterial  
on the entire array," though.


Yeah, I'm getting the impression that there's no really "ungross"  
OO way to do this. I think this and instanceOf are equally "gross"  
because if I add other classes that have a billsOfMaterial()  
relationship, then I'd have to remember to come here and add it to  
the list of things instanceOf checks.


I think I'll go with adding the billsOfMaterial() method to Part  
because then I can use this same logic in more places without  
having to write the instanceOf check every time.


If you want to avoid adding the method to Part you could create an  
interface and have the instance of check that. Then only the  
classes that have this would implement the interface. That way you  
only have to change things when you make the new class and only in  
the class not however many places you might do the instanceof check.



Using instanceof on a member of an inheritance hierarchy is a bad  
code smell.  It is the code's ways of telling you that your design  
is wrong.  IMO.




Almost as bad as using case statements!  (doh!)



Chuck

--

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/kenlists%40anderhome.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]


[Meeting] Chicago CocoaHeads / Cawug - MacRuby

2008-04-07 Thread Bob Frank
The Chicago CocoaHeads / Chicago Cocoa and WebObjects User Group  
(CAWUG) is holding our next meeting Tuesday, April 8th, at 7:00 PM at  
the Apple Store on Michigan Ave.



Agenda:
- Introductions & Announcements
- Chuck Remes on MacRuby
- adjournment to O'Toole's

When:   
Tuesday, April 8th, 7:00 PM

Where:
Apple Store Michigan Avenue
679 North Michigan Ave. (at the corner of Huron & Michigan Ave.)
Chicago, IL 60611
		http://maps.yahoo.com/maps_result? 
ed=gYbE5Op_0Tokf_p7h61dwjbWtjC2r1YehzWw&csz=60611

http://tinyurl.com/26z5nb
(in case long URL gets cut)

- Chuck will be presenting on MacRuby Development

He has been doing a bunch of MacRuby development recently and will  
present an overview of MacRuby and discuss the positives and  
negatives of MacRuby development.



- O'Tooles

	We will continue the discussion at our local watering hold Timothy  
O'Toole's at 622 Fairbanks (2 blocks east of the store).



We also wish to thank the folks who run the theater space at the  
Apple store for letting us have our meetings there, and Jonathan  
'Wolf' Rentzsch for hosting the new and revived CAWUG web site.   
Thanks all.


Also, if you are working on a project and would like to talk about  
it  briefly / promote it, I think it would be fun for people to hear  
about  other people's projects.  Please email me off line and you can  
talk at  a future meeting or would like a book to review we would  
welcome that too.



Future meetings dates and tentative topics:  5/13/08, 7/8/08

NOTE: There will be no June Meeting due to WWDC.

April - Chuck Remes on MacRuby
May - Bob on WO development with Eclipse, part II


CAWUG Resources

Mail list: http://groups.google.com/group/cawug
Google Site: http://groups.google.com/group/cawug
Web Site: http://www.cawug.org/
RSS feed: http://www.cawug.org/rss.xml
	iCal: http://ical.mac.com/chicagobob/ Chicago-CocoaHeads-CAWUG (view  
on the web)
	iCal: webcal://ical.mac.com/chicagobob/Chicago-CocoaHeads-CAWUG.ics  
(subscribe to in iCal)


Cocoa Heads web site:
http://cocoaheads.org/us/ChicagoIllinois/index.html


Hope to see you at the meeting.

-Bob



___
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: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 8:26 AM, Bob Stuart wrote:


At 11:20 AM -0400 4/7/08, David Avendasora wrote:

On Apr 7, 2008, at 10:36 AM, Mike Schrag wrote:

I'd expect the instanceof check will be much more efficient than  
catching an exception.

By far ...

From an OO design point of view, I'd add a billsOfMaterial()  
method to the Part class that simply returns NSArray.emptyArray.  
ManufacturedPart will then override this to return the correct  
result for a ManufacturedPart.

Ew gross ...


By far one of my favorite technical arguments.

If it's not an attribute of all Parts, then from an OO design  
standpoint it shouldn't be on Part.  I agree if your argument is  
based on "the convenience of being able to call billsOfMaterial on  
the entire array," though.


Yeah, I'm getting the impression that there's no really "ungross"  
OO way to do this. I think this and instanceOf are equally "gross"  
because if I add other classes that have a billsOfMaterial()  
relationship, then I'd have to remember to come here and add it to  
the list of things instanceOf checks.


I think I'll go with adding the billsOfMaterial() method to Part  
because then I can use this same logic in more places without  
having to write the instanceOf check every time.


If you want to avoid adding the method to Part you could create an  
interface and have the instance of check that. Then only the classes  
that have this would implement the interface. That way you only have  
to change things when you make the new class and only in the class  
not however many places you might do the instanceof check.



Using instanceof on a member of an inheritance hierarchy is a bad code  
smell.  It is the code's ways of telling you that your design is  
wrong.  IMO.



Chuck

--

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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 7:36 AM, Mike Schrag wrote:

I'd expect the instanceof check will be much more efficient than  
catching an exception.

By far ...

From an OO design point of view, I'd add a billsOfMaterial() method  
to the Part class that simply returns NSArray.emptyArray.  
ManufacturedPart will then override this to return the correct  
result for a ManufacturedPart.

Ew gross ...


Less gross than doing instanceof, hands down.


If it's not an attribute of all Parts, then from an OO design  
standpoint it shouldn't be on Part.  I agree if your argument is  
based on "the convenience of being able to call billsOfMaterial on  
the entire array," though.



The real question is whether it makes sense in the domain for a Part  
to have a bill of materials.  The default implementation could be


public NSArray billOfMaterials() { return this; }

With complex parts overriding it as appropriate.  It could just be  
that the model / design is incomplete and leading David into doing Bad  
Things in code.


Otherwise, (a) the model is just wrong, or (b) David's processing is  
just wrong.



Chuck


--

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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela t ionsh ip

2008-04-07 Thread Bob Stuart

At 11:20 AM -0400 4/7/08, David Avendasora wrote:

On Apr 7, 2008, at 10:36 AM, Mike Schrag wrote:

I'd expect the instanceof check will be much more efficient than 
catching an exception.

By far ...

From an OO design point of view, I'd add a billsOfMaterial() 
method to the Part class that simply returns NSArray.emptyArray. 
ManufacturedPart will then override this to return the correct 
result for a ManufacturedPart.

Ew gross ...


By far one of my favorite technical arguments.

If it's not an attribute of all Parts, then from an OO design 
standpoint it shouldn't be on Part.  I agree if your argument is 
based on "the convenience of being able to call billsOfMaterial on 
the entire array," though.


Yeah, I'm getting the impression that there's no really "ungross" OO 
way to do this. I think this and instanceOf are equally "gross" 
because if I add other classes that have a billsOfMaterial() 
relationship, then I'd have to remember to come here and add it to 
the list of things instanceOf checks.


I think I'll go with adding the billsOfMaterial() method to Part 
because then I can use this same logic in more places without having 
to write the instanceOf check every time.


If you want to avoid adding the method to Part you could create an 
interface and have the instance of check that. Then only the classes 
that have this would implement the interface. That way you only have 
to change things when you make the new class and only in the class 
not however many places you might do the instanceof check.



Still seems not right, but it's easier. =:-0

Dave



___
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/bobstuart%40mcf.com

This email sent to [EMAIL PROTECTED]



--
Bob Stuart
___
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: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread David Avendasora


On Apr 7, 2008, at 10:36 AM, Mike Schrag wrote:

I'd expect the instanceof check will be much more efficient than  
catching an exception.

By far ...

From an OO design point of view, I'd add a billsOfMaterial() method  
to the Part class that simply returns NSArray.emptyArray.  
ManufacturedPart will then override this to return the correct  
result for a ManufacturedPart.

Ew gross ...


By far one of my favorite technical arguments.

If it's not an attribute of all Parts, then from an OO design  
standpoint it shouldn't be on Part.  I agree if your argument is  
based on "the convenience of being able to call billsOfMaterial on  
the entire array," though.


Yeah, I'm getting the impression that there's no really "ungross" OO  
way to do this. I think this and instanceOf are equally "gross"  
because if I add other classes that have a billsOfMaterial()  
relationship, then I'd have to remember to come here and add it to the  
list of things instanceOf checks.


I think I'll go with adding the billsOfMaterial() method to Part  
because then I can use this same logic in more places without having  
to write the instanceOf check every time.


Still seems not right, but it's easier. =:-0

Dave



___
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: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Mike Schrag
I'd expect the instanceof check will be much more efficient than  
catching an exception.

By far ...

From an OO design point of view, I'd add a billsOfMaterial() method  
to the Part class that simply returns NSArray.emptyArray.  
ManufacturedPart will then override this to return the correct  
result for a ManufacturedPart.
Ew gross ... If it's not an attribute of all Parts, then from an OO  
design standpoint it shouldn't be on Part.  I agree if your argument  
is based on "the convenience of being able to call billsOfMaterial on  
the entire array," though.


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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: DB2 and WebObjects

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 2:19 AM, David Avendasora wrote:

I'm not sure I'd call it a "bug" as Chuck's original code does the  
Right Thing® in 99.9% of the situations you'd use it.


If my code does not work in 0.1% of situations, then I'd consider it  
buggy.  But that is just me.  :-)




But, being the PITA that I am, I've come up with a situation where  
even though the his code can't verify that what I'm doing is safe  
from a referential-integrity perspective, I know it will be safe due  
to my specific business-logic rules.


So, if by saying he gave me a patch for the bug, he means he told me  
which safety to disable, I guess that would be about right. :-)


IIRC, there was also a change from entity().name() to  
entity.externalName().



Chuck



On Apr 6, 2008, at 8:26 PM, Chuck Hill wrote:

David Avendasora pointed out a bug in it if you are using self- 
referential relationships (entity with a relationship to itself).   
I gave him a patch, but I really need to rethink some parts of that  
code.  It works for most things, but I think there are some more  
buggy cases.  It also does not (yet) order operations on the same  
table which self-referential relationships really need.


--

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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a rela tionsh ip

2008-04-07 Thread Chuck Hill
I'd expect the instanceof check will be much more efficient than  
catching an exception.  From an OO design point of view, I'd add a  
billsOfMaterial() method to the Part class that simply returns  
NSArray.emptyArray.  ManufacturedPart will then override this to  
return the correct result for a ManufacturedPart.


Chuck



On Apr 7, 2008, at 6:34 AM, Bob Stuart wrote:


Try catch seems expensive to me. Why not just check with
if  (aPart instanceof ManufacturedPart){
do something with aPart.billsOfMaterial()
}

At 9:12 AM -0400 4/7/08, David Avendasora wrote:

Hi all,

This is more of a Java question than a WO-specific one

I have an Inheritance structure in my app:

Part (abstract Superclass)
RawMaterial (subclass of Part)
ManufacturedPart (subclass of Part)

I have an NSArray of Parts that could be, RawMaterial instances,   
ManufacturedPart instances, or most likely, a mixture of the two.


I want to iterate through the Array and get the contents of the  
Part.billsOfMaterial() (toMany) relationship. The problem is that  
while ManufacturedParts have this relationship, RawMaterials do not.


Right now, I'm using a try-catch block that catches the exception  
on RawMaterial.billsOfMaterial() and just ignores it.


I could also add a billsOfMaterial() method to the RawMaterial  
class that simply returns NSArray.emptyArray.


Is one way better than the other for any reason?

Thanks,

Dave
___
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/bobstuart%40mcf.com

This email sent to [EMAIL PROTECTED]



--
Bob Stuart
___
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 [EMAIL PROTECTED]



--

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 [EMAIL PROTECTED]


Re: Swapping a session on a direct action

2008-04-07 Thread Chuck Hill


On Apr 7, 2008, at 3:18 AM, Miguel Arroz wrote:


Hi!

 We're having a problem with "zombie" sessions. One of our direct  
actions has some trickery to always create a new session, even if  
the wosid cookie has a valid session ID, and I believe something is  
acting up there, but I can't figure out why (yes, this looks  
strange, but we actually know what we are doing, or at least we like  
to believe so).


 The problem is this: everytime I access that DA, JavaMonitor shows  
2 more sessions on that instance. After the typical 60 minutes, one  
of the sessions dies, but the other remains forever. This has  
obvious serious consequences, as Refuse New Sessions will wait for  
every session to die, and those zombie sessions simply won't go away.


I have seen this happen when sleep() or terminate() throws an exception.


 As I needed a more sophisticated way to track sessions (I need to  
know the user login, etc) I built my own session tracker, that hooks  
into session's sleep and termination methods to keep track of what's  
going on. Looking at the table generated by that tracker, everything  
is fine: no zombie sessions appear, and all the sessions die after  
60 minutes.


 So, to dig this further, what I want to know is where does that  
active session counter on JavaMonitor comes from. How's that count  
being made? Is it done on the app or on wotaskd?


See activeSessionsCount() in the WOApplication API.

Chuck


--

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 [EMAIL PROTECTED]


Re: Best Way® to test for existence of a relatio nsh ip

2008-04-07 Thread Bob Stuart

Try catch seems expensive to me. Why not just check with
if  (aPart instanceof ManufacturedPart){
do something with aPart.billsOfMaterial()
}

At 9:12 AM -0400 4/7/08, David Avendasora wrote:

Hi all,

This is more of a Java question than a WO-specific one

I have an Inheritance structure in my app:

Part (abstract Superclass)
RawMaterial (subclass of Part)
ManufacturedPart (subclass of Part)

I have an NSArray of Parts that could be, RawMaterial instances,  
ManufacturedPart instances, or most likely, a mixture of the two.


I want to iterate through the Array and get the contents of the 
Part.billsOfMaterial() (toMany) relationship. The problem is that 
while ManufacturedParts have this relationship, RawMaterials do not.


Right now, I'm using a try-catch block that catches the exception on 
RawMaterial.billsOfMaterial() and just ignores it.


I could also add a billsOfMaterial() method to the RawMaterial class 
that simply returns NSArray.emptyArray.


Is one way better than the other for any reason?

Thanks,

Dave
___
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/bobstuart%40mcf.com

This email sent to [EMAIL PROTECTED]



--
Bob Stuart
___
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]


Best Way® to test for existence of a relationsh ip

2008-04-07 Thread David Avendasora

Hi all,

This is more of a Java question than a WO-specific one

I have an Inheritance structure in my app:

Part (abstract Superclass)
RawMaterial (subclass of Part)
ManufacturedPart (subclass of Part)

I have an NSArray of Parts that could be, RawMaterial instances,   
ManufacturedPart instances, or most likely, a mixture of the two.


I want to iterate through the Array and get the contents of the  
Part.billsOfMaterial() (toMany) relationship. The problem is that  
while ManufacturedParts have this relationship, RawMaterials do not.


Right now, I'm using a try-catch block that catches the exception on  
RawMaterial.billsOfMaterial() and just ignores it.


I could also add a billsOfMaterial() method to the RawMaterial class  
that simply returns NSArray.emptyArray.


Is one way better than the other for any reason?

Thanks,

Dave
___
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]


Swapping a session on a direct action

2008-04-07 Thread Miguel Arroz

Hi!

  We're having a problem with "zombie" sessions. One of our direct  
actions has some trickery to always create a new session, even if the  
wosid cookie has a valid session ID, and I believe something is acting  
up there, but I can't figure out why (yes, this looks strange, but we  
actually know what we are doing, or at least we like to believe so).


  The problem is this: everytime I access that DA, JavaMonitor shows  
2 more sessions on that instance. After the typical 60 minutes, one of  
the sessions dies, but the other remains forever. This has obvious  
serious consequences, as Refuse New Sessions will wait for every  
session to die, and those zombie sessions simply won't go away.


  As I needed a more sophisticated way to track sessions (I need to  
know the user login, etc) I built my own session tracker, that hooks  
into session's sleep and termination methods to keep track of what's  
going on. Looking at the table generated by that tracker, everything  
is fine: no zombie sessions appear, and all the sessions die after 60  
minutes.


  So, to dig this further, what I want to know is where does that  
active session counter on JavaMonitor comes from. How's that count  
being made? Is it done on the app or on wotaskd?


  Yours

Miguel Arroz


Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com





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: DB2 and WebObjects

2008-04-07 Thread David Avendasora
I'm not sure I'd call it a "bug" as Chuck's original code does the  
Right Thing® in 99.9% of the situations you'd use it. But, being the  
PITA that I am, I've come up with a situation where even though the  
his code can't verify that what I'm doing is safe from a referential- 
integrity perspective, I know it will be safe due to my specific  
business-logic rules.


So, if by saying he gave me a patch for the bug, he means he told me  
which safety to disable, I guess that would be about right. :-)


Dave

On Apr 6, 2008, at 8:26 PM, Chuck Hill wrote:

David Avendasora pointed out a bug in it if you are using self- 
referential relationships (entity with a relationship to itself).  I  
gave him a patch, but I really need to rethink some parts of that  
code.  It works for most things, but I think there are some more  
buggy cases.  It also does not (yet) order operations on the same  
table which self-referential relationships really need.


___
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: Generate SQL fails

2008-04-07 Thread Q


On 07/04/2008, at 4:19 PM, Rams wrote:


I'm trying to Generate SQL to create my tables and it is  
failing.  My searching leads me to believe it is due to my setup  
as described here...


http://wiki.objectstyle.org/confluence/display/WOL/mail/3047829

I'm using:

OS X 10.5
WO 5.4.1
WOLips 3.5?
MySQL 5.0.51a
and Connector J 5.0.8.

Is there a workaround for this issue until there is a fix?


Yes, set up your project linked to the WO5.3.3 frameworks.

Also, does anyone have a rough timetable on when a fix will be  
available?


Apple would, but nothing publicly announced.


Wouldn't that require downgrading my entire system to Tiger?   
Honestly, that doesn't sound very reasonable.  I've been using  
Leopard for six months.  It would be rather difficult to uninstall/ 
downgrade now.  I think it would be easier to learn enough SQL to  
set up tables manually... or is the Generate SQL issue only the  
tip of the iceberg?


Search the wiki for a script called "woswitch", it will do  
everything for you included downloading and installing the 5.3.3.  
frameworks all you need to do is quit eclipse, run the script and  
restart eclipse and your done. It doesn't touch any of your  
installed frameworks, only downloads some files and modifies your  
wolips build properties file.


Ok, I found woswitch at the very bottom of the page here:

http://wiki.objectstyle.org/confluence/display/WO/WO+5.4+Getting+Started

Ran the script and now I have numerous problems.  I tried switching  
to 53, create an eomodel, generate sql.  That worked in generating a  
simple entity in the database, I didn't try any relationships.  Once  
done, I closed the project (without closing eclipse), switched back  
to 54,


You MUST quit eclipse when switching between 54 and 53 using this  
script otherwise unexpected behaviour will ensue.


reopened the project, and the entity no longer exists in the EOModel  
file.  I assume that has something to do with the roughly 38 errors  
complaining about not being able to resolve the enitity... I'm  
guessing I don't have the proper frameworks selected.


In addition to that, previously working apps no longer open  
correctly complaining with two errors that:


Invalid classpath container: 'WebObjects Frameworks' in project  
'WOLipsTest'

The project cannot be built until build path errors are resolved

So it seems either I'm doing something wrong, or I'm going to need  
to select my frameworks anytime I switch between the two... ??


The script creates a sandboxed WO 5.3.3 install under /Developer/ 
WebObjects53  so if you need to link to frameworks that aren't part of  
the WO base install you need to install them into /Developer/ 
WebObects53/Library/Frameworks  (eg, the WO53 version of Wonder should  
go here). If you are using frameworks that are not version specific  
you can just symlink them there.


Finally, WOnder is nowhere to be found.  I get errors relating to  
anything WOnder and even though the frameworks are right where they  
were previous to running woswitch.sh, I cannot find them in the  
configure build path dialog any longer.  I'm guessing that has  
something to do with the NEXT_ROOT business mentioned in the wiki,  
but I really have no idea how to get it back.


You may need to do a clean of you get unexpected errors. The only  
thing that the script modifies on your system is your ~/Library/ 
wobuild.properties. It doesn't touch NEXT_ROOT directly.


Assistance will be greatly appreciated if anyone can clue me into  
what I'm doing wrong...




--
Learn how to secure your email
(Mac OS X 10.3+) http://www.joar.com/certificates/
(Windows) http://www.marknoble.com/tutorial/smime/smime.aspx


___
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/qdolan%40gmail.com

This email sent to [EMAIL PROTECTED]




--
Seeya...Q

Quinton Dolan - [EMAIL PROTECTED]
Gold Coast, QLD, Australia (GMT+10)
Ph: +61 419 729 806



___
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]


[SOLVED] Generate SQL fails

2008-04-07 Thread Rams


On Apr 7, 2008, at 2:19 AM, Rams wrote:


I'm trying to Generate SQL to create my tables and it is  
failing.  My searching leads me to believe it is due to my setup  
as described here...


http://wiki.objectstyle.org/confluence/display/WOL/mail/3047829

I'm using:

OS X 10.5
WO 5.4.1
WOLips 3.5?
MySQL 5.0.51a
and Connector J 5.0.8.

Is there a workaround for this issue until there is a fix?


Yes, set up your project linked to the WO5.3.3 frameworks.

Also, does anyone have a rough timetable on when a fix will be  
available?


Apple would, but nothing publicly announced.


Wouldn't that require downgrading my entire system to Tiger?   
Honestly, that doesn't sound very reasonable.  I've been using  
Leopard for six months.  It would be rather difficult to uninstall/ 
downgrade now.  I think it would be easier to learn enough SQL to  
set up tables manually... or is the Generate SQL issue only the  
tip of the iceberg?


Search the wiki for a script called "woswitch", it will do  
everything for you included downloading and installing the 5.3.3.  
frameworks all you need to do is quit eclipse, run the script and  
restart eclipse and your done. It doesn't touch any of your  
installed frameworks, only downloads some files and modifies your  
wolips build properties file.


Ok, I found woswitch at the very bottom of the page here:

http://wiki.objectstyle.org/confluence/display/WO/WO+5.4+Getting+Started

Ran the script and now I have numerous problems.  I tried switching  
to 53, create an eomodel, generate sql.  That worked in generating a  
simple entity in the database, I didn't try any relationships.  Once  
done, I closed the project (without closing eclipse), switched back  
to 54, reopened the project, and the entity no longer exists in the  
EOModel file.  I assume that has something to do with the roughly 38  
errors complaining about not being able to resolve the enitity...  
I'm guessing I don't have the proper frameworks selected.


In addition to that, previously working apps no longer open  
correctly complaining with two errors that:


Invalid classpath container: 'WebObjects Frameworks' in project  
'WOLipsTest'

The project cannot be built until build path errors are resolved

So it seems either I'm doing something wrong, or I'm going to need  
to select my frameworks anytime I switch between the two... ??


Finally, WOnder is nowhere to be found.  I get errors relating to  
anything WOnder and even though the frameworks are right where they  
were previous to running woswitch.sh, I cannot find them in the  
configure build path dialog any longer.  I'm guessing that has  
something to do with the NEXT_ROOT business mentioned in the wiki,  
but I really have no idea how to get it back.


Assistance will be greatly appreciated if anyone can clue me into  
what I'm doing wrong...



Posting my solution for posterity... the reason wonder could not be  
found is because the wonder frameworks needed to be installed for 5.3  
as well.  Download the appropriate wonder latest frameworks here:


http://webobjects.mdimension.com/wonder/

Then unpack the 5.3 frameworks and drop them into /Developer/ 
WebObjects53/Library/Frameworks


As for the other issues, it seems that simply closing the project  
isn't enough.  I have to close eclipse, change between 53/54 and then  
start eclipse back up.


I finally have a working eclipse installation and I am happy at the  
moment.  I do appreciate everyone's assistance and I thank you all for  
your patience as well.


--
Learn how to secure your email
(Mac OS X 10.3+) http://www.joar.com/certificates/
(Windows) http://www.marknoble.com/tutorial/smime/smime.aspx




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]