Re: Primary keys

2014-10-02 Thread Chuck Hill


On 2014-10-02, 10:45 AM, "Mark Wardle" wrote:

Thanks Ted, that is interesting. Unfortunately, the existing primary key is 
used in joins from other tables so I think it will need to be a multi-step 
procedure.

Take home message for me is never ever have primary keys with any kind of 
meaning, even if coming from an external reputable third-party because even 
they will decide to change their primary keys in the future.  I’ve not done it 
since but this is from work from years ago so I blame my younger self!

At least you are coming FROM that and not going TO that!  :-)  I’ve seen that 
done.

Chuck



Mark

On 2 Oct 2014, at 12:01, Theodore Petrosky 
mailto:tedp...@yahoo.com>> wrote:

if there is already a primary key, then I think the correct thing to do is to 
drop the first and add what you want. I have no experience doing this, but it 
seems logical.


ERXMigrationTable theTable = database.existingTableNamed(“yourTable”);

theTable.dropPrimaryKey(columns);
theTable.setPrimaryKey(columns);

interesting that when I ask WOLips, it comes up with columns (plural). I assume 
you can add a multi column primary key. I have no idea where that would be 
useful. or this implications as a primary key does not want to be a class 
property.

Ted


On Oct 2, 2014, at 5:00 AM, Mark Wardle 
mailto:m...@wardle.org>> wrote:

Dear all,

I need to add a new primary key to a table that already contains data.

Is it possible to use migrations to add this and have the column auto-populated 
with a serial number?

My other plan was to create an integer column and then, in code, iterate 
through the objects manually setting the serial integer, and then later on 
migrating that to a primary key. Would this then break primary key generation 
for newly created objects?

All advice appreciated!

Many thanks,

Mark


--
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or 
m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





___
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/tedpet5%40yahoo.com

This email sent to tedp...@yahoo.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: Primary keys

2014-10-02 Thread Mark Wardle
Thanks Ted, that is interesting. Unfortunately, the existing primary key is 
used in joins from other tables so I think it will need to be a multi-step 
procedure.

Take home message for me is never ever have primary keys with any kind of 
meaning, even if coming from an external reputable third-party because even 
they will decide to change their primary keys in the future.  I’ve not done it 
since but this is from work from years ago so I blame my younger self!

Mark

> On 2 Oct 2014, at 12:01, Theodore Petrosky  wrote:
> 
> if there is already a primary key, then I think the correct thing to do is to 
> drop the first and add what you want. I have no experience doing this, but it 
> seems logical.
> 
> 
> ERXMigrationTable theTable = database.existingTableNamed(“yourTable”);
> 
> theTable.dropPrimaryKey(columns);
> theTable.setPrimaryKey(columns);
> 
> interesting that when I ask WOLips, it comes up with columns (plural). I 
> assume you can add a multi column primary key. I have no idea where that 
> would be useful. or this implications as a primary key does not want to be a 
> class property.
> 
> Ted
> 
> 
> On Oct 2, 2014, at 5:00 AM, Mark Wardle  > wrote:
> 
>> Dear all,
>> 
>> I need to add a new primary key to a table that already contains data. 
>> 
>> Is it possible to use migrations to add this and have the column 
>> auto-populated with a serial number?
>> 
>> My other plan was to create an integer column and then, in code, iterate 
>> through the objects manually setting the serial integer, and then later on 
>> migrating that to a primary key. Would this then break primary key 
>> generation for newly created objects?
>> 
>> All advice appreciated!
>> 
>> Many thanks,
>> 
>> Mark
>> 
>> 
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk  or 
>> m...@wardle.org   Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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/tedpet5%40yahoo.com 
>> 
>> 
>> This email sent to tedp...@yahoo.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: Primary keys

2014-10-02 Thread Theodore Petrosky
if there is already a primary key, then I think the correct thing to do is to 
drop the first and add what you want. I have no experience doing this, but it 
seems logical.


ERXMigrationTable theTable = database.existingTableNamed(“yourTable”);

theTable.dropPrimaryKey(columns);
theTable.setPrimaryKey(columns);

interesting that when I ask WOLips, it comes up with columns (plural). I assume 
you can add a multi column primary key. I have no idea where that would be 
useful. or this implications as a primary key does not want to be a class 
property.

Ted


On Oct 2, 2014, at 5:00 AM, Mark Wardle  wrote:

> Dear all,
> 
> I need to add a new primary key to a table that already contains data. 
> 
> Is it possible to use migrations to add this and have the column 
> auto-populated with a serial number?
> 
> My other plan was to create an integer column and then, in code, iterate 
> through the objects manually setting the serial integer, and then later on 
> migrating that to a primary key. Would this then break primary key generation 
> for newly created objects?
> 
> All advice appreciated!
> 
> Many thanks,
> 
> Mark
> 
> 
> -- 
> Dr. Mark Wardle
> Consultant Neurologist, University Hospital Wales, Cardiff, UK
> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
> Telephone: 02920745274 (secretary) or facsimile: 02920744166
> 
> 
> 
> 
> 
> ___
> 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/tedpet5%40yahoo.com
> 
> This email sent to tedp...@yahoo.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: Primary keys

2014-10-02 Thread Mark Wardle
Thanks Fabian.

Can one use ERXMigration to add a serial column? I don’t think it is a JDBC 
column type? I can create an integer column and then add the serial default 
value in SQL presumably. I suspect there isn’t a database agnostic way to do 
this.

I’ll try that. Thank you again,

Mark

> On 2 Oct 2014, at 10:43, Fabian Peters  wrote:
> 
> Hi Mark,
> 
> For postgresql you could add a column "serial". When the column is added, it 
> is populated with values by postgres. You could then use migration's 
> "setPrimaryKey" and "dropPrimaryKey".
> 
> This is totally untested…
> 
> Fabian
> 
> Am 02.10.2014 um 11:00 schrieb Mark Wardle :
> 
>> Dear all,
>> 
>> I need to add a new primary key to a table that already contains data. 
>> 
>> Is it possible to use migrations to add this and have the column 
>> auto-populated with a serial number?
>> 
>> My other plan was to create an integer column and then, in code, iterate 
>> through the objects manually setting the serial integer, and then later on 
>> migrating that to a primary key. Would this then break primary key 
>> generation for newly created objects?
>> 
>> All advice appreciated!
>> 
>> Many thanks,
>> 
>> Mark
>> 
>> 
>> -- 
>> Dr. Mark Wardle
>> Consultant Neurologist, University Hospital Wales, Cardiff, UK
>> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
>> Telephone: 02920745274 (secretary) or facsimile: 02920744166
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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/lists.fabian%40e-lumo.com
>> 
>> This email sent to lists.fab...@e-lumo.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: Static resources in CSS file while using Linux as dev platform

2014-10-02 Thread CHRISTOPH WICK | i4innovation GmbH, Bonn
Hi Johann, hi list.

Thx again. I missed, that the css and the jpg were in different folders. Now it 
works like a charm :-)

C.U.CW

P.S.: Just out of curiosity: has anybody an answer to my original question? How 
did this work, when Windows was an officially supported platform?
-- 
What are the three enemies of a programmer? Sunlight, oxygen, and the appalling 
roar of the birds.

On 02.10.2014, at 11:20, Johann Werner  wrote:

> Hi Christoph,
> 
> as Ralf said "use a path relative to the css file“ so you should try:
> 
> body {
>   background: url("../gfx/background.jpg") repeat;
> }
> 
> jw
> 
> 
> Am 02.10.2014 um 10:58 schrieb Christoph Wick :
> 
>> Hi Ralf, hi list,
>> 
>> thanks for your answer.
>> 
>> Of course, I'm using wonder.
>> 
>> But it doesn't work the way you suggest.
>> 
>> If I replace
>> 
>>> body {
>>>   background: 
>>> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg")
>>>  repeat;
>>> }
>> 
>> with 
>> 
>>> body {
>>>   background: url("gfx/background.jpg") repeat;
>>> }
>> 
>> the background image is not displayed. CSS's urls need absolute URLs.
>> 
>> The stylesheet itself is a static resource and is linked with
>> 
>>> >> media="screen">
>> 
>> C.U.CW
>> -- 
>> The three great virtues of a programmer are Laziness, Impatience and Hubris. 
>> (Randal Schwartz)
>> 
>> On 02.10.2014, at 10:36, Ralf Schuchardt  wrote:
>> 
>>> When you are using Wonder, you can simply use a path relative to the css 
>>> file in the WebSeverResources directory (e.g. url(gfx/background.jpg) ) and 
>>> it should work in development and deployment.
>>> 
>>> Ralf
>>> 
>>> 
>>> Am 02.Okt. 2014 um 10:17 schrieb CHRISTOPH WICK | i4innovation GmbH, Bonn 
>>> :
>>> 
 Hi List,
 
 I have a question because a colleague of mine wants to test Linux as 
 development platform.
 
 Background:
 ---
 I the css file of OurApp.woa we refer to background images like e.g.
 
 #a-div {
 background: 
 url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg");
 }
 
 To make this working during development on the Mac, I put a softlink from
 
 /MYPATH_TO_ECLIPSE/OUR_APP_PROJECT/build/OurApp.woa --> 
 /Libary/WebServer/Documents/WebObjects/OurApp.woa
 
 This works on the Mac, since the WO-build-in development server somehow 
 scans /Library/WebServer/Documents/ (the default document root for Apache 
 on Mac) during startup and delivers the resources to the browser.
 
 Problem:
 
 Since there is no /Library/WebServer/Documents/ on Linux (default is 
 /var/www/html - at least on Ubuntu), this doesn't work on Linux
 
 Since my colleague doesn't want to create a folder 
 /Library/WebServer/Documents/ (let's call this decision sort of 
 "religious" but nevertheless :-) I was looking for the place where that 
 "/Library/WebServer/Documents/" information came from.
 
 The only place I found, was 
 /PATH_TO_WO_FRAMEWORKS/JavaWebObjects.framework/Resources/WebServerConfig.plist.
  Inside this plist there is an entry 'DocumentRoot = 
 "/Library/WebServer/Documents";'
 
 Now, my colleague could modify the plist entry and everything works fine, 
 but ...
 
 Question:
 -
 Is there any other way to tell the WebObjects development environment to 
 look for the document root than patching the WebServerConfig.plist inside 
 the JavaWebObjects.framework folder?
 
 Side notes:
 ---
 I tried to override the documentRoot() method of my Application class to 
 return the correct path, but it's never called during startup. At least 
 while in  development mode.
 
 I also tried to set the property "application.documentRoot" - same effect. 
 Doesn't work.
 
 Thanks for your help, C.U.CW
 -- 
 What are the three enemies of a programmer? Sunlight, oxygen, and the 
 appalling roar of the birds.
 
 ___
 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/rasc%40gmx.de
 
 This email sent to r...@gmx.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:
>> https://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.com
>> 
>> This email sent to j...@oyosys.com
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help

Re: Primary keys

2014-10-02 Thread Fabian Peters
Hi Mark,

For postgresql you could add a column "serial". When the column is added, it is 
populated with values by postgres. You could then use migration's 
"setPrimaryKey" and "dropPrimaryKey".

This is totally untested…

Fabian

Am 02.10.2014 um 11:00 schrieb Mark Wardle :

> Dear all,
> 
> I need to add a new primary key to a table that already contains data. 
> 
> Is it possible to use migrations to add this and have the column 
> auto-populated with a serial number?
> 
> My other plan was to create an integer column and then, in code, iterate 
> through the objects manually setting the serial integer, and then later on 
> migrating that to a primary key. Would this then break primary key generation 
> for newly created objects?
> 
> All advice appreciated!
> 
> Many thanks,
> 
> Mark
> 
> 
> -- 
> Dr. Mark Wardle
> Consultant Neurologist, University Hospital Wales, Cardiff, UK
> Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
> Telephone: 02920745274 (secretary) or facsimile: 02920744166
> 
> 
> 
> 
> 
> ___
> 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/lists.fabian%40e-lumo.com
> 
> This email sent to lists.fab...@e-lumo.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: Static resources in CSS file while using Linux as dev platform

2014-10-02 Thread Johann Werner
Hi Christoph,

as Ralf said "use a path relative to the css file“ so you should try:

body {
   background: url("../gfx/background.jpg") repeat;
}

jw


Am 02.10.2014 um 10:58 schrieb Christoph Wick :

> Hi Ralf, hi list,
> 
> thanks for your answer.
> 
> Of course, I'm using wonder.
> 
> But it doesn't work the way you suggest.
> 
> If I replace
> 
>> body {
>>background: 
>> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg") 
>> repeat;
>> }
> 
> with 
> 
>> body {
>>background: url("gfx/background.jpg") repeat;
>> }
> 
> the background image is not displayed. CSS's urls need absolute URLs.
> 
> The stylesheet itself is a static resource and is linked with
> 
>> > media="screen">
> 
> C.U.CW
> -- 
> The three great virtues of a programmer are Laziness, Impatience and Hubris. 
> (Randal Schwartz)
> 
> On 02.10.2014, at 10:36, Ralf Schuchardt  wrote:
> 
>> When you are using Wonder, you can simply use a path relative to the css 
>> file in the WebSeverResources directory (e.g. url(gfx/background.jpg) ) and 
>> it should work in development and deployment.
>> 
>> Ralf
>> 
>> 
>> Am 02.Okt. 2014 um 10:17 schrieb CHRISTOPH WICK | i4innovation GmbH, Bonn 
>> :
>> 
>>> Hi List,
>>> 
>>> I have a question because a colleague of mine wants to test Linux as 
>>> development platform.
>>> 
>>> Background:
>>> ---
>>> I the css file of OurApp.woa we refer to background images like e.g.
>>> 
>>> #a-div {
>>>  background: 
>>> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg");
>>> }
>>> 
>>> To make this working during development on the Mac, I put a softlink from
>>> 
>>> /MYPATH_TO_ECLIPSE/OUR_APP_PROJECT/build/OurApp.woa --> 
>>> /Libary/WebServer/Documents/WebObjects/OurApp.woa
>>> 
>>> This works on the Mac, since the WO-build-in development server somehow 
>>> scans /Library/WebServer/Documents/ (the default document root for Apache 
>>> on Mac) during startup and delivers the resources to the browser.
>>> 
>>> Problem:
>>> 
>>> Since there is no /Library/WebServer/Documents/ on Linux (default is 
>>> /var/www/html - at least on Ubuntu), this doesn't work on Linux
>>> 
>>> Since my colleague doesn't want to create a folder 
>>> /Library/WebServer/Documents/ (let's call this decision sort of "religious" 
>>> but nevertheless :-) I was looking for the place where that 
>>> "/Library/WebServer/Documents/"  information came from.
>>> 
>>> The only place I found, was 
>>> /PATH_TO_WO_FRAMEWORKS/JavaWebObjects.framework/Resources/WebServerConfig.plist.
>>>  Inside this plist there is an entry 'DocumentRoot = 
>>> "/Library/WebServer/Documents";'
>>> 
>>> Now, my colleague could modify the plist entry and everything works fine, 
>>> but ...
>>> 
>>> Question:
>>> -
>>> Is there any other way to tell the WebObjects development environment to 
>>> look for the document root than patching the WebServerConfig.plist inside 
>>> the JavaWebObjects.framework folder?
>>> 
>>> Side notes:
>>> ---
>>> I tried to override the documentRoot() method of my Application class to 
>>> return the correct path, but it's never called during startup. At least 
>>> while in  development mode.
>>> 
>>> I also tried to set the property "application.documentRoot" - same effect. 
>>> Doesn't work.
>>> 
>>> Thanks for your help, C.U.CW
>>> -- 
>>> What are the three enemies of a programmer? Sunlight, oxygen, and the 
>>> appalling roar of the birds.
>>> 
>>> ___
>>> 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/rasc%40gmx.de
>>> 
>>> This email sent to r...@gmx.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:
> https://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.com
> 
> This email sent to j...@oyosys.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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

Primary keys

2014-10-02 Thread Mark Wardle
Dear all,

I need to add a new primary key to a table that already contains data. 

Is it possible to use migrations to add this and have the column auto-populated 
with a serial number?

My other plan was to create an integer column and then, in code, iterate 
through the objects manually setting the serial integer, and then later on 
migrating that to a primary key. Would this then break primary key generation 
for newly created objects?

All advice appreciated!

Many thanks,

Mark


-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: mark.war...@wales.nhs.uk or m...@wardle.org  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 ___
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: Static resources in CSS file while using Linux as dev platform

2014-10-02 Thread Christoph Wick
Hi Ralf, hi list,

thanks for your answer.

Of course, I'm using wonder.

But it doesn't work the way you suggest.

If I replace

> body {
> background: 
> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg") 
> repeat;
> }

with 

> body {
> background: url("gfx/background.jpg") repeat;
> }

the background image is not displayed. CSS's urls need absolute URLs.

The stylesheet itself is a static resource and is linked with

>  media="screen">

C.U.CW
-- 
The three great virtues of a programmer are Laziness, Impatience and Hubris. 
(Randal Schwartz)

On 02.10.2014, at 10:36, Ralf Schuchardt  wrote:

> When you are using Wonder, you can simply use a path relative to the css file 
> in the WebSeverResources directory (e.g. url(gfx/background.jpg) ) and it 
> should work in development and deployment.
> 
> Ralf
> 
> 
> Am 02.Okt. 2014 um 10:17 schrieb CHRISTOPH WICK | i4innovation GmbH, Bonn 
> :
> 
>> Hi List,
>> 
>> I have a question because a colleague of mine wants to test Linux as 
>> development platform.
>> 
>> Background:
>> ---
>> I the css file of OurApp.woa we refer to background images like e.g.
>> 
>> #a-div {
>>   background: 
>> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg");
>> }
>> 
>> To make this working during development on the Mac, I put a softlink from
>> 
>> /MYPATH_TO_ECLIPSE/OUR_APP_PROJECT/build/OurApp.woa --> 
>> /Libary/WebServer/Documents/WebObjects/OurApp.woa
>> 
>> This works on the Mac, since the WO-build-in development server somehow 
>> scans /Library/WebServer/Documents/ (the default document root for Apache on 
>> Mac) during startup and delivers the resources to the browser.
>> 
>> Problem:
>> 
>> Since there is no /Library/WebServer/Documents/ on Linux (default is 
>> /var/www/html - at least on Ubuntu), this doesn't work on Linux
>> 
>> Since my colleague doesn't want to create a folder 
>> /Library/WebServer/Documents/ (let's call this decision sort of "religious" 
>> but nevertheless :-) I was looking for the place where that 
>> "/Library/WebServer/Documents/"   information came from.
>> 
>> The only place I found, was 
>> /PATH_TO_WO_FRAMEWORKS/JavaWebObjects.framework/Resources/WebServerConfig.plist.
>>  Inside this plist there is an entry 'DocumentRoot = 
>> "/Library/WebServer/Documents";'
>> 
>> Now, my colleague could modify the plist entry and everything works fine, 
>> but ...
>> 
>> Question:
>> -
>> Is there any other way to tell the WebObjects development environment to 
>> look for the document root than patching the WebServerConfig.plist inside 
>> the JavaWebObjects.framework folder?
>> 
>> Side notes:
>> ---
>> I tried to override the documentRoot() method of my Application class to 
>> return the correct path, but it's never called during startup. At least 
>> while in  development mode.
>> 
>> I also tried to set the property "application.documentRoot" - same effect. 
>> Doesn't work.
>> 
>> Thanks for your help, C.U.CW
>> -- 
>> What are the three enemies of a programmer? Sunlight, oxygen, and the 
>> appalling roar of the birds.
>> 
>> ___
>> 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/rasc%40gmx.de
>> 
>> This email sent to r...@gmx.de
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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: Static resources in CSS file while using Linux as dev platform

2014-10-02 Thread Ralf Schuchardt
When you are using Wonder, you can simply use a path relative to the css file 
in the WebSeverResources directory (e.g. url(gfx/background.jpg) ) and it 
should work in development and deployment.

Ralf


Am 02.Okt. 2014 um 10:17 schrieb CHRISTOPH WICK | i4innovation GmbH, Bonn 
:

> Hi List,
> 
> I have a question because a colleague of mine wants to test Linux as 
> development platform.
> 
> Background:
> ---
> I the css file of OurApp.woa we refer to background images like e.g.
> 
> #a-div {
>background: 
> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg");
> }
> 
> To make this working during development on the Mac, I put a softlink from
> 
> /MYPATH_TO_ECLIPSE/OUR_APP_PROJECT/build/OurApp.woa --> 
> /Libary/WebServer/Documents/WebObjects/OurApp.woa
> 
> This works on the Mac, since the WO-build-in development server somehow scans 
> /Library/WebServer/Documents/ (the default document root for Apache on Mac) 
> during startup and delivers the resources to the browser.
> 
> Problem:
> 
> Since there is no /Library/WebServer/Documents/ on Linux (default is 
> /var/www/html - at least on Ubuntu), this doesn't work on Linux
> 
> Since my colleague doesn't want to create a folder 
> /Library/WebServer/Documents/ (let's call this decision sort of "religious" 
> but nevertheless :-) I was looking for the place where that 
> "/Library/WebServer/Documents/"information came from.
> 
> The only place I found, was 
> /PATH_TO_WO_FRAMEWORKS/JavaWebObjects.framework/Resources/WebServerConfig.plist.
>  Inside this plist there is an entry 'DocumentRoot = 
> "/Library/WebServer/Documents";'
> 
> Now, my colleague could modify the plist entry and everything works fine, but 
> ...
> 
> Question:
> -
> Is there any other way to tell the WebObjects development environment to look 
> for the document root than patching the WebServerConfig.plist inside the 
> JavaWebObjects.framework folder?
> 
> Side notes:
> ---
> I tried to override the documentRoot() method of my Application class to 
> return the correct path, but it's never called during startup. At least while 
> in  development mode.
> 
> I also tried to set the property "application.documentRoot" - same effect. 
> Doesn't work.
> 
> Thanks for your help, C.U.CW
> -- 
> What are the three enemies of a programmer? Sunlight, oxygen, and the 
> appalling roar of the birds.
> 
> ___
> 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/rasc%40gmx.de
> 
> This email sent to r...@gmx.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Static resources in CSS file while using Linux as dev platform

2014-10-02 Thread CHRISTOPH WICK | i4innovation GmbH, Bonn
Hi List,

I have a question because a colleague of mine wants to test Linux as 
development platform.

Background:
---
I the css file of OurApp.woa we refer to background images like e.g.

#a-div {
background: 
url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg");
}

To make this working during development on the Mac, I put a softlink from

/MYPATH_TO_ECLIPSE/OUR_APP_PROJECT/build/OurApp.woa --> 
/Libary/WebServer/Documents/WebObjects/OurApp.woa

This works on the Mac, since the WO-build-in development server somehow scans 
/Library/WebServer/Documents/ (the default document root for Apache on Mac) 
during startup and delivers the resources to the browser.

Problem:

Since there is no /Library/WebServer/Documents/ on Linux (default is 
/var/www/html - at least on Ubuntu), this doesn't work on Linux

Since my colleague doesn't want to create a folder 
/Library/WebServer/Documents/ (let's call this decision sort of "religious" but 
nevertheless :-) I was looking for the place where that 
"/Library/WebServer/Documents/"  information came from.

The only place I found, was 
/PATH_TO_WO_FRAMEWORKS/JavaWebObjects.framework/Resources/WebServerConfig.plist.
 Inside this plist there is an entry 'DocumentRoot = 
"/Library/WebServer/Documents";'

Now, my colleague could modify the plist entry and everything works fine, but 
...

Question:
-
Is there any other way to tell the WebObjects development environment to look 
for the document root than patching the WebServerConfig.plist inside the 
JavaWebObjects.framework folder?

Side notes:
---
I tried to override the documentRoot() method of my Application class to return 
the correct path, but it's never called during startup. At least while in  
development mode.

I also tried to set the property "application.documentRoot" - same effect. 
Doesn't work.

Thanks for your help, C.U.CW
-- 
What are the three enemies of a programmer? Sunlight, oxygen, and the appalling 
roar of the birds.



signature.asc
Description: Message signed with OpenPGP using GPGMail
 ___
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