Cleaned up more stuff.

Monotone-Parent: 592f1af929791fbdc8780afe81d8021d7c6fdd73
Monotone-Revision: 843d1025bab5d142155d7ded15c9de17d3b599e6

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2010-07-29T18:40:21
Monotone-Branch: ca.inverse.sope
pull/4/head
Ludovic Marcotte 2010-07-29 18:40:21 +00:00
parent d251060523
commit 97280a38bd
475 changed files with 7 additions and 29364 deletions

View File

@ -0,0 +1,7 @@
// Note: do not remove, used by ../configure
#include <stdio.h>
int main(int argc, char **argv) {
return 0;
}

View File

@ -1,13 +0,0 @@
# $Id: GNUmakefile 1 2004-08-20 10:08:27Z znek $
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = woslash
woslash_OBJC_FILES = \
woslash.m \
SlashDotStory.m \
woslash_TOOL_LIBS += -lNGObjWeb -lWOXML
include $(GNUSTEP_MAKEFILES)/tool.make

View File

@ -1,110 +0,0 @@
#include <Foundation/NSObject.h>
@class NSString, NSCalendarDate;
@interface SlashDotStory : NSObject
{
NSString *title;
NSString *url;
NSCalendarDate *time;
NSString *author;
NSString *department;
NSString *topic;
unsigned numberOfComments;
NSString *section;
NSString *image;
}
@end
#import <Foundation/Foundation.h>
@implementation SlashDotStory
- (void)setTitle:(NSString *)_value {
ASSIGN(self->title, _value);
}
- (NSString *)title {
return self->title;
}
- (void)setUrl:(NSString *)_value {
ASSIGN(self->url, _value);
}
- (NSString *)url {
return self->url;
}
- (void)setTime:(NSCalendarDate *)_value {
if (![_value isKindOfClass:[NSCalendarDate class]]) {
NSString *svalue;
svalue = [[_value description] stringByAppendingString:@" GMT"];
_value = [NSCalendarDate dateWithString:svalue
calendarFormat:@"%Y-%m-%d %H:%M:%S %Z"];
}
ASSIGN(self->time, _value);
}
- (NSCalendarDate *)time {
return self->time;
}
- (void)setAuthor:(NSString *)_value {
ASSIGN(self->author, _value);
}
- (NSString *)author {
return self->author;
}
- (void)setDepartment:(NSString *)_value {
ASSIGN(self->department, _value);
}
- (NSString *)department {
return self->department;
}
- (void)setTopic:(NSString *)_topic {
ASSIGN(self->topic, _topic);
}
- (NSString *)topic {
return self->topic;
}
- (void)setNumberOfComments:(unsigned)_count {
self->numberOfComments = _count;
}
- (unsigned)numberOfComments {
return self->numberOfComments;
}
- (void)setSection:(NSString *)_section {
ASSIGN(self->section, _section);
}
- (NSString *)section {
return self->section;
}
- (void)setImage:(NSString *)_image {
ASSIGN(self->image, _image);
}
- (NSString *)image {
return self->image;
}
/* description */
- (NSString *)description {
NSMutableString *s;
s = [NSMutableString stringWithCapacity:200];
[s appendFormat:@"<%@[0x%p]: author=%@ topic=%@ title='%@'>",
NSStringFromClass([self class]), self,
[self topic],
[self title],
[self author]];
return s;
}
@end /* SlashDotStory */

View File

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<model>
<entity xmlTag="backslash" name="NSMutableDictionary">
<property xmlTag="story" name="stories" forceList="YES"/>
</entity>
<entity xmlTag="story" name="SlashDotStory">
<property xmlTag="title" name="title"/>
<property xmlTag="url" name="url"/>
<property xmlTag="time" name="time"/>
<property xmlTag="author" name="author"/>
<property xmlTag="department" name="department"/>
<property xmlTag="topic" name="topic"/>
<property xmlTag="comments" name="numberOfComments"/>
<property xmlTag="section" name="section"/>
<property xmlTag="image" name="image"/>
</entity>
</model>

View File

@ -1,76 +0,0 @@
#import <Foundation/Foundation.h>
#import <NGObjWeb/NGObjWeb.h>
#import <WOXML/WOXMLDecoder.h>
#import <DOM/DOMSaxBuilder.h>
#import <DOM/DOMXMLOutputter.h>
static void test(void) {
WOHTTPConnection *http;
WORequest *request;
WOResponse *response;
NSData *content;
http = [[WOHTTPConnection alloc] initWithHost:@"slashdot.org" onPort:80];
AUTORELEASE(http);
request = [[WORequest alloc] initWithMethod:@"GET"
uri:@"/slashdot.xml"
httpVersion:@"HTTP/1.0"
headers:nil
content:nil
userInfo:nil];
AUTORELEASE(request);
if (![http sendRequest:request]) {
NSLog(@"couldn't send HTTP request");
return;
}
if ((response = [http readResponse]) == nil) {
NSLog(@"couldn't read HTTP response");
return;
}
content = [response content];
/* WOXMLDecoder */
if ([content length] > 0) {
WOXMLDecoder *decoder;
id result;
decoder = [WOXMLDecoder xmlDecoderWithMapping:@"file://slashdot.xmlmodel"];
result = [decoder decodeRootObjectFromData:content];
NSLog(@"./:\n %@", result);
}
#if 0
/* DOM */
{
id doc;
id builder, outputter;
builder = [[[DOMSaxBuilder alloc] init] autorelease];
outputter = [[[DOMXMLOutputter alloc] init] autorelease];
doc = [builder buildFromData:content];
NSLog(@"parsed: %@", doc);
[outputter outputDocument:doc to:nil];
}
#endif
}
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
pool = [[NSAutoreleasePool alloc] init];
test();
RELEASE(pool);
exit(0);
return 0;
}

View File

@ -1,194 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOApplication.h>
@interface Application : WOApplication
@end
#include "NSString+BasicAuth.h"
#include <NGObjWeb/NGObjWeb.h>
#include "common.h"
@interface NSString(ValidSessionID)
- (NSString *)asValidSessionIDString;
@end
@implementation NSString(ValidSessionID)
- (NSString *)asValidSessionIDString {
unsigned len;
if ((len = [self length]) == 0)
return nil;
else if (len == 18)
return [[self copy] autorelease];
else if (len > 18)
return [self substringToIndex:18];
else {
/* increase string length .. */
NSMutableString *sid;
sid = [[self mutableCopy] autorelease];
while ([sid length] < 18)
[sid appendString:@"X"];
return sid;
}
}
@end /* NSString(ValidSessionID) */
@implementation Application
- (id)init {
if ((self = [super init])) {
WORequestHandler *rh;
rh = [[NSClassFromString(@"OWViewRequestHandler") alloc] init];
[self setDefaultRequestHandler:rh];
[self registerRequestHandler:rh
forKey:[WOApplication componentRequestHandlerKey]];
RELEASE(rh); rh = nil;
}
return self;
}
/* auth check */
- (BOOL)isValidAuthorization:(NSString *)_credentials
inContext:(WOContext *)_ctx
{
NSString *login, *pwd;
login = [_credentials loginOfHTTPBasicAuthorizationValue];
pwd = [_credentials passwordOfHTTPBasicAuthorizationValue];
[self debugWithFormat:@"login '%@', pwd=%s", login, [pwd length]?"yes":"no"];
return [login length] > 0;
}
- (NSString *)sessionIDForAuthorization:(NSString *)_credentials
inContext:(WOContext *)_ctx
{
return [[_credentials loginOfHTTPBasicAuthorizationValue]
asValidSessionIDString];
}
/* session callbacks */
- (WOSession *)createSessionForRequest:(WORequest *)_request {
[self debugWithFormat:@"creating session ..."];
return [super createSessionForRequest:_request];
}
- (WOResponse *)handleSessionCreationErrorInContext:(WOContext *)_ctx {
/* a session could not be created */
WOResponse *response;
NSString *header;
header = [NSString stringWithFormat:@"basic realm=\"%@\"", [self name]];
response = [_ctx response];
[response setStatus:401 /* unauthorized */];
[response setContent:[NSData data]];
[response setHeader:header forKey:@"www-authenticate"];
return response;
}
- (WOResponse *)handleSessionRestorationErrorInContext:(WOContext *)_ctx {
/*
A session could not be restored, an ID is available
This is too late to create a session, so use the thing below ...
*/
return [super handleSessionRestorationErrorInContext:_ctx];
}
- (WOSession *)restoreSessionWithID:(NSString *)_sid
inContext:(WOContext *)_ctx
{
WOSession *sn;
if ([_sid length] == 0)
return nil;
if ((sn = [super restoreSessionWithID:_sid inContext:_ctx]))
return sn;
/* have a valid? sid, so create a session ... */
[self debugWithFormat:@"couldn't restore sid '%@', create a new session ..",
_sid];
return [self createSessionForRequest:[_ctx request]];
}
/* generating session IDs */
- (NSString *)sessionIDFromRequest:(WORequest *)_request {
/* session id must be 18 chars long for snsd to work ! */
NSString *sid;
if ((sid = [super sessionIDFromRequest:_request]))
return sid;
/* if no 'regular' session ID is provided, use authorization header .. */
if ((sid = [_request headerForKey:@"authorization"])) {
if ([self isValidAuthorization:sid inContext:nil]) {
sid = [self sessionIDForAuthorization:sid inContext:nil];
[self debugWithFormat:@"got sid from auth: '%@'", sid];
return sid;
}
else {
[self logWithFormat:@"got invalid auth: '%@'", sid];
sid = nil;
}
}
return nil;
}
- (NSString *)createSessionIDForSession:(WOSession *)_session {
/* session id must be 18 chars long for snsd to work ! */
NSString *sid;
WORequest *request;
request = [[self context] request];
if ((sid = [request headerForKey:@"authorization"])) {
if ([self isValidAuthorization:sid inContext:nil]) {
sid = [self sessionIDForAuthorization:sid inContext:[self context]];
[self debugWithFormat:@"got sid from auth: '%@'", sid];
return sid;
}
else {
[self logWithFormat:@"got invalid auth: '%@'", sid];
sid = nil;
}
}
return nil;
}
@end /* Application */
int main(int argc, char **argv) {
WOApplicationMain(@"Application", argc, (void*)argv);
exit(0);
return 0;
}

View File

@ -1,16 +0,0 @@
# GNUstep makefile
include $(GNUSTEP_MAKEFILES)/common.make
WOAPP_NAME = BasicAuthSn
BasicAuthSn_OBJC_FILES = \
Application.m \
Main.m \
NSString+BasicAuth.m \
BasicAuthSn_COMPONENTS += Main.wo
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/woapp.make
-include GNUmakefile.postamble

View File

@ -1,42 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@interface Main : WOComponent
{
unsigned clickCount;
}
@end
@implementation Main
- (unsigned)clickCount {
return self->clickCount;
}
- (id)click {
self->clickCount++;
return nil;
}
@end /* Main */

View File

@ -1,10 +0,0 @@
<html>
<head><title>BasicAuthTest</title></head>
<body bgcolor='white'>
SessionID: <WEBOBJECT NAME="SID"></WEBOBJECT><br />
ClickCount: <WEBOBJECT NAME="ClickCount"></WEBOBJECT><br />
<WEBOBJECT NAME="Click"></WEBOBJECT>
</body>
</html>

View File

@ -1,13 +0,0 @@
// $Id: Main.wod,v 1.1 2004/06/08 11:08:23 helge Exp $
ClickCount: WOString {
value = clickCount;
}
SID: WOString {
value = session.sessionID;
}
Click: WOHyperlink {
action = click;
string = "click";
}

View File

@ -1,34 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef __NSString_BasicAuth_H__
#define __NSString_BasicAuth_H__
#import <Foundation/NSString.h>
@interface NSString(BasicAuth)
- (BOOL)isHTTPBasicAuthorizationValue;
- (NSString *)decodedHTTPBasicAuthorizationValue;
- (NSString *)loginOfHTTPBasicAuthorizationValue;
- (NSString *)passwordOfHTTPBasicAuthorizationValue;
@end
#endif /* __NSString_BasicAuth_H__ */

View File

@ -1,67 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "NSString+BasicAuth.h"
#include <NGExtensions/NGBase64Coding.h>
#include "common.h"
@implementation NSString(BasicAuth)
/* eg: authorization: "basic aGVsZ2U6aGVsZ2VoZWxnZQ==" */
- (BOOL)isHTTPBasicAuthorizationValue {
return [self hasPrefix:@"basic"];
}
- (NSString *)decodedHTTPBasicAuthorizationValue {
NSRange r;
NSString *s;
r = [self rangeOfString:@" " options:NSBackwardsSearch];
if (r.length == 0)
return nil;
s = [self substringFromIndex:(r.location + r.length)];
return [s stringByDecodingBase64];
}
- (NSString *)loginOfHTTPBasicAuthorizationValue {
NSString *s;
NSRange r;
if ((s = [self decodedHTTPBasicAuthorizationValue]) == nil)
return nil;
if ((r = [s rangeOfString:@":"]).length == 0)
return nil;
return [s substringToIndex:r.location];
}
- (NSString *)passwordOfHTTPBasicAuthorizationValue {
NSString *s;
NSRange r;
if ((s = [self decodedHTTPBasicAuthorizationValue]) == nil)
return nil;
if ((r = [s rangeOfString:@":"]).length == 0)
return nil;
return [s substringFromIndex:(r.location + r.length)];
}
@end /* NSString(BasicAuth) */

View File

@ -1,18 +0,0 @@
Session's bound to basic-authentication ...
States
a) auth is invalid
b) auth is valid, session is available
c) auth is valid, session is missing
What is called:
- handleSessionCreationErrorInContext:
-> is called, if no authorization header was provided, so that session-id
generation failed
- handleSessionRestorationErrorInContext:
-> is called if an authorization header is present, but the session couldn't
be found

View File

@ -1,22 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/Foundation.h>

View File

@ -1,482 +0,0 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -1,18 +0,0 @@
2006-04-02 Philippe Laval <philippe.laval@free.fr>
* BasicAuthSession/NSString+BasicAuth.m: replaced usage of non-Cocoa
-indexOfString: with -rangeOfString:
2004-02-29 Helge Hess <helge.hess@opengroupware.org>
* added the HelloWorld application example - the simplest application
possible ;-)
2003-10-15 Helge Hess <helge.hess@skyrix.com>
* added "davpropget" example - useful for fetching DAV properties from
a DAV server and an example which demonstrates the usage of
WOHTTPConnection
* created ChangeLog

View File

@ -1,25 +0,0 @@
2005-10-03 Helge Hess <helge.hess@opengroupware.org>
* MonthPage: highlight days with articles
* MonthPage.wo/MonthPage.woo: added missing selector for kv qualifier
2005-08-06 Helge Hess <helge.hess@opengroupware.org>
* added ability to save/rollback changes in managed object context
2005-08-05 Helge Hess <helge.hess@opengroupware.org>
* changed to use WODisplayGroup and .woo to access database
2005-08-03 Helge Hess <helge.hess@opengroupware.org>
* moved reusable objects to sope-core/EOCoreData
* added EOCoreDataSource
* added classes to map EOControl objects to CoreData ones
2005-08-01 Helge Hess <helge.hess@opengroupware.org>
* started CoreData demo

View File

@ -1,12 +0,0 @@
# SLog config
<LocationMatch "^/CoreDataBlog*">
SetHandler ngobjweb-adaptor
SetAppPort 20000
</LocationMatch>
<LocationMatch "^/CoreDataBlog.woa/WebServerResources/*">
SetHandler ngobjweb-adaptor
SetAppPort 20000
</LocationMatch>

View File

@ -1,88 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
Copyright (C) 2005 by Scott Stevenson
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "WOCoreDataApplication.h"
@interface CoreDataBlog : WOCoreDataApplication
{
}
@end
#include "common.h"
@implementation CoreDataBlog
- (id)init {
if ((self = [super init]) != nil) {
[self logWithFormat:@"Store coordinator: %@",
[self defaultPersistentStoreType]];
}
return self;
}
- (NSString *)applicationSupportFolder {
// TODO: simplify that
unsigned char path[1024];
NSString *p;
FSRef foundRef;
OSErr err;
err = FSFindFolder(kUserDomain, kApplicationSupportFolderType,
kDontCreateFolder, &foundRef);
if (err != noErr) {
[self errorWithFormat:@"Can't find application support folder."];
return nil;
}
FSRefMakePath(&foundRef, path, sizeof(path));
p = [NSString stringWithUTF8String:(char *)path]; // TODO: is UTF-8 ok?
p = [p stringByAppendingPathComponent:@"BlogDemo"];
return p;
}
- (NSURL *)defaultPersistentStoreURL {
NSString *s;
s = @"BlogDemo.xml";
s = [[self applicationSupportFolder] stringByAppendingPathComponent:s];
return [NSURL fileURLWithPath:s];
}
@end /* CoreDataBlog */
/* starting the app */
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
WOApplicationMain(@"CoreDataBlog", argc, (void*)argv);
[pool release];
return 0;
}

View File

@ -1,4 +0,0 @@
{
WOComponentLoadWOOFiles = YES;
WOKeyPathAssociationClass = WOKeyPathAssociationSystemKVC;
}

View File

@ -1,32 +0,0 @@
# GNUstep makefile
include ../../../config.make
include $(GNUSTEP_MAKEFILES)/common.make
WOAPP_NAME = CoreDataBlog
CoreDataBlog_OBJC_FILES += \
WOCoreDataApplication.m \
WOSession+CoreData.m \
\
CoreDataBlog.m \
Session.m \
Main.m \
\
MonthPage.m \
RSS10.m \
CoreDataBlog_COMPONENTS += \
Main.wo \
MonthPage.wo \
RSS10.wo
CoreDataBlog_COREDATA_MODELS += \
BlogDemo_DataModel.xcdatamodel
CoreDataBlog_RESOURCE_FILES += Defaults.plist
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/woapp.make
-include GNUmakefile.postamble

View File

@ -1,17 +0,0 @@
# compilation targets
compile-coredata-models :: $($(WOAPP_NAME)_MOM_FILES)
clean ::
rm -f $(patsubst %.xcdatamodel,%.mom,$($(WOAPP_NAME)_COREDATA_MODELS))
# this is triggered by woapp.make
woapp-resource-files :: compile-coredata-models
MOMC="/Library/Application Support/Apple/Developer Tools/Plug-ins/XDCoreDataModel.xdplugin/Contents/Resources/momc"
# rule for compilation of CoreData models
%.mom :: %.xcdatamodel
$(MOMC) $< $@

View File

@ -1,62 +0,0 @@
# compile settings
# Note: a lot of this stuff is only necessary for 'inline compilation', that is
# compiling the sample without having SOPE installed in advance.
SOPE_ROOT=../../..
# CoreData files
$(WOAPP_NAME)_MOM_FILES += \
$(patsubst %.xcdatamodel,%.mom,$($(WOAPP_NAME)_COREDATA_MODELS))
$(WOAPP_NAME)_RESOURCE_FILES += \
$($(WOAPP_NAME)_MOM_FILES)
# static references required for Mach linker
ADDITIONAL_TOOL_LIBS += \
-framework CoreData \
-framework CoreServices
ifneq ($(frameworks),yes)
ADDITIONAL_TOOL_LIBS += \
-lEOCoreData \
-lNGExtensions \
-lEOControl \
-lDOM -lXmlRpc -lSaxObjC
else
ADDITIONAL_TOOL_LIBS += \
-framework NGExtensions \
-framework EOCoreData \
-framework EOControl \
-framework XmlRpc -framework DOM -framework SaxObjC
endif
# library/framework search pathes
DEP_DIRS = \
$(SOPE_ROOT)/sope-appserver/NGObjWeb \
$(SOPE_ROOT)/sope-mime \
$(SOPE_ROOT)/sope-mime/NGMail \
$(SOPE_ROOT)/sope-core/EOCoreData \
$(SOPE_ROOT)/sope-core/NGStreams \
$(SOPE_ROOT)/sope-core/NGExtensions \
$(SOPE_ROOT)/sope-core/EOControl \
$(SOPE_ROOT)/sope-xml/DOM \
$(SOPE_ROOT)/sope-xml/XmlRpc \
$(SOPE_ROOT)/sope-xml/SaxObjC
ifneq ($(frameworks),yes)
ADDITIONAL_LIB_DIRS += \
$(foreach dir,$(DEP_DIRS),\
-L$(GNUSTEP_BUILD_DIR)/$(dir)/$(GNUSTEP_OBJ_DIR_NAME))
else
ADDITIONAL_LIB_DIRS += \
$(foreach dir,$(DEP_DIRS),-F$(GNUSTEP_BUILD_DIR)/$(dir))
endif
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib

View File

@ -1,80 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray;
@interface Main : WOComponent
{
}
@end
#include "WOSession+CoreData.h"
#include "common.h"
@implementation Main
- (id)initWithContext:(id)_ctx {
if ((self = [super initWithContext:_ctx])) {
}
return self;
}
- (void)dealloc {
[super dealloc];
}
/* accessors */
/* actions */
- (id)selectPost {
[[self valueForKey:@"postDisplayGroup"]
selectObject:[self valueForKey:@"post"]];
#if 0 // this is not a detail ds
[[self valueForKey:@"authorDisplayGroup"]
setMasterObject:[self valueForKey:@"post"]];
#endif
return nil;
}
- (id)saveChanges {
NSError *error;
if (![[[self session] defaultManagedObjectContext] save:&error]) {
// TODO: improve error handling
[self errorWithFormat:@"Failed to save: %@", error];
}
return nil /* stay on page */;
}
- (id)rollback {
[[[self session] defaultManagedObjectContext] rollback];
// TODO: this does not refresh the datasources!
return nil /* stay on page */;
}
@end /* Main */

View File

@ -1,97 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SOPE CoreData Test</title>
</head>
<body>
<#PostForm>
<table border="0" width="100%">
<tr>
<td valign="top" width="30%">
<fieldset style="height: 400px;">
<legend><#PostCount/> Posts</legend>
<#Posts>
<#IsPostSelected><b><#PostTitle/></b></#IsPostSelected>
<#IsPostNotSelected>
<#PostSelectLink><#PostTitle/></#PostSelectLink>
</#IsPostNotSelected>
<br />
</#Posts>
</fieldset>
<#AddPost >add</#AddPost> |
<#DeletePost>delete</#DeletePost> |
<#RefetchPosts>reload</#RefetchPosts>
</td>
<td valign="top">
<fieldset style="height: 400px;">
<legend>Post: <#SelectedPostTitle/></legend>
<table border="0" width="100%" cellspacing="4">
<tr>
<td width="25%" valign="top">Title</td>
<td valign="top">
<#TitleEditField/>
</td>
</tr>
<tr>
<td width="25%" valign="top">Author</td>
<td valign="top">
<#AuthorEditField/>
</td>
</tr>
<tr>
<td width="25%" valign="top">Topic</td>
<td valign="top">
<#TopicEditField/>
</td>
</tr>
<tr>
<td valign="top" colspan="2">Body</td>
</tr>
<tr>
<td valign="top" colspan="2">
<#BodyEditField/>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<#Submit/>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<#HasChanges>
<hr />
<#SaveChanges/>
<#Rollback/>
<i>
(<#InsertedCount/> inserted,
<#UpdatedCount/> updated,
<#DeletedCount/> deleted)
</i>
</#HasChanges>
</#PostForm>
<hr />
<small>
Ctx: <#Test/><br />
<#Entities>
<#Entity/><br />
</#Entities>
<br />
Attr: <#Attr/>
</small>
<hr/>
<address
><a href="mailto:helge.hess@opengroupware.org">Helge Hess</a></address>
</body>
</html>

View File

@ -1,125 +0,0 @@
/* bind template to controller */
Test: WOString {
value = session.defaultManagedObjectContext;
}
Entities: WORepetition {
list = session.defaultManagedObjectContext.persistentStoreCoordinator.managedObjectModel.entities;
item = item;
}
Entity: WOString {
value = item.name;
}
Attr: WOString {
value = session.defaultManagedObjectContext.persistentStoreCoordinator.managedObjectModel.entitiesByName.Post.propertiesByName.title;
}
/* real content */
PostCount: WOString {
value = postDisplayGroup.allObjects.@count;
}
Posts: WORepetition {
list = postDisplayGroup.displayedObjects;
item = post;
}
PostSelectLink: WOHyperlink {
action = selectPost;
}
PostTitle: WOString {
value = post.title;
valueWhenEmpty = "[no title]";
}
IsPostSelected: WOConditional {
condition = postDisplayGroup.selectedObject;
value = post;
}
IsPostNotSelected: WOConditional {
condition = postDisplayGroup.selectedObject;
value = post;
negate = YES;
}
// form
PostForm: WOForm {
}
SelectedPostTitle: WOString {
value = postDisplayGroup.selectedObject.title;
}
TitleEditField: WOTextField {
value = postDisplayGroup.selectedObject.title;
style = "width: 100%;";
}
AuthorEditField: WOPopUpButton {
list = authorDisplayGroup.allObjects;
item = author;
string = author.name;
selection = postDisplayGroup.selectedObject.author;
style = "width: 100%;";
}
TopicEditField: WOPopUpButton {
list = topicDisplayGroup.allObjects;
item = topic;
string = topic.title;
selection = postDisplayGroup.selectedObject.topic;
style = "width: 100%;";
}
BodyEditField: WOText {
rows = 12;
style = "height: 200px; width: 100%;";
value = postDisplayGroup.selectedObject.body;
}
Submit: WOSubmitButton {
action = context.page; /* just jump back to page */
value = "ok";
}
/* posts */
AddPost: WOHyperlink {
action = postDisplayGroup.insert;
}
DeletePost: WOHyperlink {
action = postDisplayGroup.delete;
}
RefetchPosts: WOHyperlink {
action = postDisplayGroup.fetch;
}
/* saving */
HasChanges: WOConditional {
condition = session.defaultManagedObjectContext.hasChanges;
}
InsertedCount: WOString {
value = session.defaultManagedObjectContext.insertedObjects.@count;
}
UpdatedCount: WOString {
value = session.defaultManagedObjectContext.updatedObjects.@count;
}
DeletedCount: WOString {
value = session.defaultManagedObjectContext.deletedObjects.@count;
}
SaveChanges: WOSubmitButton {
action = saveChanges;
value = "save";
}
Rollback: WOSubmitButton {
action = rollback;
value = "rollback";
}

View File

@ -1,77 +0,0 @@
{
variables = {
postDisplayGroup = {
class = WODisplayGroup;
dataSource = {
class = EOCoreDataSource;
editingContext = session.defaultManagedObjectContext;
fetchSpecification = {
class = EOFetchSpecification;
entityName = Post;
fetchLimit = 0;
isDeep = YES;
sortOrderings = (
{ class = EOSortOrdering;
key = "title";
selector = "compareAscending:";
/* Tiger?: selector = "compareCaseInsensitiveAscending:"; */
}
);
};
};
formatForLikeQualifier = "%@*";
localKeys = ();
numberOfObjectsPerBatch = 0;
selectsFirstObjectAfterFetch = YES;
fetchesOnLoad = YES;
};
authorDisplayGroup = {
class = WODisplayGroup;
dataSource = {
class = EOCoreDataSource;
editingContext = session.defaultManagedObjectContext;
fetchSpecification = {
class = EOFetchSpecification;
entityName = Author;
};
};
fetchesOnLoad = YES;
formatForLikeQualifier = "*%@*";
localKeys = ();
numberOfObjectsPerBatch = 30;
selectsFirstObjectAfterFetch = YES;
sortOrdering = ( // proper position?
{
class = EOSortOrdering;
key = name;
selectorName = "compareAscending:";
}
);
};
topicDisplayGroup = {
class = WODisplayGroup;
dataSource = {
class = EOCoreDataSource;
editingContext = session.defaultManagedObjectContext;
fetchSpecification = {
class = EOFetchSpecification;
entityName = Topic;
};
};
fetchesOnLoad = YES;
formatForLikeQualifier = "*%@*";
localKeys = ();
numberOfObjectsPerBatch = 30;
selectsFirstObjectAfterFetch = YES;
sortOrdering = ( // proper position?
{
class = EOSortOrdering;
key = title;
selectorName = "compareAscending:";
}
);
};
};
}

View File

@ -1,71 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray, NSCalendarDate;
@interface MonthPage : WOComponent
{
NSCalendarDate *date;
}
@end
#include "WOSession+CoreData.h"
#include <NGExtensions/NSCalendarDate+misc.h>
#include "common.h"
@implementation MonthPage
- (id)initWithContext:(id)_ctx {
if ((self = [super initWithContext:_ctx])) {
}
return self;
}
- (void)dealloc {
[self->date release];
[super dealloc];
}
/* accessors */
- (NSCalendarDate *)date {
if (self->date == nil) {
NSString *value;
value = [[[self context] request] formValueForKey:@"date"];
self->date = [value isNotEmpty]
? [[NSCalendarDate alloc] initWithString:value calendarFormat:@"%Y%m%d"]
: [[NSCalendarDate alloc] init];
}
return self->date;
}
- (NSArray *)calMatrix {
return [[self date] calendarMatrixWithStartDayOfWeek:1 /* Monday */
onlyCurrentMonth:NO];
}
/* actions */
@end /* MonthPage */

View File

@ -1,182 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SOPE CoreData Test: MonthPage</title>
<style>
div#content {
position: absolute;
margin-left: 14em;
}
div#links {
width: 12em;
padding: 15px;
}
div#banner {
text-align: right;
border-bottom: 1px solid #BE5303;
}
.date {
/* font-family: palatino, georgia; */
font-family: palatino, georgia;
font-size: large;
color: #333333;
border-bottom: 1px solid #999999;
margin-bottom: 10px;
font-weight:bold;
}
.blogbody {
font-family: palatino, georgia, verdana, arial, sans-serif;
color: #333333;
font-size: small;
font-weight: normal;
background: white;
line-height: 150%;
}
.posted {
font-family: verdana, arial, sans-serif;
font-size: x-small;
color: black;
margin-bottom: 25px;
}
.title {
font-family: palatino, georgia;
font-size: medium;
color: #666;
margin-bottom:10px;
}
/* Calendar */
.calendar {
font-family: Verdana, Arial;
color: #666666;
font-size: x-small;
line-height: 140%;
padding: 2px;
text-align: center;
}
caption.calendarhead {
font-family: Palatino, Georgia;
color: #BE5303;
font-size: small;
padding: 2px;
letter-spacing: .3em;
text-transform: uppercase;
}
.side {
font-family: verdana, arial, sans-serif;
color: #333333;
font-size: x-small;
line-height: 140%;
padding: 2px;
}
.sidetitle {
font-family: palatino, georgia;
color: #BE5303;
font-size: small;
padding: 2px;
margin-top: 30px;
letter-spacing: .3em;
text-transform: uppercase;
}
</style>
</head>
<body>
<div id="banner" style="text-align: right;">
<img src="http://sope.opengroupware.org/images/lori_48x48_lookleft.png"
border="0" width="48" height="48" alt="Lori" title="Lori" />
</div>
<div id="content">
<div class="blog">
<#Posts>
<h2 class="date"><!-- Note: MT groups by date -->
<#HasDate>
<#PostDate/>
</#HasDate>
</h2>
<div class="blogbody">
<h3 class="title"><#PostTitle/></h3>
<#PostBody/>
<div class="posted">
Posted by <#PostAuthor/> at <#PostTime/>.
</div>
</div>
</#Posts>
</div>
</div>
<div id="links">
<div class="calendar">
<table style="width: 11em;">
<caption class="calendarhead"><#CalMonthName/></caption>
<tr class="calendar">
<th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th>
<th>Fri</th><th>Sat</th><th>Sun</th>
</tr>
<#Weeks>
<tr class="calendar">
<#Week>
<!-- this element sets up our environment -->
<#SetupCalDayDisplayGroup/>
<#IsSameMonth>
<td>
<#DayHasArticles>
<b><#Day/></b>
</#DayHasArticles>
<#DayHasNoArticles>
<#Day/>
</#DayHasNoArticles>
</td>
</#IsSameMonth>
<#IsOtherMonth>
<td class="calendar-othermonth"><#Day/></td>
</#IsOtherMonth>
</#Week>
</tr>
</#Weeks>
</table>
</div>
<div class="sidetitle">Search</div>
<div class="side">
Search this site:<br />
add a form here and bind<br />
to query match<br />
Note: we can only bind one?
</div>
<div class="sidetitle">Archives</div>
<div class="side">
impossible in an efficient way?<br />
August 2005<br />
Juli 2005
</div>
<div class="sidetitle">Recent Entries</div>
<div class="side">
<#RecentPosts>
<!-- TODO: add link, maybe focus on date of post? -->
<#PostTitle/><br />
</#RecentPosts>
</div>
</div>
</body>
</html>

View File

@ -1,90 +0,0 @@
// bind template to controller
Posts: WORepetition {
list = postDisplayGroup.displayedObjects;
item = post;
}
RecentPosts: WORepetition {
list = recentPostsDisplayGroup.displayedObjects;
item = post;
}
HasDate: WOConditional {
condition = post.creationDate.isNotEmpty;
}
PostDate: WOString {
value = post.creationDate;
valueWhenEmpty = "[no date]";
dateformat = "%d.%m.%y";
}
PostTime: WOString {
value = post.creationDate;
valueWhenEmpty = "[no time]";
dateformat = "%H:%M";
}
PostTitle: WOString {
value = post.title;
valueWhenEmpty = "[no title]";
}
PostBody: WOString {
value = post.body;
valueWhenEmpty = "[no body]";
insertBR = YES;
}
PostAuthor: WOString {
value = post.author.name;
}
// Calendar
CalMonthName: WOString {
value = date;
dateformat = "%B %Y";
}
Weeks: WORepetition {
list = calMatrix;
item = week;
}
Week: WORepetition {
list = week;
item = day;
}
Day: WOString {
value = day.dayOfMonth;
}
IsSameMonth: WOConditional {
condition = date.monthOfYear;
value = day.monthOfYear;
}
IsOtherMonth: WOConditional {
condition = date.monthOfYear;
value = day.monthOfYear;
negate = YES;
}
SetupCalDayDisplayGroup: WOCopyValue {
copyValues = {
"calendarDisplayGroup.queryMin.creationDate" = "day.beginOfDay";
"calendarDisplayGroup.queryMax.creationDate" = "day.tomorrow.beginOfDay";
};
finishValues = {
dummy = "calendarDisplayGroup.qualifyDataSourceAndReturnDisplayCount";
};
}
Count: WOString {
value = calendarDisplayGroup.displayedObjects.count;
}
DayHasArticles: WOConditional {
condition = calendarDisplayGroup.displayedObjects.isNotEmpty;
}
DayHasNoArticles: WOConditional {
condition = calendarDisplayGroup.displayedObjects.isNotEmpty;
negate = YES;
}

View File

@ -1,78 +0,0 @@
{
variables = {
postDisplayGroup = {
class = WODisplayGroup;
dataSource = {
class = EOCoreDataSource;
editingContext = session.defaultManagedObjectContext;
fetchSpecification = {
class = EOFetchSpecification;
entityName = Post;
fetchLimit = 0;
isDeep = YES;
sortOrderings = (
{ class = EOSortOrdering;
key = "creationDate";
selector = "compareDescending:";
}
);
};
};
formatForLikeQualifier = "%@*";
localKeys = ();
numberOfObjectsPerBatch = 0;
selectsFirstObjectAfterFetch = YES;
fetchesOnLoad = YES;
};
recentPostsDisplayGroup = {
class = WODisplayGroup;
dataSource = {
class = EOCoreDataSource;
editingContext = session.defaultManagedObjectContext;
fetchSpecification = {
class = EOFetchSpecification;
entityName = Post;
fetchLimit = 10;
isDeep = YES;
sortOrderings = (
{ class = EOSortOrdering;
key = "creationDate";
selector = "compareDescending:";
}
);
qualifier = {
class = "EOKeyValueQualifier";
key = "creationDate";
value = "";
selector = "isEqualTo:";
};
};
};
formatForLikeQualifier = "%@*";
localKeys = ();
numberOfObjectsPerBatch = 0;
selectsFirstObjectAfterFetch = YES;
fetchesOnLoad = YES;
};
calendarDisplayGroup = {
class = WODisplayGroup;
dataSource = {
class = EOCoreDataSource;
editingContext = session.defaultManagedObjectContext;
fetchSpecification = {
class = EOFetchSpecification;
entityName = Post;
fetchLimit = 2;
isDeep = YES;
};
};
formatForLikeQualifier = "%@*";
localKeys = ();
numberOfObjectsPerBatch = 0;
selectsFirstObjectAfterFetch = YES;
fetchesOnLoad = YES;
};
};
}

View File

@ -1,13 +0,0 @@
CoreDataBlog
============
A sample SOPE application which access some CoreData storage.
Works on the same data like:
http://www.cocoadevcentral.com/articles/000085.php
Required defaults:
defaults write CoreDataBlog WOComponentLoadWOOFiles YES
defaults write CoreDataBlog \
WOKeyPathAssociationClass WOKeyPathAssociationSystemKVC

View File

@ -1,44 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray;
@interface RSS10 : WOComponent
{
}
@end
#include "WOSession+CoreData.h"
#include <NGExtensions/NSCalendarDate+misc.h>
#include "common.h"
@implementation RSS10
/* accessors */
- (NSCalendarDate *)date {
return [NSCalendarDate date];
}
@end /* RSS10 */

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<#SetContentType/>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://www.mulle-kybernetik.com/weblog/">
<title><#FeedTitle/></title>
<link>http://www.mulle-kybernetik.com/weblog/</link>
<description></description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date><#FeedDate/></dc:date>
<admin:generatorAgent rdf:resource="http://sope.opengroupware.org/?v=4.5"/>
<items>
<rdf:Seq>
<#ResourceList>
<rdf:li rdf:resource="<#ItemHref/>" />
</#ResourceList>
</rdf:Seq>
</items>
</channel>
<#ResourceList>
<item rdf:about="<#ItemHref/>">
<title ><#ItemTitle /></title>
<link ><#ItemHref /></link>
<description><#ItemDescription/></description>
<dc:subject ><#ItemDcSubject /></dc:subject>
<dc:creator ><#ItemDcCreator /></dc:creator>
<dc:date ><#ItemDcDate /></dc:date>
</item>
</#ResourceList>
</rdf:RDF>

View File

@ -1,45 +0,0 @@
// bind template to controller
SetContentType: WOSetHeader {
header = "content-type";
value = "application/rdf+xml";
// value = "text/xml"; // for debugging
}
FeedTitle: WOString {
value = application.name;
}
FeedDate: WOString {
value = date;
dateformat = "%Y-%m-%dT%H:%M:%S+00:00";
}
ResourceList: WORepetition {
list = recentPostsDisplayGroup.displayedObjects;
item = item;
}
// TODO: how to get an ID?
ItemHref: WOString { value = "TODO"; }
ItemTitle: WOString {
value = item.title.stringByEscapingXMLString;
escapeHTML = NO;
}
ItemDescription: WOString { // TODO: shorten? (and _then_ escape)
value = item.body.stringByEscapingXMLString;
}
ItemDcSubject: WOString { value = ""; } // TODO: check spec
ItemDcCreator: WOString {
value = item.author.name.stringByEscapingXMLString;
escapeHTML = NO;
}
ItemDcDate: WOString {
value = item.creationDate;
dateformat = "%Y-%m-%dT%H:%M:%S+00:00";
}

View File

@ -1,33 +0,0 @@
{
variables = {
recentPostsDisplayGroup = {
class = WODisplayGroup;
dataSource = {
class = EOCoreDataSource;
editingContext = session.defaultManagedObjectContext;
fetchSpecification = {
class = EOFetchSpecification;
entityName = Post;
fetchLimit = 10;
isDeep = YES;
sortOrderings = (
{ class = EOSortOrdering;
key = "creationDate";
selector = "compareDescending:";
}
);
qualifier = {
class = "EOKeyValueQualifier";
key = "creationDate";
value = "";
};
};
};
formatForLikeQualifier = "%@*";
localKeys = ();
numberOfObjectsPerBatch = 0;
selectsFirstObjectAfterFetch = YES;
fetchesOnLoad = YES;
};
};
}

View File

@ -1,53 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOSession.h>
@interface Session : WOSession
@end
#include "WOSession+CoreData.h"
#include "WOCoreDataApplication.h"
#include "common.h"
@implementation Session
- (NSArray *)posts {
NSFetchRequest *fs;
NSArray *a;
NSError *error = nil;
fs = [[[NSFetchRequest alloc] init] autorelease];
[fs setEntity:[[[[self application] managedObjectModel]
entitiesByName] objectForKey:@"Post"]];
// [self logWithFormat:@"entity: %@", [fs entity]];
a = [[self defaultManagedObjectContext] executeFetchRequest:fs error:&error];
[self logWithFormat:@"a: %@", a];
if (error != nil)
[self errorWithFormat:@"FETCH FAILED: %@", error];
return a;
}
@end /* Session */

View File

@ -1,54 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef __WOCoreDataApplication_H__
#define __WOCoreDataApplication_H__
#include <NGObjWeb/WOApplication.h>
@class NSString, NSURL;
@class NSManagedObjectContext, NSManagedObjectModel;
@class NSPersistentStoreCoordinator;
@interface WOCoreDataApplication : WOApplication
{
NSManagedObjectModel *managedObjectModel;
NSPersistentStoreCoordinator *storeCoordinator;
}
/* accessors */
- (NSManagedObjectModel *)managedObjectModel;
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator;
/* locating the default store */
- (NSString *)applicationSupportFolder;
- (NSURL *)defaultPersistentStoreURL;
- (NSString *)defaultPersistentStoreType;
/* creating editing contexts */
- (NSManagedObjectContext *)createManagedObjectContext;
@end
#endif /* __WOCoreDataApplication_H__ */

View File

@ -1,142 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "WOCoreDataApplication.h"
#include "common.h"
@implementation WOCoreDataApplication
- (void)dealloc {
[self->storeCoordinator release];
[self->managedObjectModel release];
[super dealloc];
}
/* accessors */
- (NSManagedObjectModel *)managedObjectModel {
NSMutableSet *allBundles;
if (self->managedObjectModel != nil)
return [self->managedObjectModel isNotNull] ? self->managedObjectModel:nil;
allBundles = [[NSMutableSet alloc] initWithCapacity:16];
[allBundles addObject:[NSBundle mainBundle]];
[allBundles addObject:[NSBundle allFrameworks]];
/* 'nil' says: just scan the mainbundle */
self->managedObjectModel =
[[NSManagedObjectModel mergedModelFromBundles:nil] retain];
[allBundles release]; allBundles = nil;
if (self->managedObjectModel == nil)
[self errorWithFormat:@"Could not create the managed object model!"];
return self->managedObjectModel;
}
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator {
NSFileManager *fileManager;
NSError *error;
BOOL ok;
if (self->storeCoordinator != nil)
return [self->storeCoordinator isNotNull] ? self->storeCoordinator : nil;
/* create support folder */
fileManager = [NSFileManager defaultManager];
if (![fileManager fileExistsAtPath:[self applicationSupportFolder]
isDirectory:NULL] ) {
[fileManager createDirectoryAtPath:[self applicationSupportFolder]
attributes:nil];
}
/* create store coordinator */
self->storeCoordinator =
[[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:
[self managedObjectModel]];
ok = [self->storeCoordinator
addPersistentStoreWithType:[self defaultPersistentStoreType]
configuration:nil
URL:[self defaultPersistentStoreURL]
options:nil error:&error] != nil ? YES : NO;
if (!ok) {
[self errorWithFormat:
@"Failed to create persistent store coordinator: %@", error];
[self->storeCoordinator release]; self->storeCoordinator = nil;
self->storeCoordinator = [[NSNull null] retain];
return nil;
}
return self->storeCoordinator;
}
/* locating the default store */
- (NSString *)applicationSupportFolder {
unsigned char path[1024];
NSString *p;
FSRef foundRef;
OSErr err;
err = FSFindFolder(kUserDomain, kApplicationSupportFolderType,
kDontCreateFolder, &foundRef);
if (err != noErr) {
[self errorWithFormat:@"Can't find application support folder."];
return nil;
}
FSRefMakePath(&foundRef, path, sizeof(path));
p = [NSString stringWithUTF8String:(char *)path]; // TODO: is UTF-8 ok?
p = [p stringByAppendingPathComponent:[self name]];
return p;
}
- (NSURL *)defaultPersistentStoreURL {
NSString *s;
s = [[self name] stringByDeletingPathExtension];
s = [s stringByAppendingPathExtension:@"xml"];
s = [[self applicationSupportFolder] stringByAppendingPathComponent:s];
return [NSURL fileURLWithPath:s];
}
- (NSString *)defaultPersistentStoreType {
return [[[self defaultPersistentStoreURL] path] hasSuffix:@".xml"]
? NSXMLStoreType : NSSQLiteStoreType;
}
/* creating editing contexts */
- (NSManagedObjectContext *)createManagedObjectContext {
NSManagedObjectContext *ctx;
ctx = [[[NSManagedObjectContext alloc] init] autorelease];
[ctx setPersistentStoreCoordinator:[self persistentStoreCoordinator]];
return ctx;
}
@end /* WOCoreDataApplication */

View File

@ -1,36 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef __WOSession_CoreData_H__
#define __WOSession_CoreData_H__
#include <NGObjWeb/WOSession.h>
@class NSManagedObjectContext;
@interface WOSession(CoreData)
- (void)setDefaultManagedObjectContext:(NSManagedObjectContext *)_ctx;
- (NSManagedObjectContext *)defaultManagedObjectContext;
@end
#endif /* __WOSession_CoreData_H__ */

View File

@ -1,54 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "WOSession+CoreData.h"
#include "WOCoreDataApplication.h"
#include "common.h"
@implementation WOSession(CoreData)
static NSString *NSManagedObjectContextKey = @"NSManagedObjectContext";
- (void)setDefaultManagedObjectContext:(NSManagedObjectContext *)_ctx {
if ([_ctx isNotNull])
[self setObject:_ctx forKey:NSManagedObjectContextKey];
else
[self removeObjectForKey:NSManagedObjectContextKey];
}
- (NSManagedObjectContext *)defaultManagedObjectContext {
NSManagedObjectContext *ctx;
if ([(ctx = [self objectForKey:NSManagedObjectContextKey]) isNotNull])
return ctx;
if ((ctx = [[self application] createManagedObjectContext]) == nil) {
[self errorWithFormat:
@"Failed to create NSManagedObjectContext for session!"];
return nil;
}
[self setObject:ctx forKey:NSManagedObjectContextKey];
return ctx;
}
@end /* WOSession(CoreData) */

View File

@ -1,5 +0,0 @@
#import <Foundation/Foundation.h>
#include <NGObjWeb/NGObjWeb.h>
#import <CoreData/CoreData.h>

View File

@ -1,164 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://www.mulle-kybernetik.com/weblog/">
<title>Nat!&apos;s Web Journal</title>
<link>http://www.mulle-kybernetik.com/weblog/</link>
<description></description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date>2005-08-23T00:56:21+01:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.63" />
<items>
<rdf:Seq><rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000681.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000680.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000677.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000676.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000675.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000674.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000673.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000672.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000671.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000669.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000668.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000667.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000664.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000663.html" />
<rdf:li rdf:resource="http://www.mulle-kybernetik.com/weblog/archives/000660.html" />
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000681.html">
<title>&quot;Interesting&quot; Example Code</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000681.html</link>
<description>From an AudioCore code sample: static void BuildDeviceMenu(AudioDeviceList *devlist, NSPopUpButton *menu, AudioDeviceID initSel) { [menu removeAllItems]; AudioDeviceList::DeviceList &amp;#38;thelist = devlist-&gt;GetList(); int index = 0; for (AudioDeviceList::DeviceList::iterator i = thelist.begin(); i != thelist.end(); ++i, ++index) { while([menu itemWithTitle:[NSString stringWithCString: (*i).mName]] !=...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-08-23T00:56:21+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000680.html">
<title>Server migration</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000680.html</link>
<description>The Mulle kybernetiK server will move tomorrow. So you can expect some downtime....</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-08-19T00:59:00+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000677.html">
<title>Zero Filling - Part VII - Hyperthreads a related problem</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000677.html</link>
<description>A long time ago, about two years back, I was unhappy about zero filling. I am still unhappy about it. One of the main arguments for zero filling is security. On a multi-user system you enter your password, which invariably...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-08-09T23:40:54+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000676.html">
<title>The Mac swears at you!</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000676.html</link>
<description> I think this could be worded in much more explecitive and redundant way, still giving away as little information as possible: %@!!! The %@ preferences pane could not be removed because a %@ error occurred. Something apparently has gone...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-08-04T23:33:10+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000675.html">
<title>Grow RPG</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000675.html</link>
<description> There is a new version of Grow available. It&apos;s as good as the old one and I solved it :)...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-07-25T00:05:50+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000674.html">
<title>Wie schlecht ist das denn ?</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000674.html</link>
<description><![CDATA[Aus dem Kicker: Homeless World Cup in Edinburgh - 17.07.2005&nbsp;22:07 F&#252;nf afrikanischen Teams die Einreise verweigert Vom 20. bis 24. Juli findet in Edinburgh der Homeless World Cup statt. Es ist die dritte Auflage der Obdachlosen-Weltmeisterschaft nach der Premiere 2003...]]></description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-07-18T00:19:47+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000673.html">
<title>Garageband Latency, excellent</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000673.html</link>
<description>I was wondering how much latency there is when using Garageband. If I am playing with the metronome, the metronome sound bits get &quot;rendered&quot; into a buffer. That incurs a little lag as sounds are usually rendered a few samples...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-07-15T02:11:50+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000672.html">
<title>Home Network Suckage Supreme</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000672.html</link>
<description>In my old flat I had like 20 meters of cable canal to connect my room that contained all the computers to the DSL modem in another room. The DSL line went into the linux router, and that was it....</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-07-07T02:44:56+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000671.html">
<title>Whatever happened to Asteroid ?</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000671.html</link>
<description> It&apos;s exactly what I want to connect my guitar with my Mac, but its not on the market. Now should I wait or not ? Has this product been cancelled ? Was it just a hoax ? Argh! Firewire...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-07-06T11:34:42+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000669.html">
<title>MulleSybaseEOAdaptor - a new beginning</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000669.html</link>
<description>Today a new version of MulleSybase adaptor will be released. Here are some more or less relevant snippets from the release notes with respect to the last release 1.5.2. There have been quite a lot of changes and improvements over...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-07-04T13:06:58+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000668.html">
<title>Poetic Spam</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000668.html</link>
<description>To keep up to date with the latest in spam, I sample a few of the hundreds of letters that I receive at work. That way I learn for instance that the &quot;Viagra Party Pack&quot; can be delievered to my...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-06-28T22:56:31+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000667.html">
<title>A peculiar new input device</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000667.html</link>
<description><![CDATA[ This is an interesting new device. With a little tweaking it could make a very nice, albeit expensive (&euro; 2500) game controller. I figure it would depend how nice the screen feels to touch....]]></description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-06-28T22:44:47+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000664.html">
<title>Guest Article: ZNeK needs NeXTstep 2.1</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000664.html</link>
<description>The first guest entry on this weblog. Enjoy: After reading yet another hillariously stupid article in the totally braindead OSNews series &quot;My workstation OS&quot; I figured I might contribute with yet another senseless OS review ... how about &quot;NeXTstep 2.1&quot;?!...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-06-12T19:53:01+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000663.html">
<title>The Emperor has chosen a new Apprentice </title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000663.html</link>
<description>Image stolen from www.templetons.comAnd what a surprise it was. It was none other than Jar Jar Binks, that the emperor had tempted to the dark side. Now folks with a sense for aesthetics, or common sense for that matter, were...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-06-06T23:22:18+01:00</dc:date>
</item>
<item rdf:about="http://www.mulle-kybernetik.com/weblog/archives/000660.html">
<title>Devious Guitar Circles</title>
<link>http://www.mulle-kybernetik.com/weblog/archives/000660.html</link>
<description>||------------------------|| ||-------------3----------|| ||----2-----4-----2-------|| ||-1-----3-----------3----|| ||----------------------2-|| repeat ||------------------------|| in the search for simple little patterns to get my fret fingers more nimble, I created this one. I like it, because it seems to make two circles. Now I can play the...</description>
<dc:subject></dc:subject>
<dc:creator>Nat!</dc:creator>
<dc:date>2005-05-30T23:46:58+01:00</dc:date>
</item>
</rdf:RDF>

View File

@ -1,13 +0,0 @@
# GNUstep makefile
include ../../config.make
include $(GNUSTEP_MAKEFILES)/common.make
SUBPROJECTS += \
davpropget \
parsedav \
WOxExtTest \
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/aggregate.make
-include GNUmakefile.postamble

View File

@ -1,8 +0,0 @@
2005-11-17 Helge Hess <helge.hess@opengroupware.org>
* GNUmakefile.preamble: fixed include path of system libs
2005-07-11 Helge Hess <helge.hess@opengroupware.org>
* created by copying HelloWorld

View File

@ -1,15 +0,0 @@
# GNUstep makefile
include ../../../config.make
include $(GNUSTEP_MAKEFILES)/common.make
WOAPP_NAME = HelloForm
HelloForm_OBJC_FILES += HelloForm.m Main.m
HelloForm_COMPONENTS += Main.wo
HelloForm_WEBSERVER_RESOURCE_FILES += Main.css
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/woapp.make
-include GNUmakefile.postamble

View File

@ -1,9 +0,0 @@
# compile settings
# static references required for Mach linker
ADDITIONAL_TOOL_LIBS += \
-lEOControl \
-lDOM -lXmlRpc -lSaxObjC
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib

View File

@ -1,47 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOApplication.h>
@interface HelloForm : WOApplication
{
}
@end
#include "common.h"
@implementation HelloForm
@end /* HelloForm */
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
WOApplicationMain(@"HelloForm", argc, (void*)argv);
[pool release];
return 0;
}

View File

@ -1 +0,0 @@
/* CSS file */

View File

@ -1,59 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@interface Main : WOComponent
{
id item;
}
@end
#include "common.h"
@implementation Main
- (void)dealloc {
[self->item release];
[super dealloc];
}
/* accessors */
- (void)setItem:(id)_item {
ASSIGN(self->item, _item);
}
- (id)item {
return self->item;
}
/* response generation */
- (void)appendToResponse:(WOResponse *)_r inContext:(WOContext *)_ctx {
NSDate *s;
s = [NSDate date];
[super appendToResponse:_r inContext:_ctx];
printf("duration: %.3f\n", [[NSDate date] timeIntervalSinceDate:s]);
}
@end /* Main */

View File

@ -1,16 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="SOPE 4.2">
<TITLE>Hello Form</TITLE>
<!-- <LINK TYPE="text/css" REL="stylesheet" HREF="<#CSS/>"> -->
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<h2>Hello Form</h2>
<WEBOBJECT NAME="Form">
Text: <WEBOBJECT NAME="TextField"></WEBOBJECT><br />
<WEBOBJECT NAME="Submit"></WEBOBJECT>
</WEBOBJECT>
</BODY>
</HTML>

View File

@ -1,17 +0,0 @@
// bind template to controller
Form: WOForm {
action = self;
}
TextField: WOTextField {
value = item;
}
Submit: WOSubmitButton {
value = "OK";
}
CSS: WOResourceURL {
filename = "Main.css";
}

View File

@ -1,3 +0,0 @@
#import <Foundation/Foundation.h>
#include <NGObjWeb/NGObjWeb.h>

View File

@ -1,18 +0,0 @@
2005-09-06 Helge Hess <helge.hess@skyrix.com>
* Main.wo/Main.html: added test for inline attributes
* Main.m: fixed a gcc4 warning
2004-11-16 Helge Hess <helge.hess@opengroupware.org>
* GNUmakefile.preamble: fixed for FHS setups
2004-06-14 Helge Hess <helge.hess@opengroupware.org>
* added GNUmakefile.preamble with static library dependencies for
Mach linker
* created ChangeLog

View File

@ -1,13 +0,0 @@
# GNUstep makefile
include ../../../config.make
include $(GNUSTEP_MAKEFILES)/common.make
WOAPP_NAME = HelloWorld
HelloWorld_OBJC_FILES += HelloWorld.m Main.m
HelloWorld_COMPONENTS += Main.wo
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/woapp.make
-include GNUmakefile.postamble

View File

@ -1,9 +0,0 @@
# compile settings
# static references required for Mach linker
ADDITIONAL_TOOL_LIBS += \
-lEOControl \
-lDOM -lXmlRpc -lSaxObjC
SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib

View File

@ -1,47 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOApplication.h>
@interface HelloWorld : WOApplication
{
}
@end
#include "common.h"
@implementation HelloWorld
@end /* HelloWorld */
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
WOApplicationMain(@"HelloWorld", argc, (void*)argv);
[pool release];
return 0;
}

View File

@ -1,87 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray;
@interface Main : WOComponent
{
NSArray *items;
id item;
}
@end
#include "common.h"
@implementation Main
- (id)initWithContext:(WOContext *)_ctx {
if ((self = [super initWithContext:_ctx]) != nil) {
NSMutableArray *ma;
int i;
ma = [[NSMutableArray alloc] init];
for (i = 0; i < 1000; i++) {
char buf[16];
NSString *s;
sprintf(buf, "%i", i);
s = [[NSString alloc] initWithCString:buf];
[ma addObject:s];
[s release];
}
self->items = ma;
}
return self;
}
- (void)dealloc {
[self->items release];
[self->item release];
[super dealloc];
}
/* accessors */
- (void)setItem:(id)_item {
ASSIGN(self->item, _item);
}
- (id)item {
return self->item;
}
- (NSArray *)list {
return self->items;
}
/* response generation */
- (void)appendToResponse:(WOResponse *)_r inContext:(WOContext *)_ctx {
NSDate *s;
s = [NSDate date];
[super appendToResponse:_r inContext:_ctx];
printf("duration: %.3f\n", [[NSDate date] timeIntervalSinceDate:s]);
}
@end /* Main */

View File

@ -1,15 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="SOPE 4.7">
<TITLE>Hello World</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<h2>Hello World</h2>
Application Name:
<#AppName/> (Hash),
<WEBOBJECT NAME="AppName"></WEBOBJECT> (WO),
<#WOString var:value="application.name" /> (Inline).
</BODY>
</HTML>

View File

@ -1,3 +0,0 @@
AppName: WOString {
value = application.name;
}

View File

@ -1,3 +0,0 @@
#import <Foundation/Foundation.h>
#include <NGObjWeb/NGObjWeb.h>

View File

@ -1,25 +0,0 @@
sope-appserver samples
======================
HelloWorld
- simple SOPE application with a single .wo wrapper template
TestPages
- small app for testing NGObjWeb bugs
TestSite
- test site for use with the 'sope' tool
WOxExtTest
- an XML template (.wox) based application which shows the use of various
WEExtensions/WOExtensions reusable components
davpropget
- simple example to retrieve the properties of a WebDAV URL using
WOHTTPConnection.
iCalPortal
- pre-SOPE attempt to write a small iCal calendaring portal
parsedav
- a small tool to test the NGObjWeb WebDAV parser

View File

@ -1,55 +0,0 @@
/*
Copyright (C) 2006 Helge Hess
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/SoApplication.h>
@interface SoCookieAuth : SoApplication
{
}
@end
#include <NGObjWeb/SoCookieAuthenticator.h>
#include "common.h"
@implementation SoCookieAuth
- (id)authenticatorInContext:(id)_ctx {
return [[[SoCookieAuthenticator alloc] init] autorelease];
}
@end /* SoCookieAuth */
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
WOApplicationMain(@"SoCookieAuth", argc, (void*)argv);
[pool release];
return 0;
}

View File

@ -1,4 +0,0 @@
2005-07-10 Helge Hess <helge.hess@opengroupware.org>
* created ChangeLog / project

View File

@ -1,13 +0,0 @@
# GNUstep makefile
include ../../../config.make
include $(GNUSTEP_MAKEFILES)/common.make
WOAPP_NAME = SoCookieAuth
SoCookieAuth_OBJC_FILES += Application.m Main.m
SoCookieAuth_COMPONENTS += Main.wo
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/woapp.make
-include GNUmakefile.postamble

View File

@ -1,14 +0,0 @@
# compile settings
APPSERVER="../.."
ADDITIONAL_LIB_DIRS += \
-L$(APPSERVER)/NGObjWeb/$(GNUSTEP_OBJ_DIR)
# static references required for Mach linker
ADDITIONAL_TOOL_LIBS += \
-lEOControl \
-lDOM -lXmlRpc -lSaxObjC
ADDITIONAL_LIB_DIRS += -L/usr/local/lib -L/usr/lib

View File

@ -1,57 +0,0 @@
/*
Copyright (C) 2006 Helge Hess
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray;
@interface Main : WOComponent
{
}
@end
#include "common.h"
@implementation Main
- (id)initWithContext:(WOContext *)_ctx {
if ((self = [super initWithContext:_ctx]) != nil) {
}
return self;
}
- (void)dealloc {
[super dealloc];
}
/* accessors */
#if 0
- (void)setItem:(id)_item {
ASSIGN(self->item, _item);
}
- (id)item {
return self->item;
}
#endif
@end /* Main */

View File

@ -1,3 +0,0 @@
WORK IN PROGRESS
App to test SOPE cookie authentication (SoCookieAuthenticator)

View File

@ -1,23 +0,0 @@
/*
Copyright (C) 2006 Helge Hess
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/Foundation.h>
#include <NGObjWeb/NGObjWeb.h>

View File

@ -1,9 +0,0 @@
2004-11-16 Helge Hess <helge.hess@opengroupware.org>
* Main.wo: show session id on main page
* GNUmakefile.preamble: fixed for FHS layouts
2004-06-15 Helge Hess <helge.hess@opengroupware.org>
* created app from HelloWorld as a container for testing pages

View File

@ -1,51 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@interface FormDisplay : WOComponent
{
NSString *text;
}
@end
#include "common.h"
@implementation FormDisplay
/* accessors */
- (void)setText:(NSString *)_text {
ASSIGNCOPY(self->text, _text);
}
- (NSString *)text {
return self->text;
}
/* actions */
- (id)ok {
[self logWithFormat:@"TEXT: %@", [self text]];
return self;
}
@end /* FormDisplay */

View File

@ -1,27 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Display Submitted Form Values</title>
</head>
<body>
<h1>Submit Form Values</h1>
<p>
To check whether values are properly transmitted.
</p>
<i><#MainLink>Main</#MainLink></i>
<hr />
<#Form>
<#TextField />
<#Submit />
</#Form>
Value: [<#DisplayText />]
<br />
<hr />
<address><a
href="mailto:helge.hess@opengroupware.org">Helge Hess</a></address>
</body>
</html>

View File

@ -1,23 +0,0 @@
// bind template to class
Form: WOForm {
}
TextField: WOTextField {
name = "text";
value = text;
size = 40;
}
DisplayText: WOString {
value = text;
}
Submit: WOSubmitButton {
name = "ok";
value = "ok";
action = ok;
}
MainLink: WOHyperlink {
pageName = "Main";
}

View File

@ -1,24 +0,0 @@
# GNUstep makefile
include ../../../config.make
include $(GNUSTEP_MAKEFILES)/common.make
WOAPP_NAME = TestPages
TestPages_OBJC_FILES += \
TestPages.m \
Main.m \
TwoForms.m \
FormDisplay.m \
TestPages_COMPONENTS += \
Main.wo \
TwoForms.wo \
FormDisplay.wo \
# for testing resources
TestPages_RESOURCE_FILES += $(TestPages_OBJC_FILES)
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/woapp.make
-include GNUmakefile.postamble

View File

@ -1,9 +0,0 @@
# compile settings
# static references required for Mach linker
ADDITIONAL_TOOL_LIBS += \
-lEOControl \
-lDOM -lXmlRpc -lSaxObjC
ADDITIONAL_LIB_DIRS += -L/usr/local/lib -L/usr/lib

View File

@ -1,86 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray;
@interface Main : WOComponent
{
NSArray *items;
id item;
}
@end
#include "common.h"
@implementation Main
- (id)initWithContext:(id)_ctx {
if ((self = [super initWithContext:_ctx])) {
NSMutableArray *ma;
int i;
ma = [[NSMutableArray alloc] init];
for (i = 0; i < 1000; i++) {
char buf[16];
NSString *s;
sprintf(buf, "%i", i);
s = [[NSString alloc] initWithCString:buf];
[ma addObject:s];
[s release];
}
self->items = ma;
}
return self;
}
- (void)dealloc {
[self->items release];
[self->item release];
[super dealloc];
}
/* accessors */
- (void)setItem:(id)_item {
ASSIGN(self->item, _item);
}
- (id)item {
return self->item;
}
- (NSArray *)list {
return self->items;
}
/* response generation */
- (void)appendToResponse:(WOResponse *)_r inContext:(WOContext *)_ctx {
NSDate *s;
s = [NSDate date];
[super appendToResponse:_r inContext:_ctx];
printf("duration: %.3f\n", [[NSDate date] timeIntervalSinceDate:s]);
}
@end /* Main */

View File

@ -1,24 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="SOPE 4.2">
<TITLE>Hello World</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<h2>Hello World</h2>
Application Name:
<#AppName/> (Hash),
<WEBOBJECT NAME="AppName"></WEBOBJECT> (WO)
<hr />
<ul>
<li><#TwoFormsLink/></li>
<li><#FormDisplayLink/></li>
</ul>
<hr />
Session-ID: <#SID />
</BODY>
</HTML>

View File

@ -1,19 +0,0 @@
// bind template to controller class
AppName: WOString {
value = application.name;
}
TwoFormsLink: WOHyperlink {
pageName = "TwoForms";
string = "two forms on one page";
}
FormDisplayLink: WOHyperlink {
pageName = "FormDisplay";
string = "test form values";
}
SID: WOString {
value = existingSession.sessionID;
}

View File

@ -1,47 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/NGObjWeb.h>
@interface TestPages : WOApplication
{
}
@end
#include "common.h"
@implementation TestPages
@end /* TestPages */
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
WOApplicationMain(@"TestPages", argc, (void*)argv);
[pool release];
return 0;
}

View File

@ -1,88 +0,0 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray;
@interface TwoForms : WOComponent
{
id selection1;
id selection2;
id item;
}
@end
#include "common.h"
@implementation TwoForms
- (id)initWithContext:(WOContext *)_ctx {
if ((self = [super initWithContext:_ctx])) {
}
return self;
}
- (void)dealloc {
[self->selection1 release];
[self->selection2 release];
[self->item release];
[super dealloc];
}
/* accessors */
- (void)setItem:(id)_item {
ASSIGN(self->item, _item);
}
- (id)item {
return self->item;
}
- (void)setSelection1:(id)_value {
[self logWithFormat:@"set form 1 selection to: %@", _value];
ASSIGN(self->selection1, _value);
}
- (id)selection1 {
return self->selection1;
}
- (void)setSelection2:(id)_value {
[self logWithFormat:@"set form 2 selection to: %@", _value];
ASSIGN(self->selection2, _value);
}
- (id)selection2 {
return self->selection2;
}
/* actions */
- (id)ok1 {
[self logWithFormat:@"OK: Form 1"];
return nil;
}
- (id)ok2 {
[self logWithFormat:@"OK: Form 2"];
return nil;
}
@end /* TwoForms */

View File

@ -1,27 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Two Forms</title>
</head>
<body>
<h1>Two Forms on a single page</h1>
<i><#MainLink>Main</#MainLink></i>
<hr />
<#Form1>
Form1: <#PopUp1/><#Submit1/>
</#Form1>
<#Form2>
Form2: <#PopUp2/><#Submit2/>
</#Form2>
<hr />
Note: you need to set "WOFormAlwaysPassDown" to make that work properly!
<hr />
<address><a
href="mailto:helge.hess@opengroupware.org">Helge Hess</a></address>
</body>
</html>

View File

@ -1,30 +0,0 @@
// bind template to class
Form1: WOForm {
}
Form2: WOForm {
}
PopUp1: WOPopUpButton {
list = ( a1, b1, c1, d1, e1 );
item = item;
selection = selection1;
}
PopUp2: WOPopUpButton {
list = ( a2, b2, c2, d2, e2 );
item = item;
selection = selection2;
}
Submit1: WOSubmitButton {
value = "ok1";
action = ok1;
}
Submit2: WOSubmitButton {
value = "ok2";
action = ok2;
}
MainLink: WOHyperlink {
pageName = "Main";
}

View File

@ -1,3 +0,0 @@
#import <Foundation/Foundation.h>
#include <NGObjWeb/NGObjWeb.h>

View File

@ -1,4 +0,0 @@
2005-07-10 Helge Hess <helge.hess@opengroupware.org>
* created ChangeLog / project

View File

@ -1,13 +0,0 @@
# GNUstep makefile
include ../../../config.make
include $(GNUSTEP_MAKEFILES)/common.make
WOAPP_NAME = TestPrototype
TestPrototype_OBJC_FILES += TestPrototype.m Main.m
TestPrototype_COMPONENTS += Main.wo
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/woapp.make
-include GNUmakefile.postamble

View File

@ -1,16 +0,0 @@
# compile settings
APPSERVER="../.."
ADDITIONAL_LIB_DIRS += \
-L$(APPSERVER)/WEPrototype/$(GNUSTEP_OBJ_DIR) \
-L$(APPSERVER)/NGObjWeb/$(GNUSTEP_OBJ_DIR) \
# static references required for Mach linker
ADDITIONAL_TOOL_LIBS += \
-lWEPrototype \
-lEOControl \
-lDOM -lXmlRpc -lSaxObjC
ADDITIONAL_LIB_DIRS += -L/usr/local/lib -L/usr/lib

View File

@ -1,98 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOComponent.h>
@class NSArray;
@interface Main : WOComponent
{
NSArray *items;
id item;
}
@end
#include "common.h"
@implementation Main
- (id)initWithContext:(id)_ctx {
if ((self = [super initWithContext:_ctx])) {
NSMutableArray *ma;
int i;
ma = [[NSMutableArray alloc] init];
for (i = 0; i < 1000; i++) {
char buf[16];
NSString *s;
sprintf(buf, "%i", i);
s = [[NSString alloc] initWithCString:buf];
[ma addObject:s];
[s release];
}
self->items = ma;
}
return self;
}
- (void)dealloc {
[self->items release];
[self->item release];
[super dealloc];
}
/* accessors */
- (void)setItem:(id)_item {
ASSIGN(self->item, _item);
}
- (id)item {
return self->item;
}
- (NSArray *)list {
return self->items;
}
/* actions */
- (id)sayWhenAction {
WOResponse *r = [[self context] response];
[r appendContentString:@"<p>The time is <b>"];
[r appendContentString:[[NSCalendarDate date] description]];
[r appendContentString:@"</b></p>"];
return r;
}
/* response generation */
- (void)appendToResponse:(WOResponse *)_r inContext:(WOContext *)_ctx {
NSDate *s;
s = [NSDate date];
[super appendToResponse:_r inContext:_ctx];
printf("duration: %.3f\n", [[NSDate date] timeIntervalSinceDate:s]);
}
@end /* Main */

View File

@ -1,18 +0,0 @@
<html>
<head>
<title>Test WEPrototype</title>
<#Prototype/>
</head>
<body bgcolor="#FFFFFF">
<h2>Test WEPrototype</h2>
<div id="time_div">
I don't have the time, but
<#TimeLink>click here</#TimeLink>
and I will look it up.
</div>
</body>
</html>

View File

@ -1,16 +0,0 @@
// bind template to controller
Prototype: WEPrototypeScript {}
TimeLink: WELiveLink {
updateID = "time_div";
position = "top";
actionClass = "Main";
directActionName = "sayWhen";
confirmText = "Really update time?";
}
AppName: WOString {
value = application.name;
}

View File

@ -1,47 +0,0 @@
/*
Copyright (C) 2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include <NGObjWeb/WOApplication.h>
@interface TestPrototype : WOApplication
{
}
@end
#include "common.h"
@implementation TestPrototype
@end /* TestPrototype */
int main(int argc, char **argv, char **env) {
NSAutoreleasePool *pool;
pool = [[NSAutoreleasePool alloc] init];
#if LIB_FOUNDATION_LIBRARY
[NSProcessInfo initializeWithArguments:argv count:argc environment:env];
#endif
WOApplicationMain(@"TestPrototype", argc, (void*)argv);
[pool release];
return 0;
}

View File

@ -1,3 +0,0 @@
#import <Foundation/Foundation.h>
#include <NGObjWeb/NGObjWeb.h>

View File

@ -1,5 +0,0 @@
{
// site local defaults
WODebuggingEnabled = YES;
WOPort = 23032;
}

View File

@ -1,8 +0,0 @@
2003-05-26 Helge Hess <helge.hess@skyrix.com>
* added 'htpasswd', use -clientObject
2003-05-23 Helge Hess <helge.hess@skyrix.com>
* created ChangeLog

View File

@ -1,59 +0,0 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding">
<body bgcolor="#AAAACC">
<table border="0" cellpadding="4" cellspacing="0" bgcolor="#EEEEEE">
<tr>
<th colspan="2">Template: <var:string value="name"/></th>
</tr>
<tr bgcolor="#CCCCCC">
<td valign="top" align="right">clientObject:</td>
<td valign="top" align="left">
<var:string value="clientObject"/>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td valign="top" align="right">soClass:</td>
<td valign="top" align="left">
<var:string value="clientObject.soClass"/>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td valign="top" align="right">pageName:</td>
<td valign="top" align="left"><var:string value="context.page.name"/></td>
</tr>
<tr bgcolor="#CCCCCC">
<td valign="top" align="right">page:</td>
<td valign="top" align="left"><var:string value="context.page"/></td>
</tr>
<tr><td height="4"></td></tr>
<tr>
<td bgcolor="white" colspan="2">
<var:component value="context.page"/>
</td>
</tr>
<tr><td height="4"></td></tr>
<tr>
<td colspan="2">
<a href="test.wox" >test.wox</a>,
<a href="index.html" >index.html</a>,
<a href="/index.html">/index.html</a>,
<a href="embed.wox" >embed.wox</a>,
<a href="accept.gif" >accept.gif</a>,
<a href="subdir" >subdir</a>,
<a href="/subdir" >/subdir</a>
</td>
</tr>
<tr>
<td colspan="2">
traversal-stack:
<var:foreach list="context.objectTraversalStack" item="stackItem">
<li><var:string value="stackItem.nameInContainer" /></li>
</var:foreach>
</td>
</tr>
</table>
</body>
</html>

View File

@ -1,37 +0,0 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding">
<head>
<title><var:string value="context.page.title"/></title>
<meta name="lastChanged" var:content="clientObject.davLastModified"/>
<meta name="author" content="SKYRIX Software AG"/>
<meta name="generator" content="SKYRiX Object Publishing Environment"/>
<meta name="robots" content="index, follow, all" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
<link rev="made" href="mailto:info@developer.skyrix.com" />
</head>
<body bgcolor="white">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="462"><a target="_top" href="/index.html"
><img border="0" src="images/banner_left.gif"/></a></td>
<td width="100%"
background="images/banner_back.gif"><entity name="nbsp"/></td>
<td align="right" width="14"
><img border="0" src="images/banner_right.gif"/></td>
</tr>
</table>
<var:component value="context.page"/>
<hr />
<var:foreach list="clientObject.container.toOneRelationshipKeys"
item="sibling">
<var:string value="sibling" />
</var:foreach>
</body>
</html>

View File

@ -1,22 +0,0 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding"
>
<head>
<title><var:string value="context.page.title"/></title>
<meta name="lastChanged" var:content="clientObject.davLastModified"/>
<meta name="author" content="SKYRIX Software AG"/>
<meta name="generator" content="SKYRiX Object Publishing Environment"/>
<meta name="robots" content="index, follow, all" />
<link rel="shortcut icon" href="/favicon.ico" />
<!-- link rel="stylesheet" href="stylesheet.css" type="text/css" / -->
<link rel="stylesheet" href="blogstyle.css" type="text/css" />
<link rev="made" href="mailto:hh@skyrix.com" />
</head>
<var:component value="context.page"/>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,88 +0,0 @@
/* movable type stuff */
a { color: #003366; text-decoration: underline; }
a:link { color: #003366; text-decoration: underline; }
a:visited { color: #003366; text-decoration: underline; }
a:active { color: #999999; }
a:hover { color: #999999; }
h1, h2, h3 {
margin: 0px;
padding: 0px;
}
div#banner {
font-family: palatino, georgia, verdana, arial, sans-serif;
color: #333333;
font-size: 12pt;
font-weight: normal;
margin: 5px;
border-bottom: 1px solid #08348B;
}
div#banner a, div#banner a:link, div#banner a:visited,
div#banner a:active, div#banner h1 {
font-family: palatino, georgia, verdana, arial, sans-serif;
font-size: 12pt;
color: #333333;
text-decoration: none;
}
div#banner a:hover {
font-family: palatino, georgia, verdana, arial, sans-serif;
font-size: xx-large;
color: #333333;
text-decoration: underline;
}
span.description {
font-family: palatino, georgia, times new roman, serif;
color: #333333;
font-size: small;
text-transform: none;
}
div#content {
background: #FFFFFF;
border: 1px solid #FFFFFF;
}
div.blog {
padding: 15px;
background: #FFFFFF;
}
div.blogbody {
font-family: palatino, georgia, verdana, arial, sans-serif;
color: #333333;
font-size: small;
font-weight: normal;
background: #FFFFFF;
line-height: 150%;
}
div.blogbody a, div.blogbody a:link, div.blogbody a:visited,
div.blogbody a:active, div.blogbody a:hover {
font-weight: normal;
text-decoration: underline;
}
h3.title {
font-family: palatino, georgia, times new roman, serif;
font-size: 8pt;
color: #666666;
}
h2.projecttitle {
font-family: palatino, georgia, times new roman, serif;
font-size: 11pt;
color: #333333;
border-bottom: 1px solid #08348B;
margin-bottom: 10px;
font-weight: bold;
}
div.projectowner {
font-family: verdana, arial, sans-serif;
font-size: x-small;
color: #000000;
margin-bottom: 25px;
}

Some files were not shown because too many files have changed in this diff Show More