help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Version number in star packages


From: Nicolas Petton
Subject: Re: [Help-smalltalk] Version number in star packages
Date: Thu, 31 Dec 2009 03:58:50 +0100

Le jeudi 31 décembre 2009 à 00:56 +0100, Paolo Bonzini a écrit :
> On 12/30/2009 11:15 PM, Gwenael Casaccio wrote:
> > -                       "I tried to put these from the most common to the 
> > least common"
> > -                       tag = 'file' ifTrue: [self files add: cdata] 
> > ifFalse: [
> > -                       tag = 'filein' ifTrue: [self fileIns add: cdata] 
> > ifFalse: [
> > -                       tag = 'prereq' ifTrue: [self prerequisites add: 
> > cdata] ifFalse: [
> > -                       tag = 'provides' ifTrue: [self features add: cdata] 
> > ifFalse: [
> > -                       tag = 'module' ifTrue: [self modules add: cdata] 
> > ifFalse: [
> > -                       tag = 'directory' ifTrue: [self relativeDirectory: 
> > cdata] ifFalse: [
> > -                       tag = 'name' ifTrue: [self name: cdata] ifFalse: [
> > -                       tag = 'url' ifTrue: [self url: cdata] ifFalse: [
> > -                       tag = 'namespace' ifTrue: [self namespace: cdata] 
> > ifFalse: [
> > -                       tag = 'library' ifTrue: [self libraries add: cdata] 
> > ifFalse: [
> > -                       tag = 'built-file' ifTrue: [self builtFiles add: 
> > cdata] ifFalse: [
> > -                       tag = 'sunit' ifTrue: [self sunitScripts add: 
> > cdata] ifFalse: [
> > -                       tag = 'start' ifTrue: [self startScript: cdata] 
> > ifFalse: [
> > -                       tag = 'stop' ifTrue: [self stopScript: cdata] 
> > ifFalse: [
> > -                       tag = 'callout' ifTrue: [self callouts add: cdata] 
> > ifFalse: [
> > -                       tag = openingTag ifTrue: [^self] ifFalse: [
> > -                           self error: 'invalid tag ' , 
> > tag]]]]]]]]]]]]]]]].
> > +                       tag = openingTag ifTrue: [ ^ self ].
> > +                       self perform: (self class tags at: tag ifAbsent: [ 
> > self error: 'invalid tag ', tag ]) with: cdata.
> 
> I forgot to say that things like this one embarrass me. :-)

I agree, but on the other hand the long list of if statements bothers me
too :-p

Nico

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

[Prev in Thread] Current Thread [Next in Thread]