tidev / hyperloop.next Goto Github PK
View Code? Open in Web Editor NEWHyperloop Next version (we forgot the version number at this point)
License: Other
Hyperloop Next version (we forgot the version number at this point)
License: Other
The following code draws some shapes using Hyperloop and add them to a view. If I add and remove the shapes a couple of times, the app suddenly crashes. I do not see any error on the console.
Tested with both simulator and physical iPad with iOS 15.
Ti SDK 10.1.0.GA
import {
UIView,
UIColor,
UIBezierPath,
} from 'UIKit';
import {
CoreGraphics
} from 'CoreGraphics';
import {
CAShapeLayer
} from 'QuartzCore';
function createView() {
const SIZE = 50;
var bezier = UIBezierPath.alloc().init();
bezier.moveToPoint(CoreGraphics.CGPointMake(Math.round(SIZE / 2), 0));
bezier.addLineToPoint(CoreGraphics.CGPointMake(0, SIZE));
bezier.addLineToPoint(CoreGraphics.CGPointMake(SIZE, SIZE));
bezier.closePath();
var shape = CAShapeLayer.layer();
shape.fillColor = UIColor.redColor.CGColor;
shape.path = bezier.CGPath;
var view = Ti.UI.createView({width: SIZE, height: SIZE, left: 20, top: 20})
var nativeView = UIView.cast(view);
nativeView.layer.addSublayer(shape);
return view;
}
var win = Ti.UI.createWindow();
var addButton = Ti.UI.createButton({top: 50, left: 100, title: 'Add'});
win.add(addButton);
var removeButton = Ti.UI.createButton({top: 50, right: 100, title: 'Remove'});
win.add(removeButton);
var container = Ti.UI.createView({
top: 100, bottom: 0, width: Ti.UI.FILL,
backgroundColor: 'green', layout: 'horizontal',
});
win.add(container);
addButton.addEventListener('click', function() {
for (var i=0; i < 100; i++) {
container.add(createView());
}
});
removeButton.addEventListener('click', function() {
container.removeAllChildren();
});
win.open();
Is this a new repository for https://www.npmjs.com/package/hyperloop ? If so, why hasn't it been updated since v0.1.3 in 2014?
I have no idea how to install hyperloop updates, unless I'm not supposed to be able to.
EDIT: I think I understand now that I can download a release and place it in the global Titanium modules folder, though I found that I already have the latest installed. I just needed to change the hyperloop version in my tiapp.xml file:
<module version="7.0.4">hyperloop</module>
Still not sure why this is published on npm but not updated with the latest releases.
./build.sh
fails. One trivial change that probably should be made is in /android/build.properties
the first line reads
titanium.platform=${user.home}/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.v20151116164440/android
It should probably use 5.2.0.GA instead.
On to the bigger point. After /tools/build.sh is ran, it does not line up with /android/build.properties
.
Either there needs to be documentation in the README to modify build.properties
, or ./tools/build.sh
should modify the build.properties
.
Otherwise you run into the following issue:
[mkdir] Created dir: /var/folders/sk/vh0m10155lb3j7rt0_6vxdh00000gn/T/andrewmcelroy/hyperloop-android-generated
[copy] Copying 75 files to /var/folders/sk/vh0m10155lb3j7rt0_6vxdh00000gn/T/andrewmcelroy/hyperloop-android-generated
BUILD FAILED
/Users/andrewmcelroy/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA/module/android/build.xml:348: The following error occurred while executing this line:
/Users/andrewmcelroy/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA/module/android/build.xml:303: Execute failed: java.io.IOException: Cannot run program "/Users/andrewmcelroy/Library/android-ndk-r10e/ndk-build" (in directory "/var/folders/sk/vh0m10155lb3j7rt0_6vxdh00000gn/T/andrewmcelroy/hyperloop-android-generated"): error=2, No such file or directory
at java.lang.ProcessBuilder.processException(ProcessBuilder.java:478)
/Users/andrewmcelroy/Library/android-ndk-r10e
does not exist.
For now, I can just modify but not commit the build.properties
, but we might want to make a note of this.
Using hyperloop for Titanium Windows fails with following error even when we have modules
entry in tiapp.xml
.
> appc ti build -p windows --target wp-device -l trace
[ERROR] : Hyperloop is currently configured but the module has not be installed.
[ERROR] : Add the following to your tiapp.xml:
[ERROR] :
[ERROR] : <modules>
[ERROR] : <module platform="windows">hyperloop</module>
[ERROR] : </modules>
Issue for some Slack users:
Hyperloop, Xcode 15 (Beta 8 was working)
Error: cannot figure out objc return result
at Object.getObjCReturnResult (/Users/user/Library/Application Support/Titanium/modules/iphone/hyperloop/7.0.5/hooks/generate/util.js:626:8)
at /Users/user/Library/Application Support/Titanium/modules/iphone/hyperloop/7.0.5/hooks/generate/block.js:113:31
at Array.forEach (<anonymous>)
at Object.generateBlockWrapper (/Users/BatMan/Library/Application Support/Titanium/modules/iphone/hyperloop/7.0.5/hooks/generate/block.js:109:19)
at /Users/user/Library/Application Support/Titanium/modules/iphone/hyperloop/7.0.5/hooks/generate/index.js:290:39
at Array.forEach (<anonymous>)
at /Users/user/Library/Application Support/Titanium/modules/iphone/hyperloop/7.0.5/hooks/generate/index.js:289:18
at Array.forEach (<anonymous>)
at /Users/user/Library/Application Support/Titanium/modules/iphone/hyperloop/7.0.5/hooks/generate/index.js:282:43
at /Users/user/Library/Application Support/Titanium/modules/iphone/hyperloop/7.0.5/hooks/node_modules/async/dist/async.js:473:16
Place is:
hyperloop.next/iphone/hooks/generate/util.js
Line 626 in 6e9eae7
return value:
{
encoding: '{?=qiIq}',
name: 'actualTime',
type: 'record',
value: 'CMTime'
}
After branching 1_2_X, we merged some PR's that have not been backported. We need to clean that up to not loose track of certain PR's. As both repos should still be 1.2.X, I would rebase 1_2_X with master now and keep track of all backports after #48 is merged. @cheekiatng fyi
When enabling hyperloop in a project, and using optional changing so
e.result?.percent_off
you can't build on Android -- you get the error in the title as hyperloop scans files and those files use optional changing
The solution is to either not use HL or remove all optional chaining.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.