How to import a widget in alloy titanium - widget

Newbie question here:
I'm fiddling around with titanium studio with alloy mvc and starting to get the hang of it. It's just not clear to me how I can import a widget into my project.
I found a nice slider menu and want to use this in my own project.
Now the docs say you have to add a dependency in the config.json like so:
"dependencies": {
"com.slider" : "1.0"
}
and then you'd be able to use it in your view:
<Widget src="com.slider"></Widget>
But don't I need to import it into my project first? And if so, how? Importing it as a project only adds it to my workspace, not in my project user /widgets/slider
Upon building this I also get the following error:
config.json references non-existent widgets: ["com.slider"]
I've been looking for hours already on google but there's not much info on this besides the alloy docs that don't cover the importing thing.
Help?

Allright, so first thing you need to do is IMPORT the widget into your project.
If you take a look at the structure of an alloy project you should see in the app folder another folder called "widgets". Copy and Paste the widget inside of it, something like this (the folder name is different because I use another slider):
Then in your view (let's say you have a main view for the slider with a window in it):
<Window id="mainWindow" class="container">
<Require type="widget" src="com.slider" id="ds"/>
</Window>
Finally, in your config.json:
"dependencies": {
"com.slider":"1.0"
}
}

gitt.io is also great for finding and installing titanium widgets and modules
CLI installation: http://gitt.io/cli

Related

Angular jhipster <ng-select>

I'm developing an app using Jhipster where I'm trying to show a <ng-select>, that is not rendering as the attached file, I have also included the default theme (#import "~#ng-select/ng-select/themes/default.theme.css") in vendor.css and have rebuilt everything, it's not displayed too. Any help is appreciated.
I had the same issue as you and I solved it.
This is not an issue related to , but to any library you want to use.
To be able to add any thrid party library, you should follow the way jhipster is doing.
1- Create a module where to add the libraries module in import and export sections
2- Add this module (in import and export sections) to the shared.module.ts module.
A good example is here: https://medium.com/#cyril.casaucau/how-to-add-angular-material-on-an-jhipster-5-x-app-97c9569c9f97
Or simply add the NgSelectModule module to shared-libs.module.ts file.

Android Studio Gradle error: Missing project_info object

basically opening this question again because the answer is outdated, as the link now redirects to Firebase:
Gradle fails building with "Missing project_info object"
I want to attach the google-services.json file to my Android Studio project, and every time I try to download it from the developers API from Google, it gives me a json file with a large name that does't correspond to the tutorial's simple "google-services" and renaming it won't work because of this error.
Downloading it creating a new project doesn't seem possible for me now as it the page gives me another error when I click Configure a Project (I already did that before but left the project there without downloading the json file directly from there, which seems to be the problem).
Where can I safely get this file, and should I rename it or? Thanks in advance.
Apparently the solution is just following the link and creating the project with Firebase:
Then create or select a project and fill it with your app data that shoul look like this (the SHA-1 key should be found in your console log when clicking the button in the image:
Then add the lines of code that should be in your build.gradle(app level one and project level one), editing them with notepadd. Finally you need to sync these Gradle files, in Android Studio : File->Sync project with Gradle Files
The tutorial is very self explatanory, but for beginners like me, this could help.

Sharing components across multiple Aurelia projects

we started our project with ES6 javascript skeleton.
we would like to extract some styles and custom attributes to a common folder so we can use these at any Aurelia module we will build in the future.
the problem is with the bundle files. we don't know how to config them to bundle external folder out of the main ES6 folder.
can you please tell us what to do?
It sounds like you want to build an Aurelia plugin that you can import into any project. I would start by taking a look at the Aurelia plugin skeleton.
Once you've built your plugin with the custom styles and attributes you want, you'll want to either register it with jspm as a link, or publically through a registry such as npm or github.
Once published, you will be able to jspm install registry:my-package in any new project, and add the following line to your main.js file:
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.plugin('my-package');
}
For more information on this last step, see the brilliant answer provided by Ashley Grant here.

Flash Builder and External Library

I have downloaded the as3syndicationlib library from here, but I am having trouble adding it to my project. I dragged the folder into my project > src folder, and when I started importing the files from it (com.adobe.xml.syndication.rss.RSS20) all seemed to be fine, until I hit save. Then I started to get error that say:
Multiple markers at this line:
-1084: Syntax error: expecting identifier before
import.
-The import RSS20 could not be found.
-adobe
-The import rss could not be found.
-The import syndication could not be found.
-The import xml could not be found.
-91 changed lines
I have never used an external library with Flash Builder/Flex/ActionScript3 before so I have no idea what to do. I know that this is probably very simple to do, but I am new at flash builder and flex.
Any help is highly appreciated!
Thanks,
Jacob
EDIT:
I got it to work. What I was doing wrong was I was added source code to my project when I should have added the xmlsyndication.swc file to my project.
You need to add it to a lib folder instead of src... if you don't have a lib folder just make one. Then right click the project in Flash Builder and hit properties, in the menu on the left select Library Path (or something like that), click the Add Folder button and type lib. Do a clean build (Build Menu -> Clean).

Problems while trying to use components from another module in intellij idea AS3

i'am trying to use components from another module, but is not working.
Look what i have:
I have my project, its an app to convert files, and its working everything is ok. Now i want to change the interface... for that i cloned a github repository thats is a project with the components that i want to use, and imported it as a module. (should i import as a module or as a project?)
Everything great till now, but when i try to use the components from the module i cant find the classes or even the module...
Any suggestions?
You should add your imported sources as a new module (let's call it B), then you should add a dependency from your original module A to your module B in order to use its code.
See this page on how to configure module dependencies.