Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macaw.image.srcVar do not change image on change src #491

Closed
mkdk opened this issue Oct 18, 2018 · 9 comments
Closed

Macaw.image.srcVar do not change image on change src #491

mkdk opened this issue Oct 18, 2018 · 9 comments
Assignees
Milestone

Comments

@mkdk
Copy link

mkdk commented Oct 18, 2018

Need help urgent! :(
On xcode 9 our code was worked well, but after start working with xcode 10 Macaw.image.srcVar do not change image if we change srcVar on the fly.

Maybe I misunderstood something, but I expecting that if I we change scrVar it will rerender image in the node....

here is code example:

substrate.onTap { _ in
       if !self.pickedSeats.contains(index) {
                self.pickedSeats.insert(index)
                seatView.sView.srcVar.value = SeatType.picked.getSrc()
                seatView.sView.opacityVar.animate(to: 0.9)
                seatView.text.font = Font(name: "MullerExtraBold", size: 13)
                self.delegate?.seatPicked(id: seat.id, unselect: false, publicPid: seat.publicPid)
        } else {
                self.pickedSeats.remove(index)
                seatView.sView.srcVar.value = seat.type.getSrc()
                seatView.text.font = Font(name: "MullerMedium", size: 12)
                self.delegate?.seatPicked(id: seat.id, unselect: true, publicPid: seat.publicPid)
           }
   }

> seatView.sView.srcVar.value = SeatType.picked.getSrc()
> seatView.sView.srcVar.value = seat.type.getSrc()

This lines worked, but now no.

@ystrot
Copy link
Member

ystrot commented Oct 18, 2018

First of all, it's better to use

seatView.sView.src = ...

instead of

seatView.sView.srcVar.value = ...

However both should work.

Can you create a sample project demonstration this issue? Otherwise you need to debug Macaw code: (check out Image.image() which create corresponding UIImage). Most probably new image can't be loaded for some reason.

@ystrot ystrot self-assigned this Oct 18, 2018
@mkdk
Copy link
Author

mkdk commented Oct 18, 2018

Thank you for your answer, if it will not work tomorrow i'll create demonstration project

@ystrot
Copy link
Member

ystrot commented Oct 18, 2018

Thanks, it will be really useful.

@mkdk
Copy link
Author

mkdk commented Oct 19, 2018

@ystrot i created sample project demonstration of the issue. there exactly same enviroment which in our production app. thank you for your time. https://github.com/mkdk/demomacawissue-491

@baluhman
Copy link

Need help urgent! :(
On xcode 9 our code was worked well, but after start working with xcode 10 Macaw.image.srcVar do not change image if we change srcVar on the fly.

Maybe I misunderstood something, but I expecting that if I we change scrVar it will rerender image in the node....

here is code example:

substrate.onTap { _ in
       if !self.pickedSeats.contains(index) {
                self.pickedSeats.insert(index)
                seatView.sView.srcVar.value = SeatType.picked.getSrc()
                seatView.sView.opacityVar.animate(to: 0.9)
                seatView.text.font = Font(name: "MullerExtraBold", size: 13)
                self.delegate?.seatPicked(id: seat.id, unselect: false, publicPid: seat.publicPid)
        } else {
                self.pickedSeats.remove(index)
                seatView.sView.srcVar.value = seat.type.getSrc()
                seatView.text.font = Font(name: "MullerMedium", size: 12)
                self.delegate?.seatPicked(id: seat.id, unselect: true, publicPid: seat.publicPid)
           }
   }

> seatView.sView.srcVar.value = SeatType.picked.getSrc()
> seatView.sView.srcVar.value = seat.type.getSrc()

This lines worked, but now no.

same problem 2(

@ystrot ystrot added this to the 0.9.4 milestone Oct 22, 2018
@ystrot
Copy link
Member

ystrot commented Oct 22, 2018

Looks like I found source of this issue. Strange it works for you before, because the problem reproduced on Xcode 9 as well. Anyway, should be fixed in the nearest time.

@mkdk
Copy link
Author

mkdk commented Oct 22, 2018

@ystrot thanks a lot!

@ystrot ystrot closed this as completed in 5f24d92 Oct 22, 2018
@ystrot
Copy link
Member

ystrot commented Oct 22, 2018

I've pushed a fix. Please try Macaw from master branch.

@mkdk
Copy link
Author

mkdk commented Oct 22, 2018

@ystrot It works now. Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants