Hi,I tested it it without hurrying today.Using Cmd+s with 'whenTextIsAccepted:' works both on Pharo 2.0 and 3.0.Unfortunately I exchanged the TextModel with TextInputFieldModel where it did not work.However, using 'whenTextChanged:' does not work or at least not how I expect it to work.From the naming I would that this message gets triggered, once something was typed into the textfield.But apparently it doesn't get triggered at all in my case (Pharo 2.0 and 3.0).Any ideas?
Best,ManfredOn Thu, Oct 24, 2013 at 2:35 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
Ok :)Thank you, and see you tomorrow :P
BenOn 24 Oct 2013, at 14:34, Manfred Kr�hnert <mkroehnert42@googlemail.com> wrote:Yes, I can do that but it'll have to wait until tomorrow.Will report back, soon.Thanks for the help so far,ManfredOn Thu, Oct 24, 2013 at 2:29 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
Can you try in 3.0, since Spec changed *a lot* in the meantime
BenOn 24 Oct 2013, at 14:25, Manfred Kr�hnert <mkroehnert42@googlemail.com> wrote:Hello Ben and Cl�ment,thanks for the quick reply.But even when I hit Cmd+s the Text of the label stays the same and the button is not enabled.No matter if I use 'whenTextChanged:' or 'whenTextIsAccepted:'.I only tested this in the Pharo 2.0 image.Best,ManfredOn Thu, Oct 24, 2013 at 2:22 PM, Cl�ment Bera <bera.clement@gmail.com> wrote:Hey,Accepting a text usually means the is compiled. To accept a text, right click on it, then click accept in the contextual menu (at the bottom). You can also do it with Cmd+s on Mac.Try again and tell us if the #whenTextIsAccepted: works fine in your image or not.Best,2013/10/24 Benjamin <benjamin.vanryseghem.pharo@gmail.com>Text is accepted when you �save� it (cmd+s)
BenOn 24 Oct 2013, at 14:05, Manfred Kr�hnert <mkroehnert42@googlemail.com> wrote:Hi everyone,I finally got around to check back on a Spec question that popped up about two weeks ago.At that time I was giving Spec a first try and gathered information from a couple of sources.One of them was the draft chapter about Spec from the Pharo for the Enterprise book.The example has the following method:TestSpec>>initializePresenter
example whenTextIsAccepted: [ changes text: 'The text Changed'. acceptChanges enable ].This should change the text of the 'changes' LabelModel when the text in the 'example' TextModel is accepted.Now, there the issue for me was that the Label text did not change once when I typed text into the presented textfield.
Even when I changed the method from 'whenTextIsAccepted:' to 'whenTextChanged:'.Is this intended or is this an issue with Spec?Also, it is not clear to me what 'accepting' text means (maybe I didn't look thoroughly enough).The method comment just states that it is called when the text is accepted.Which is kind of self referential ;-)The OS X Pharo versions I used for testing where newly downloaded Pharo 2.0 and 3.0 from about 2 weeks ago.They were downloaded from here:Best,Manfred