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

Retest CollectionView requirement to check isInitialized #1

Open
slodge opened this issue Aug 23, 2013 · 3 comments
Open

Retest CollectionView requirement to check isInitialized #1

slodge opened this issue Aug 23, 2013 · 3 comments

Comments

@slodge
Copy link
Contributor

slodge commented Aug 23, 2013

@jamesmontemagno says it's working ok in the latest xam code...

https://github.com/slodge/NPlus1DaysOfMvvmCross/blob/master/N-11-KittenView_Collections/KittenView.Touch/Views/FirstView.cs

@jamesmontemagno
Copy link

So when i run it with your logic currently ViewDidLoad actually gets called twice which is actually leading to binding happening multiple times. I simply removed the logic and everything on my end worked fine.

I am using:
Mono 3.2.2
XCode 4.6.1
Xamarin.iOS 6.4.1.1
OSX 10.7.5
Xamarin Studio 4.1.9 (build 6)

@slodge
Copy link
Contributor Author

slodge commented Aug 23, 2013

Just to confirm: you are seeing ViewDidLoad called twice with _isInitialised==true both times? That's scary... will retest soon (will also check other places where I use the same ViewDidLoad hack - e.g. tabbarcontroller and tableviews)

@jamesmontemagno
Copy link

That is correct I just tested the current code on an iPod Touch running iOS 6.
When I navigate to the View It first goes into the constructor and _isInitialised is set to true, and then ViewDidLoad() gets called because we are calling it.

And then ViewDidLoad gets called again and _isInitialised but this time is called by MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper()

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

No branches or pull requests

2 participants