Can't seem to create actions

28 views
Skip to first unread message

James Cicenia

unread,
Jul 12, 2014, 3:33:01 PM7/12/14
to zucchini...@googlegroups.com
Here is my screen script:

class WelcomeScreen extends Screen
  #anchor: -> $("navigationBar[name=Welcome]")

  constructor: ->
    super 'welcome'

    extend @elements,
    'Go' : -> view.buttons()["Go"]
    extend @actions,
    'Type "([^"]*)" in the username field$': (text) ->
      field = view.elements()['Username']
      field.setValue text

'Show elements': -> view.logElementTree()

    'Rotate to landscape': -> UIATarget.localTarget().setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPELEFT)



The error log is ;

Script threw an uncaught JavaScript error: Action for line '  Rotate to landscape' not defined on line 615 of feature.js


What am I doing wrong? Why is it trying to reference feature.js ?


Thank you.


James Cicenia

unread,
Jul 13, 2014, 11:32:53 AM7/13/14
to zucchini...@googlegroups.com
Seems like I have no luck in creating anything that will extend Screen:

I tried this and I get the same type of error (I do see it in the runtime features.js)

'Tap Facebook': -> view.elements()['Facebook Login View Button'].tap()

Then when I call that in Zucchini I get the dreaded error 'not defined'

PLEASE HELP THIS NOOB! Thanks

James Cicenia

unread,
Jul 13, 2014, 10:02:20 PM7/13/14
to zucchini...@googlegroups.com
SOLVED THIS PROBLEM

My TextMate was indenting with Tabs and Coffee doesn't like that.... that took 4 hours of my life away.
Reply all
Reply to author
Forward
0 new messages