[SW2] [FAQ] Install SmallWiki 2
by Lukas Renggli
1. Take a Squeak 3.8 (3.7 or 3.9 should also work)
2. Install Magritte from SqueakMap. It will ask you if you would like
to install Seaside as well, do so.
3. Install OmniBrowser from SqueakMap.
3. Add the following repository to Monticello and load SmallWiki2-All
MCHttpRepository
location: 'http://mc.lukas-renggli.ch/smallwiki2'
user: ''
password: ''
Soon I will add another package for SmallWiki to SqueakMap, this will
pull in all the required packages including Magritte and its
dependencies.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
17 years, 10 months
Re: [SW2] Solution to keep ids with a list
by Lukas Renggli
Hi Damien,
your approach is certainly very interesting. Congratulations, you are
the first one to use Magritte together with a relational database!
I was thinking about similar things, especially using Magritte (maybe
together with ROE) to do relational object mapping. Having a generic
framework like this would be very cool.
Basically Magritte descriptions can be directly mapped to a
relational-database:
- MAConatiner --> Table (that automatically alter the tables as soon
as the containing descriptions change)
- MAElementDescription --> Column
- MAStringDescription -> VARCHAR
- MANumberDescription -> INT
- MADateDescription -> DATE
- ...
- MAeRelationship --> Foreign Key
- MAOneToOneRelationship -> 1:1 mapping
- MAOneToManyRelationship -> 1:n mapping
You are using the MAAssociationDescription to do the mapping from the
db-id to the object? I think a database-layer should be as
transparent as possible and not require the programmer to think about
ids and primary-keys, etc. But yeah, this is not an easy problem ;-)
I am interested to see a demo of your code!
Lukas
On 9 Nov 2005, at 08:00, Damien Cassou wrote:
> Hi Lukas,
>
> I found a problem and a solution what do you think about it ?
>
> My project works with DB. I have a Table State which stores
> different stats (Switzerland, France, Espana...). I have a table
> Person with a field for the orign state (where the person was borned).
> When I edit a person, I want a SingleOptionComponent representing
> the different states in the DB (the state names). And when I save
> the form, I want the Id of the state, not its name (because the
> Person table use a foreing key to the state table).
>
> My Solution :
>
> - Add a new field for MADescription named : #withId (and implement
> isWithId, beWithId...)
> - Create an AssociationDescription with a #kind method returning
> the class Association. AssociationDescription inherit from
> MAElementDescription.
> - Add a description to the person with:
> options: (MADynamicObject on: [GISQL
> getNamesCollectionFrom: 'Select Id, Name FROM State ORDER BY Name']);
> reference: GIAssociationDescription new;
>
> #getNamesCollectionFrom returns an association collection of type
> Id->Name
>
> When I want to get the Id of the model with the description I use :
>
> value := description accessor read: aDescribedObject.
> description isWithId ifTrue: [ value := value key ].
>
>
> It works great. What is your opinion about this ?
>
> Thanks
--
Lukas Renggli
http://www.lukas-renggli.ch
17 years, 10 months
[SmallWiki] A Private SmallWiki
by Frederic Pluquet
Hi everybody,
I needed to make a private folder in SmallWiki, for
students but also for me and other participants at the
wiki. I developped an extension of SmallWiki that
allows to create personal and private
folders/pages/resources and manage (private) users.
It works good and very simply.
For more informations :
http://decomp.ulb.ac.be/frdricpluquet/personalstuff/.
Any questions or remarks, please reply this email.
Fréd
---------------------
Frédéric Pluquet
Assistant at Université Libre de Bruxelles (Brussel)
email : fpluquet(a)ulb.ac.be
[
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez cette version sur http://fr.messenger.yahoo.com
17 years, 10 months
[SW2] Installation fail due to the licence
by Damien Cassou
Hi,
at this end of the installation, the following squeak code is executed :
SW2Kernel>>defaultInfoLicense
^ SW2Page new
title: 'License';
contents: '!' , self class license.
The method SW2Kernel class>>licence does not exist.
--
Damien
17 years, 10 months
[BUG] rendering as is
by stéphane ducasse
Hi
=<?xml version="1.0" encoding="UTF-8"?>
=<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
="http://www.apple.com/DTDs/PropertyList-1.0.dtd">
=<plist version="1.0">
=<dict>
=<key>DISPLAY</key>
=<string>localhost:0.0</string>
=</dict>
=</plist>
=</pre>
does not render the text without =
Stef
17 years, 10 months
[SW2] Example browser bug
by Damien Cassou
Open : http://localhost:8080/seaside/examplebrowser
Change "exampleEditor" to "exampleMeta" in the list and click 'ok'.
MAStringReader class(Object)>>doesNotUnderstand: #label
Receiver: MAStringReader
Arguments and temporary variables:
aMessage: label
Receiver's instance variables:
superclass: MAReader
methodDict: a MethodDictionary(#read:description:->a
CompiledMethod (524) #visi...etc...
format: 134
instanceVariables: nil
organization: ('visiting' read:description:)
('visiting-description' visitBoole...etc...
subclasses: nil
name: #MAStringReader
classPool: nil
sharedPools: nil
environment: a SystemDictionary(lots of globals)
category: nil
MAStringWriter>>visitClassDescription:
Receiver: a MAStringWriter
Arguments and temporary variables:
aDescription: a MAClassDescription label: nil comment: nil
Receiver's instance variables:
stream: a WriteStream ''
object: MAStringReader
MAClassDescription>>acceptMagritte:
Receiver: a MAClassDescription label: nil comment: nil
Arguments and temporary variables:
aVisitor: a MAStringWriter
Receiver's instance variables:
properties: a Dictionary()
accessor: nil
MAStringWriter(MAVisitor)>>visit:
Receiver: a MAStringWriter
Arguments and temporary variables:
anObject: a MAClassDescription label: nil comment: nil
Receiver's instance variables:
stream: a WriteStream ''
object: MAStringReader
--- The full stack ---
MAStringReader class(Object)>>doesNotUnderstand: #label
MAStringWriter>>visitClassDescription:
MAClassDescription>>acceptMagritte:
MAStringWriter(MAVisitor)>>visit:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MAStringWriter(MAWriter)>>write:description:to:
MAStringWriter>>write:description:to:
MAStringWriter(MAWriter)>>write:description:
MAStringWriter class(MAWriter class)>>write:description:
MAClassDescription(MADescription)>>toString:writer:
MAClassDescription(MADescription)>>toString:
[] in MASelectListComponent>>renderEditorOn: {[:value | self reference
toString: value]}
WASelectTag(WACollectionTag)>>labelForOption:
[] in WASelectTag>>with: {[:each | canvas option selected: (self
isSelected: each); callback: [...]}
OrderedCollection>>do:
[] in WASelectTag>>with: {[self isOptional ifTrue: [canvas option
selected: selected = nil; ...]}
BlockContext>>renderOn:
WASelectTag(WATagBrush)>>within:
[] in WASelectTag(WATagBrush)>>with: {[self within: aBlock]}
BlockContext>>renderOn:
WARenderCanvas(WACanvas)>>nest:
WASelectTag(WABrush)>>with:
WASelectTag(WATagBrush)>>with:
WASelectTag>>with:
WASelectTag(WABrush)>>close
WARenderCanvas(WACanvas)>>flush
WARenderCanvas>>close
MASelectListComponent(WAPresenter)>>renderWithContext:
[] in MASelectListComponent(WAComponent)>>renderOn: {[:each | each
renderWithContext: aRenderer context]}
MASelectListComponent(WAComponent)>>decorationChainDo:
MASelectListComponent(WAComponent)>>renderOn:
WARenderCanvas>>render:
MATableRenderer(MAComponentRenderer)>>renderControl:
[] in MATableRenderer>>renderControl: {[super renderControl: aDescription]}
BlockContext>>renderOn:
WATableDataTag(WATagBrush)>>within:
[] in WATableDataTag(WATagBrush)>>with: {[self within: aBlock]}
BlockContext>>renderOn:
WARenderCanvas(WACanvas)>>nest:
WATableDataTag(WABrush)>>with:
WATableDataTag(WATagBrush)>>with:
MATableRenderer>>renderControl:
MATableRenderer(MAComponentRenderer)>>renderElement:
[] in MATableRenderer>>renderElement: {[super renderElement: aDescription]}
BlockContext>>renderOn:
WAGenericTag(WATagBrush)>>within:
[] in WAGenericTag(WATagBrush)>>with: {[self within: aBlock]}
BlockContext>>renderOn:
WARenderCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
MATableRenderer>>renderElement:
MATableRenderer(MAComponentRenderer)>>visitElementDescription:
MATableRenderer(MAVisitor)>>visitReferenceDescription:
MATableRenderer(MAVisitor)>>visitOptionDescription:
MATableRenderer(MAVisitor)>>visitSingleOptionDescription:
MASingleOptionDescription>>acceptMagritte:
MATableRenderer(MAVisitor)>>visit:
[] in MATableRenderer(MAVisitor)>>visitAll: {[:each | self visit: each]}
...etc...
17 years, 10 months