UA-17470720-3

Jump to content


Photo
- - - - -

Old bug still in CoreDataSample App


  • Please log in to reply
8 replies to this topic

#1 Gerald K.

Gerald K.

    Sr. Member

  • STV 5.0 Std
  • PipPipPip
  • 43 posts
Reputation: 6
Good

Posted 16 September 2015 - 02:48 AM

Hi Tarek,

 

just found out about a bug I have in my app that i could replicate in the default STV5.1 CoreDataSample app.

 

If you start the CoreData Sample app i.e. on an iPad Air, press the addButton on the SCArrayOfObjectSection, then in the popup enter any name, proceed to pick a category and immediately after you select the "Home" category cell begin smashing the "Done" Button on the top right of the popup.

 

The result is that the app throws a warning (something about "Attempting to dismiss a view controller while a presentation or dismiss is in progress") and closes the popup without saving anything.

 

Unfortunately this use case happens to my customers quite frequently as they try to insert data in my apps very quickly (sales people are always in a hurry :) ).

 

Thanks for your replies,

Gerald


Edited by Gerald K., 16 September 2015 - 02:49 AM.

  • VewSnignineroqn likes this

#2 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 545 posts
  • LocationIreland
Reputation: 136
Popular

Posted 16 September 2015 - 03:55 AM

Hi Gerald,

 

I can confirm that that I can get the CoreDataSample to do this, the warming I get is:

 

Warning: Attempt to dismiss from view controller <UISplitViewController: 0x7ff26204b400> while a presentation or dismiss is in progress!

 

but, wow, you've got to be quick in tapping that Done button!

 

It's iOS that is giving the warning, so I'm not sure there's much STV can do about it. 

 

Maybe you could disable the Done button until half a second after the viewDidAppear. Just an idea...


  • Tarek likes this
Cheers,

Dave

www.dgapps.ie

#3 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 16 September 2015 - 01:36 PM

Hi Gerald,

 

Thank you very much for reporting, I'll check it out. It seems that the Done button it tapped before the detail view controller has finished its dismiss animation. Perhaps we should have STV implement Dave's suggestion by disabling the navigation buttons in viewDidDisappear and reenable them again in viewWillAppear.


  • Gerald K. likes this

#4 Gerald K.

Gerald K.

    Sr. Member

  • STV 5.0 Std
  • PipPipPip
  • 43 posts
Reputation: 6
Good

Posted 23 September 2015 - 08:06 AM

Hi Tarek,

 

thanks for considering implementing this in STV. It would really make my life a lot easier since I use these kinds of selection lists at least 30 times in my apps.

 

If you add this to STV 5.2 may I inquire about a planned release date?

 

Thanks,

Gerald



#5 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 23 September 2015 - 12:55 PM

Hi Gerald,

 

We should release in about 10 days. Please let me know if you need it urgently and I'll patch you a beta.



#6 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 01 October 2015 - 11:56 AM

Hey again guys,

 

We've tried many combinations of disabling the buttons, but I think they all look very ugly to me. Here is a sample video: https://db.tt/dWpqCMmb . What do you think?

 

I think we need to come up with a much more elegant solution than just disabling the buttons. I'll keep you guys posted.



#7 Gerald K.

Gerald K.

    Sr. Member

  • STV 5.0 Std
  • PipPipPip
  • 43 posts
Reputation: 6
Good

Posted 01 October 2015 - 11:08 PM

Hey Tarek,

 

I quite like it. Of course a more elegant solution would also be appreciated, but in the meantime I'd gladly take disabled buttons over lost data. :)



#8 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 545 posts
  • LocationIreland
Reputation: 136
Popular

Posted 01 October 2015 - 11:27 PM

H Tarek,

 

That looks like it's in viewDidAppear. Does it not work in viewWillAppear, or is that too soon?

 

Like Gerald I also quite like it. At least the user is being shown that the buttons are not enabled so will (hopefully) understand that tapping it wont yet work.

 

Showing the buttons enabled but they don't actually do anything might confuse the user, they'll think the app is unresponsive and broken.

 

An option in STV to have this behaviour, with a default of NO, would enable us to use or not use the feature.


Cheers,

Dave

www.dgapps.ie

#9 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 02 October 2015 - 08:41 AM

Wow, good I posted the video since I didn't expect you guys to like it at first. Dave's idea of providing this as an optional feature makes sense. We'll add a new property to SCTableViewController called something like: autoDisableNavigationButtonsUntilViewAppears.

 

@dave: Yes, viewWillAppear is too soon.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users