03 May 2013, 16:02
Bernardsquare_pragsmall

Bernard Farrell (13 posts)

I just downloaded this to get started on the first chapter.

There are a lot of NearbyMe.xcodeproj instances. Can I suggest that you tell the reader which directory and step to use in the book. Alternately name the top level directories after the chapter names, or use “Chapter 1” etc.

Looking forward to getting into this.

05 May 2013, 00:36
Avatar_pragsmall

Jonathan Penn (43 posts)

Thanks for the feedback, Bernard! Every snippet of code referenced in the pages of the book has the full path referenced. The top level folders are not named with numbers because as I was writing the book the order of the chapters changed–which happens often as the flow became evident. I’ll talk to my editor about possibly going through and adding numbers. The book is still in beta, but I don’t foresee a reason why we need to shuffle the chapters around again.

Do you have a specific code reference on a page where you were not able to find the source file mentioned? If so, I’ll get that fixed quick.

06 May 2013, 18:32
Bernardsquare_pragsmall

Bernard Farrell (13 posts)

Jonathan my apologies for the false alarm. For some reason I didn’t see the URL above each code snippet until later in the book. My bad.

This is a really useful book which the market really needs. One thing I’ve been unable to find is what other parts of JavaScript work inside a test script. I already know that file handling is not supported. I wish Apple would list a grammar for the automation JavaScript.

07 May 2013, 16:58
Avatar_pragsmall

Jonathan Penn (43 posts)

The good news is that this is pure JavaScript. All that DOM and Ajax stuff are just objects that live in the browser and was different from browser to browser. It would be nice to have network access, in particular, but as far as the “grammar” included, it’s pure JavaScript squeezed fresh from the…well…whatever JavaScript juice comes from. :)

13 May 2013, 17:04
Bernardsquare_pragsmall

Bernard Farrell (13 posts)

This is a separate FYI issue that’s tangentially related to source code. You have a class called Screen defined in Screen.js. There’s an addon JS library for UI Automation called “Mechanic.js”:http://www.cozykozy.com/mechanicjs/; which also contains a Screen class defined in screen.js (different case).

These should work together, I’m just concerned about the namespace clashes.

13 May 2013, 21:39
Avatar_pragsmall

Jonathan Penn (43 posts)

Thanks for pointing that out. Because I only mention Mechanic as a possibility and because it’s my opinion that library code should namespace itself as much as possible, I’m going to leave the book code as it is. I don’t think cluttering up the examples is worth it.

  You must be logged in to comment