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: Paolo Bonzini
Subject: Re: [Help-smalltalk] Version number in star packages
Date: Thu, 31 Dec 2009 00:56:12 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

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. :-)

Paolo




reply via email to

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