loader

Setting Loader.active to false doesn't release item immediately

只谈情不闲聊 提交于 2019-11-29 18:37:53
I have a use case where depending on the presence or absence of a property value an object referencing it is either created or removed. I am using a Loader for the purpose, where the active property is bound to the property, that is when the property has a non-null value the loader is activated, when it is set to null it is deactivated. However the problem is that the loader doesn't release its item immediately, so for a moment the item references a null property, thus is unable to access data, while the setting of the property to null triggers reevaluations that result in a swarm of cannot

Dagger 2 with MVP, avoid creating extra presenter object on view recreation

泄露秘密 提交于 2019-11-29 16:29:15
问题 I have an app implementing the MVP pattern with a Loader to maintain the presenter object on view recreation (there's an article about this here). I'm new to Dagger 2, trying to implement it together with the current code. I've managed to make it work, but now my presenter is created twice. At first it was created using a factory class which was initialized in onCreateLoader , but then, when adding Dagger 2 implementation, I had two objects created (in factory class and when injecting). Now I

load time relocation and virtual memory

為{幸葍}努か 提交于 2019-11-29 15:43:56
问题 I am wondering what load-time relocation actually means on a system with virtual memory support.I was thinking that in a system with virtual memory every executable will have addresses starting from zero and at run-time the addresses will be translated into physical addresses using page tables.Therefore the executable can be loaded anywhere in memory without the need of any relocation. However this article on shared libraries mentions that linker specifies an address in the executable where

AS3 Stop external swf

让人想犯罪 __ 提交于 2019-11-29 14:07:45
Hi I'm loading an external swf into a MovieClip, and I want it to stop until I choose to play. Currently it plays upon loading immediately. var mc:MovieClip; var swfLoader:Loader = new Loader(); swfLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, eventLoaded); var request:URLRequest; request = new URLRequest("external.swf"); swfLoader.load (request); function eventLoaded(e:Event): void { mc = e.target.content as MovieClip; // does not stop the clip mc.Stop (); } So I tried adding a Event.ENTER_FRAME to the movieclip and stop it there, that will stop but it will play the first frame.

Adobe Flash Builder (flex4): addChild() is not available in this class.

陌路散爱 提交于 2019-11-29 09:04:07
问题 I want to load an swf into a flex 4 application in order to use its classes. var ldr:Loader=new Loader(); ldr.load(new URLRequest("file://path/to/fileswf")); ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded); function loaded(evt:Event):void { addChild(ldr); } I receive the error: Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one. at spark.components.supportClasses::SkinnableComponent/addChild()[E:\dev\gumbo_beta2

How can I get the background color of a loaded swf file?

我的未来我决定 提交于 2019-11-29 08:48:12
I'm loading an swf file into my main application using URLLoader, I want to get the background color of the loaded swf file. ( I heard that one solution wold be reading the byte code of the loaded swf ) Yes, You need to look into binary swf data. Here is brief description of swf format. And this is a little detail about different kind of tags. Your requirement is to find out SetBackgroundColor tag(tag type = 9), which commonly is either first or second tag of the swf. Bytes in swf file follows little endian order, so you need to be careful while reading the data. And mostly they will be

difference between -lgcc_s and gcc

China☆狼群 提交于 2019-11-29 01:12:15
问题 what is the difference between linking against gcc_s and gcc by means of LDFLAGS ? Is gcc_s a static library and gcc shared library? Because I was looking for a solution where it is mentioned to link against gcc whereas only gcc_s works in my case. I wish to know the real difference. <<hidden symbol `__name_here' in /some/library/path.a(_filename.o) is referenced by DSO In this case, the problem is usually solved by adding either "-l gcc" or " gcc -print-libgcc-file-name " to the linking

Can es6's module loader also load assets (html/css/…)

对着背影说爱祢 提交于 2019-11-28 18:43:44
问题 ES6's modules are based on a flexible loader architecture (although the standard is not final, so ...). Does this mean ES6's loader, based on system.js, can load all assets? I.e. CSS, HTML, Images, Text, .. files of any sort? I ask because I'm starting to use WebComponents & Polymer which have their own HTML import, and implementing them with ES6, which has its own import/loader (system.js). 回答1: If you use SystemJS then you can load assets by using plugins: // Will generate a <link> element

How to use images in css with Webpack

拥有回忆 提交于 2019-11-28 18:35:47
I am making a React w/ Webpack setup and am struggling to do what seems like should be a simple task. I want webpack to include images, and minimize them like I with gulp but I can't figure it out. I just want to be able to link an image in my css like so: /* ./src/img/background.jpg */ body { background: url('./img/background.jpg'); } I have all of my css/js/img folders inside a src folder. Webpack outputs to a dist folder, but I can't figure out how to get images there. Here is my webpack setup: var path = require('path'); var webpack = require('webpack'); var HtmlWebpackPlugin = require(

webpack sass-loader not generating a css file

。_饼干妹妹 提交于 2019-11-28 16:59:53
I can't figure out how to render a css file with the webpack sass-loader. Here's what my webpackconfig.js looks like: module.exports = { context: __dirname + "/app", entry: { javascript: "./app.js", html: "./index.html" }, output: { filename: "app.js", path: __dirname + "/dist" }, module: { loaders: [ //JAVASCRIPT { test: /\.js$/, exclude: /node_modules/, loaders: ["babel-loader"], }, //Index HMTML { test: /\.html$/, loader: "file?name=[name].[ext]", }, //Hotloader { test: /\.js$/, exclude: /node_modules/, loaders: ["react-hot", "babel-loader"], }, // SASS { test: /\.scss$/, loader: 'style!css