> On 27 Jun 2017, at 18:30, Tim Mackinnon <tim@testit.works> wrote: > > Yes ZnConstants initialize > Works, > > When I inspected the constants before this, it seemed to have everything > except 511 (the last one). > > Is there a load error in Pharo - as if the initialise code is correct, and > the images are built with a CI process - I’m wondering how it gets into that > state?
When a class is loaded, class side #initialize methods are run (so classes are re-initialized) if their source code changed (compared to what is already in the image). When 511 was added, the #initialize did not change, hence it was not run. That is why I currently add a comment like "Forced source code change for automatic initialization: 20170510" where I change the date when needed. > Tim > >> On 27 Jun 2017, at 15:02, Sven Van Caekenberghe <s...@stfx.eu> wrote: >> >> Hi Tim, >> >>> On 27 Jun 2017, at 15:50, Tim Mackinnon <tim@testit.works> wrote: >>> >>> Hi - I have been slowly working my way through some of the pharo components >>> and tutorials and when trying out ZnEasy with a password protected api, I >>> got a talkback when I mistyped a password. >>> It looks like ZnConstants in a fresh Pharo 6.0 32 image excludes 511 from >>> its constants. The code looks correct (and its defined in the initialize >>> method - ) but when I tried a ZnEasy call which returned 511 I got a >>> walkback showing it as an unrecognized code? (The walkback is looking for >>> 511 in ZnConstants httpStatusCodes). >>> >>> Is there some problem in the build process, or is this some type of user >>> error? >>> >>> Tim >> >> You should get >> >> ZnStatusLine code: 511. "a ZnStatusLine(511 Network Authentication Required)" >> >> If that is not the case, do >> >> ZnConstants initialize. >> >> What does ZnConstants class>>#initialize look like for you ? >> >> The latest version should read like >> >> initialize >> "Forced source code change for automatic initialization: 20170510" >> >> self initializeHTTPStatusCodes >> >> Sven > >