GithubHelp home page GithubHelp logo

Comments (3)

Daxito avatar Daxito commented on August 20, 2024

I am trying to manually convert the TS file into JS but I have a couple of issues, all this for iOS:

  1. The generated "images" page has this tag:
    < Image height="78" width="78" opacity="{{ selected ? 0.7 : 1 }}" src="{{ $value }}" />
    But $value is actually an object, this object has fileUri and if I replace $value with fileUri it works for the simulator, I am able to see the image but it does not work for the real device, no image is displayed

  2. The object AssetPH is NOT observable so I get error when selecting an image (from the simulator), the error is related to line:
    this.notifyPropertyChange("selected", this.selected);

this.notifyPropertyChange is not a function, because the object never extends an Observable, the weird thing here is that the demo works, but the demo is all TS, my project is all JS.

Any idea?
Thanks!

from nativescript-imagepicker.

tsonevn avatar tsonevn commented on August 20, 2024

Hi @Daxito,
Could you provide more info about your scenario?

In case you would like to rebuild the plugin, you should first run npm install, which will install the needed dependencies and then run tsc.

The problem with using fileUri for Image src could be related to the case when you select an image from a cloud. Those images do not have real file Uri and could be caused this behavior.

About the last question, when the asset has been returned for the selected image you should use getImage() method, which will return imageSource. For example, review the sample here.

Hope this helps

from nativescript-imagepicker.

Daxito avatar Daxito commented on August 20, 2024

@tsonevn
Thank you for the answer! I appreciate it.
Since I was stuck with this issue I had to create a new plugin for iOS, I use https://github.com/zhangao0086/DKImagePickerController instead, for Android works great though!

from nativescript-imagepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.