PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Module 'nativescript-drop-down' not found for element 'nativescript-drop-down:DropDown' #253

Closed sates52 closed 3 years ago

sates52 commented 3 years ago

Hi,

I'm getting the following error.

LOG from device Savas: An uncaught Exception occurred on "main" thread. Calling js method onClick failed Error: Building UI from XML. @purchase/page.xml:3:5

Module 'nativescript-drop-down' not found for element 'nativescript-drop-down:DropDown'. Cannot read property 'setNative' of undefined

StackTrace: ScopeError(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/core/utils/debug.js:63:24) at SourceError(file:///data/data/org.nativescript.preview/files/app/tns_modules/@nativescript/core/utils/debug.js:74:23)


My source code: Xml File



Js File


const fromObject = require("tns-core-modules/data/observable").fromObject;

exports.pageLoaded = function (args) {

const items = []; items.push({ ad: "Batman" }); items.push({ ad: "Joker" }); items.push({ ad:"Bane" });

const page = args.object; const vm = fromObject({ items: items }); page.bindingContext = vm;

}


PeterStaev commented 3 years ago

Hello @sates52 , per the top of readme:

This repo only supports NativeScript pre-6.0. The latest version of the plugin supporting and tested on the latest version of NativeScript is availble as part of ProPlugins.

I've recently updated the ProPlugins version so I can assure you that that one works with NS7 & NG10. So if you are a subscriber make sure you update the plugin to the latest version. If you aren't one and don't want to subscribe, then you can fork the repo and try to update the code to make it work with NS7. I'm happily accepting PRs 😉

sates52 commented 3 years ago

Hi,

Paypal is prohibited in my country. Therefore I'm not able to subscribe. I have just started to learn Nativescript. My knowledge is not ok to updade your code. Is there any alternative to help me?

Thanks.

PeterStaev commented 3 years ago

Hey @sates52 , seems we can also accept Stripe. If that is an option for you please use the contact us form so we can provide you more details.

If that is not acceptable as well, the only thing that I can suggest is to reorganize your app layout so that you replace the DropDown with some alternative approach.

sates52 commented 3 years ago

Hey, @PeterStaev I will try the contact form.

What can be the alternative approach? Can it be Listpicker? Can you give me some links to learn more about it?

PeterStaev commented 3 years ago

@sates52 , well you can do with a label and a chevron (> ) at the end that redirect to another page with a listview. When the user selects an item from the listview you return the value/text to your previous page and return the user back to that page.

Whip commented 3 years ago

Having a basic thing like a dropdown behind a pay wall is a pretty low blow. I'm using NS for hobby/personal projects and paying $10-$15 every month is just not financially feasible. If it was one time payment, I would've considered it.

PeterStaev commented 3 years ago

Hey @VeeK727 , thank you for your input! The $10 monthly fee is not just for this plugin. You get all the plugins under ProPlugins. If I would offer a one time payment for a single plugin the price will probably around the yearly subscription prices, so it does not make any sense to offer it. If you use it only for personal/hobby projects, you can always subscribe for 1-2 month until you finish those and then cancel your subscription. You can also download the tar.gz files of the plugin and continue to reference them from your local folder after you cancel your subscription and renew your subscription if the plugin gets updated with new functions/fixes that you need. Or you can fork the pre-NS6 code of the plugin that is available in this repo and make it compatible with NS6/NS7. Or as suggested above you can always reorganize your UI flow so that you dont use a drop down 😉

Whip commented 3 years ago

You can also download the tar.gz files of the plugin and continue to reference them from your local folder after you cancel your subscription....

I would only need to do that if I need to work on the project right?

So lets say I subscribe today and load the plugin in my project. I generate my builds and use the apps on my phone and cancel the subscription. So my app will continue to work properly? I don't do updates for 5-6 months at a time, when I have to I can resubscribe again.

PeterStaev commented 3 years ago

@VeeK727 fully correct. The subscription is checked only when you download the npm package. If you have built the app you can use it indefinitely no matter if you have an active sub or not!

Whip commented 3 years ago

I believe that's a good solution for both us and you guys. Thanks a lot