Why do you assume all keys of dictionarys understand beginsWith: ? Thanks mike On Wednesday, July 8, 2009, David Goehrig <dave@nexttolast.com> wrote:
So I've been doing some very bad things to dictionaries, and I've had to make a small change: 'From Pharo0.1 of 16 May 2008 [Latest update: #10342] on 8 July 2009 at 12:28:04 pm'!
!Dictionary methodsFor: 'testing' stamp: 'djg 7/8/2009 11:53'!hasBindingThatBeginsWith: aString "Answer true if the receiver has a key that begins with aString, false otherwise" self keysDo:[:each |Â each ifNotNil: [ (each beginsWith: aString) ifTrue:[^true]]]. ^false! !
I'm occasionally had code blow up and was left with nil keys in my SystemDictionary (which may be a red herring), and SHParserST80 resolvePartial: was throwing fits as a result of what I believe was an environment key being nil.
I doubt this is a suitable fix, but if someone know why that might happen I'd love to hear it. Dave -- -=-=-=-=-=-=-=-=-=-=- http://blog.dloh.org/