[TIMOB-25167] Hyperloop: iOS - Debugging not working reliably with Studio
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Hyperloop 2.1.3 |
Fix Version/s | n/a |
Components | Hyperloop, iOS |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Unknown |
Created | 2017-08-14T11:59:29.000+0000 |
Updated | 2018-02-28T19:55:30.000+0000 |
Description
*Steps to reproduce the behavior*
Replace the content in
Create a default Alloy app
Replace the content in app/controllers/index.js
with the following:
function doClick(e) {
alert($.label.text);
}
var UIButton = require('UIKit/UIButton');
var UIColor = require('UIKit/UIColor');
var UIControlStateNormal = require("UIKit").UIControlStateNormal;
var UIControlEventTouchUpInside = require("UIKit").UIControlEventTouchUpInside;
var CGRectMake = require('CoreGraphics').CGRectMake;
var button = UIButton.alloc().initWithFrame(CGRectMake(20, 20, 100, 50));
button.setTitleColorForState(UIColor.blueColor, UIControlStateNormal);
button.setTitleForState('CLICK ME!', UIControlStateNormal);
var ButtonActionHandler = Hyperloop.defineClass('ButtonActionHandler', 'NSObject');
ButtonActionHandler.addMethod({
selector: 'didPressButton:',
arguments: ['UIButton'],
callback: function(sender) {
alert('Button pressed!'); // Set breakpoint here
}
});
handler = new ButtonActionHandler();
button.addTargetActionForControlEvents(handler, 'didPressButton:', UIControlEventTouchUpInside);
$.index.add(button);
$.index.open(); // Set breakpoint here
No comments