'From etoys2.3 of 28 November 2007 [latest update: #1812] on 1 December 2007 at 2:11:15 pm'! !RuleSelectionCodeDate commentStamp: 'yo 11/28/2007 15:21' prior: 0! This class is deprecated. Use the chronology package classes RuleSelectionCodeDate instances represent dates determined by some rule but the exact day of the month varies from year to year. Once created they must be updated for a selected year to represent the exact day of that year. It has a rule that selects exact day of the month by evaluating the selection block with the list of days occurring on that day of the week in the desired month as an argument. Typical Use: RuleSelectionCodeDate instances are suitable for representing dates such as the last day of daylight saving time (the Saturday before the last Sunday in October) in the USA. Implementation: Instance variables: (selectionRule in super class) - a containing the selection block to be evaluated. The argument is the list of days occurring on that day of the week in the desired month. It must return the desired day of the month which may be any . ! !Exception methodsFor: 'handling' stamp: 'ajh 6/27/2003 22:13'! outer "Evaluate the enclosing exception action and return to here instead of signal if it resumes (see #resumeUnchecked:)." | prevOuterContext | self isResumable ifTrue: [ prevOuterContext _ outerContext. outerContext _ thisContext contextTag. ]. self pass. ! ! !Exception methodsFor: 'handling' stamp: 'ajh 1/29/2003 13:36'! retry "Abort an exception handler and re-evaluate its protected block." handlerContext restart! ! !LanguageEditor methodsFor: 'private' stamp: 'yo 12/1/2007 14:11'! checkSpanishPhrase: phraseString translation: translationString "check the translation and aswer a string with a comment or a nil meaning no-comments" | superResult | superResult := self checkPhrase: phraseString translation: translationString. superResult isNil ifFalse: [^ superResult]. "For some reason, MCInstaller couldn't read Spanish character. " "((translationString includes: $?) and: [(translationString includes: $¿) not]) ifTrue: [^ '¿Olvidó el signo de pregunta?']. ((translationString includes: $!!) and: [(translationString includes: $¡) not]) ifTrue: [^ '¿Olvidó el signo de admiración?']. " ^ nil ! ! !NCMakerButton methodsFor: 'menus' stamp: 'yo 11/29/2007 10:22'! setActionSelector | newSel possibilities request | possibilities _ #(startWiring startWiringLabeled openInHand openInWorld) select: [ :ea | target respondsTo: ea ]. request _ 'Please type the selector to be sent to the target when this button is pressed. Some possibilities:'. possibilities do: [ :ea | request _ request, ' · ', ea ]. newSel _ FillInTheBlank request: request initialAnswer: actionSelector. newSel isEmpty ifFalse: [self actionSelector: newSel]. ! ! !Player methodsFor: 'slot getters/setters' stamp: 'tk 4/23/2007 09:53'! setCharacterAtCursor: aCharOrString "Insert the given character at my cursor position" | aLoc aTextMorph aString charToUse newText | aLoc _ (aTextMorph _ self costume renderedMorph) cursor. charToUse _ (aString _ aCharOrString asString) size > 0 ifTrue: [aString first] ifFalse: ['·']. newText _ charToUse asString asText. (aTextMorph text attributesAt: aLoc) do: [:att | newText addAttribute: att]. aTextMorph paragraph replaceFrom: aLoc to: aLoc with: newText displaying: true. aTextMorph updateFromParagraph. ! ! !PortugueseLexiconServer methodsFor: 'as yet unclassified' stamp: 'tk 6/30/2000 12:02'! parts | divider | "return the parts of speech this word can be. Keep the streams for each" parts _ OrderedCollection new. partStreams _ OrderedCollection new. rwStream ifNil: [self stream]. rwStream reset. rwStream match: 'Palavra desconhecida pelo Dicionário.'. rwStream atEnd ifFalse: [^ #()]. "not in dictionary" rwStream reset. rwStream match: (divider _ '
  • '). "stemming a complex word" rwStream atEnd ifTrue: [rwStream reset. rwStream match: (divider _ '
    ')]. "base word in dict" [rwStream atEnd] whileFalse: [ partStreams add: (ReadStream on: (rwStream upToAll: divider))]. partStreams do: [:pp | parts add: (pp upToAll: '')]. parts size = 0 ifTrue: [^ parts]. parts last = '' ifTrue: [parts removeLast. partStreams removeLast]. "May want to remove all after " ^ parts ! ! !SMInstaller methodsFor: 'services' stamp: 'gk 11/16/2003 21:56'! download "This service should bring the package release to the client and also unpack it on disk if needed. It will not install it into the running image though. Raises errors if operation does not succeed." self subclassResponsibility ! ! !TextMorph methodsFor: 'scripting access' stamp: 'tk 4/23/2007 10:51'! setAllButFirstCharacter: source "Set all but the first char of the receiver to the source" | chars | (chars _ self getCharacters) isEmpty ifTrue: [self newContents: '·' , source asString] ifFalse: [self newContents: (String streamContents: [:aStream | aStream nextPut: chars first. aStream nextPutAll: source])]! !