Keyboard Dismiss Not Working

Keyboard Dismiss Not Working

Postby John B » Fri Dec 27, 2013 8:07 pm

This is the code I've been using to detect when the keyboard is dismissed (in the Update function):

Code: Select all
if (UIManager.instance.iKeyboard != null && (UIManager.instance.iKeyboard.done || UIManager.instance.iKeyboard.wasCanceled)) {
   OnKeyboardDismiss();
   return;
}

It no longer works. I went back and checked some older apps that are already in the iTunes store, and it works in those. But in new apps I'm working on, using EZGUI 1.08, that code is never executed. So far, I've only tested on iOS 7.

Has something changed? Should I be doing this differently now?
Last edited by John B on Mon Dec 30, 2013 10:21 pm, edited 1 time in total.
John B
 
Posts: 249
Joined: Sat Jul 10, 2010 6:19 pm

Re: Keyboard Dismiss Not Working

Postby John B » Mon Dec 30, 2013 10:21 pm

I've just been updating a few other older apps, and they all correctly catch the keyboard dismiss. It's just the one app (the first one I updated). I can't see any obvious differences, it's all the same code. Haven't had a chance yet to look into it further. Any ideas on what might cause such a problem?
John B
 
Posts: 249
Joined: Sat Jul 10, 2010 6:19 pm

Re: Keyboard Dismiss Not Working

Postby John B » Thu Jan 02, 2014 7:59 pm

I've spent some time looking into this, and am still stuck. In this app, and only this app, iKeyboard.done and iKeyboard.wasCanceled are always false. That's why my OnKeyboardDismiss is never called. It does however correctly set iKeyboard to null when there is no keyboard. So it knows whether the keyboard is visible or not, just not when it is dismissed.

I've deleted and even renamed my script, and reimported EZGUI. This is the exact same code that works in every other app. I don't know where else to look. Is there any EZGUI setting that might disable the UIManager from updating these variables? What could cause those two variables to always be false?

Here's my code:

Code: Select all
function Update () {
   
   theFocus = UIManager.instance.FocusObject;
   
   if (UIManager.instance.iKeyboard != null && (UIManager.instance.iKeyboard.done || UIManager.instance.iKeyboard.wasCanceled)) {
      OnKeyboardDismiss();
      return;
   }
   
   // other stuff
}
John B
 
Posts: 249
Joined: Sat Jul 10, 2010 6:19 pm

Re: Keyboard Dismiss Not Working

Postby Brady » Mon Jan 06, 2014 9:20 pm

There is no code in EZ GUI I can think of that would prevent those variables from being set. Those variables are actually properties of Unity's own keyboard class, to which iKeyboard is just a reference. So those values are coming directly from Unity, and they are read-only as well, so there's nothing EZ GUI could do to change them directly. If you have any other competing keyboard API calls elsewhere in your codebase, that's the only thing I can think of that would account for the difference.

Are you perhaps using a different, or beta, version of Unity than you used for the other apps which are working correctly?
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Keyboard Dismiss Not Working

Postby John B » Thu Jan 09, 2014 6:49 pm

Brady wrote:Are you perhaps using a different, or beta, version of Unity than you used for the other apps which are working correctly?

The apps that still work were originally created in late 2012/early 2013, and were submitted to the iTunes store in Feb/March, 2013. These new apps are very similar to the older ones (same series), and were created in the last half of 2013. All were created with the version of Unity current at the time, and all the new ones were updated to Unity 4.3.1 prior to my discovering the problem.

As I said, all the old and new apps work except for the one. It just happened to be the first one I updated.

I don't believe I have any other keyboard references anywhere since I'd never done anything else that required keyboard access. I guess it's possible some script got attached to something it shouldn't have (that seems to happen from time to time), but I can't find it. Is there any way to list all the scripts attached to every object in a scene?
John B
 
Posts: 249
Joined: Sat Jul 10, 2010 6:19 pm

Re: Keyboard Dismiss Not Working

Postby Brady » Sat Jan 11, 2014 3:52 pm

Not that I know of without writing an editor script that just crawls the hierarchy and prints out all the scripts it finds. Another option would be to open your entire Unity solution in Monodevelop or MS Visual Studio and do a keyword search for keyboard API calls on a project-wide basis.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Keyboard Dismiss Not Working

Postby John B » Wed Jan 15, 2014 4:38 pm

This is getting very frustrating. I have 23 other apps with the exact same code that works, and this one app that doesn't. The entire script is attached below.

I have data tables that take up most of the screen, and this function moves the table up so the lower fields are not hidden by the keyboard. But if it doesn't detect the keyboard being dismissed, the top half of the table stays offscreen and unusable with no way to get it back down.

It's kind of difficult to debug this, since it only works when running on iPad. As far as I can tell, done or isCanceled is always false, but it does know when the keyboard is visible.

Is there any way to get a reference to the current keyboard without using the EZGUI variable? I really need to get this resolved since I can't submit the app in this non-working state.

Code: Select all
var tables: DataTables;

var dataTable: GameObject;
var dataTableDiff: Vector3;
var dataTableResetPos: Vector3;
var theFocus: IUIObject;
var oldFocus: IUIObject;

// ---------------------------------

function Start () {
   dataTableResetPos = Vector3(0, 0, 5);
}

// ---------------------------------

function Update () {
      
   if (UIManager.instance.iKeyboard != null && (UIManager.instance.iKeyboard.done || UIManager.instance.iKeyboard.wasCanceled)) {
      OnKeyboardDismiss();
      return;
   }
   
   theFocus = UIManager.instance.FocusObject;
   
   if (theFocus == oldFocus)
      return;       
         
   if (theFocus != null) {
      if (!tables.showTables)
         tables.OnTablesTab();
         
      dataTableDiff = dataTable.transform.position - theFocus.gameObject.transform.position;
      
      if (dataTableDiff.y > -60)
         AnimatePosition.Do(dataTable, EZAnimation.ANIM_MODE.To, Vector3(dataTableResetPos.x, 150 + dataTableDiff.y, dataTableResetPos.z), EZAnimation.sinusOut, 0.5, 0.0, null, null);
      else {
         tables.showTables = false;
         tables.OnTablesTab();
      }
   }
   oldFocus = theFocus;
}

// ---------------------------------

function OnKeyboardDismiss () {

   if (tables.showTables)
      tables.OnTablesTab();
}

// ---------------------------------
John B
 
Posts: 249
Joined: Sat Jul 10, 2010 6:19 pm

Re: Keyboard Dismiss Not Working

Postby Brady » Wed Jan 22, 2014 11:28 pm

Yes, EZ GUI's iKeyboard is just a reference to Unity's own keyboard interface. You can use Unity's TouchScreenKeyboard interface directly to poll for the information you seek. But as I said, since EZ GUI's iKeyboard is just a reference to this object, you're going to get the same values. And they are read-only values on Unity's end, so EZ GUI isn't changing them because it can't.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Keyboard Dismiss Not Working

Postby Radinka » Thu Jan 19, 2017 12:40 pm

I've deleted and even renamed my script, and reimported EZGUI. This is the exact same code that works in every other app.
Radinka
 
Posts: 8
Joined: Thu Jan 19, 2017 12:21 pm

chanyuan

Postby chanyuan » Tue May 09, 2017 9:40 am

chanyuan2017.05.09
new balance outlet
coach outlet store
longchamp outlet online
christian louboutin sale
cheap ray ban sunglasses
ferragamo outlet
cheap oakley sunglasses
lacoste outlet
christian louboutin shoes
cheap ray ban sunglasses
valentino shoes
coach factory outlet
fitflops
mlb jerseys
polo outlet stores
michael kors outlet online
cheap ray bans
longchamp
oakley sunglasses wholesale
ferragamo shoes
hollister shirts
true religion jeans
nike free running
true religion outlet
michael kors outlet
fitflops sale clearance
chrome hearts outlet
vans outlet
yeezy boost
pandora charms sale clearance
coach outlet
mont blanc pens
true religion canada
nba jerseys
true religion jeans outlet
michael kors outlet clearance
michael kors outlet clearance
ray bans
los angeles lakers
oakley sunglasses wholesale
cheap oakley sunglasses
omega outlet
polo outlet
polo ralph lauren
fitflops sale clearance
michael kors handbags
rolex outlet
adidas wings shoes
coach factory outlet
pandora outlet
nike blazer pas cher
coach outlet online
ralph lauren outlet
michael kors outlet clearance
louis vuitton outlet online
ralph lauren polo
michael kors outlet
jordan 4
kate spade uk
mlb jerseys
ralph lauren outlet
ralph lauren
coach outlet
air max 90
coach outlet
adidas outlet
louis vuitton outlet stores
michael kors handbags
coach outlet online
swarovski jewelry
rolex watches outlet
cheap jordan shoes
ralph lauren
lacoste shirts
ralph lauren outlet
ralph lauren outlet
cheap oakley sunglasses
cheap oakley sunglasses
nike shoes uk
air force 1 shoes
cheap ray ban sunglasses
coach outlet store online
coach outlet online
cartier watches for women
polo ralph lauren
mulberry outlet,mulberry handbags outlet
camisetas futbol baratas
cheap football shirts
louis vuitton outlet
ed hardy outlet
kd shoes
coach outlet online coach factory outlet
polo ralph lauren
hermes birkin bag
louis vuitton handbags
kobe 9 elite
polo ralph lauren outlet
michael kors handbags clearance
louis vuitton outlet online
converse shoes sale
louis vuitton outlet
michael kors outlet store
nike trainers uk
oakley sunglasses sale
louis vuitton
oakley sunglasses wholesale
rolex watches for sale
prada outlet
michael kors outlet
cheap mlb jerseys
ferragamo outlet
ralph lauren outlet
mulberry handbags
adidas shoes
mcm outlet
longchamp outlet
prada sunglasses for women
cheap ray ban sunglasses
coach outlet
coach outlet online
ralph lauren polo
oakley sunglasses wholesale
soccer cleats
polo ralph lauren
polo ralph lauren
coach factory outlet
coach outlet online
jerseys wholesale
true religion jeans sale
cheap oakley sunglasses
ray ban sunglasses outlet
ralph lauren
nfl jerseys
louis vuitton outlet online
ray ban sunglasses
michael kors canada
louis vuitton outlet
burberry outlet store
coach outlet online
oakley sunglasses wholesale
louis vuitton
louis vuitton outlet
louis vuitton
christian louboutin sale
coach factory outlet
mizuno shoes
cheap oakley sunglasses
coach outlet
nike outlet store
mulberry handbags
polo ralph lauren outlet
mac cosmetics sale
coach outlet
nike shoes for women
christian louboutin
louis vuitton outlet
fitflops
fred perry polo
coach outlet store online
christian louboutin
true religion outlet
nike trainers
tory burch outlet online
cazal outlet
michael kors outlet online
michael kors outlet
ralph lauren outlet stores
michael kors outlet clearance
michael kors outlet
cheap nfl jerseys
coach outlet
giuseppe zanotti shoes
cheap oakley sunglasses
nike trainers
prada outlet
gucci outlet
cheap oakley sunglasses
oakley sunglasses
tory burch outlet online
ray ban sunglasses
coach outlet online
longchamp handbags
coach factory outlet
true religion outlet uk
michael kors handbags
louis vuitton uk
coach outlet clearance
nike shoes
tory burch outlet online store
air max 2015
pandora jewellery
gucci outlet store
cartier outlet
ray-ban sunglasses
michael kors outlet stores
gucci outlet online
michael kors factory outlet
louis vuitton outlet online
herve leger dresses
polo ralph lauren
coach outlet online coach factory outlet
michael kors outlet clearance
nhl jerseys
louis vuitton
polo shirts
coach outlet
nfl jersey
michael kors outlet clearance
coach outlet online
rolex watches,rolex replica watches,replica rolex watches,replica watches
thomas sabo charms
michael kors outlet clearance
burberry canada
tory burch outlet stores
puma shoes
hollister shirts
ray-ban sunglasses
louis vuitton outlet stores
coach outlet store online
polo ralph lauren outlet
coach outlet
michael kors outlet online
michael kors outlet clearance
coach outlet
juicy couture tracksuit
coach outlet store online
fitflops sale clearance
roshe run
louis vuitton
louis vuitton outlet online
swarovski uk
oakley sunglasses wholesale
air max 90
true religion outlet
ray ban sunglasses wholesale
longchamp outlet
coach outlet
louis vuitton outlet
michael kors handbags outlet
cheap oakley sunglasses
coach outlet
ray ban sunglasses
adidas nmd runner
cheap oakley sunglasses
louis vuitton outlet store
louis vuitton outlet
cheap ray ban sunglasses
louis vuitton
cheap ray ban sunglasses
true religion jeans
longchamp
snapbacks wholesale
michael kors outlet clearance
gucci outlet online
michael kors outlet online
mulberry handbags sale
michael kors outlet
lebron shoes
ralph lauren outlet
ysl outlet online
michael kors outlet online
cheap oakley sunglasses
pandora outlet
louis vuitton bags
coach outlet online
birkenstock shoes
polo outlet stores
fitflops uk
rolex watches
michael kors outlet online
pandora jewelry
kobe bryants shoes
christian louboutin outlet
cheap jordans for sale
louis vuitton
christian louboutin outlet
fitflops uk
cheap jordan shoes
true religion jeans
ferragamo shoes
louis vuitton outlet
links of london jewellery
michael kors outlet online
kobe shoes
polo outlet store
true religion outlet
salomon outlet
cheap jordan shoes
louis vuitton
mulberry handbags sale
coach outlet
nike air huarache
tory burch outlet online
tods outlet online
coach outlet online
ray ban wayfarer
cheap oakley sunglasses
michael kors outlet clearance
ralph lauren uk
longchamp handbags
nike uk store
coach factory outlet
rolex watches,rolex watches,swiss watches,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex
ray ban sunglasses
cheap jerseys wholesale
chrome hearts
cheap replica watches
nfl jerseys
mcm handbags
cheap jordans
true religion jeans
nfl jersey wholesale
supra shoes sale
coach factory outlet
fitflops
michael kors uk
michael kors outlet clearance
polo pas cher
coach outlet online
soccer jerseys wholesale
tory burch outlet
cheap ray ban sunglasses
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
basketball shoes,basketball sneakers,lebron james shoes,sports shoes,kobe bryant shoes,kobe sneakers,nike basketball shoes,running shoes,mens sport shoes,nike shoes
instyler
ralph lauren outlet
swarovski outlet
reebok shoes
burberry outlet store
coach outlet online
gucci outlet online
adidas uk store
cartier watches for sale
beats headphones
coach outlet
coach outlet online
michael kors uk
hollister clothing store
fitflops sale clearance
ralph lauren shirts
christian louboutin shoes
michael kors outlet
cheap soccer jerseys
nfl jersey wholesale
cartier watches for sale
michael kors outlet
reebok shoes
mulberry bags
oakley sunglasses wholesale
cartier watches
louis vuitton outlet
oakley sunglasses sale
louis vuitton
cheap oakley sunglasses
kate spade uk
polo outlet
louis vuitton borse
sac louis vuitton pas cher
cheap nba jerseys
rolex orologi
nike air huarache
rolex watches
nike roshe run
ferragamo shoes sale
michael kors outlet clearance
hollister
nike outlet online
coach outlet online
burberry outlet sale
true religion uk
ralph lauren polo
christian louboutin outlet
michael kors outlet
coach outlet online
cheap oakley sunglasses
iphone case uk
cheap oakley sunglasses
coach outlet
oakley sunglasses wholesale
christian louboutin shoes
ralph lauren
coach outlet store online
foamposite shoes
ferragamo shoes
oakley sunglasses wholesale
mulberry uk
air max 90
ralph lauren uk
true religion jeans
tory burch outlet online
oakley sunglasses wholesale
cheap jordans free shipping
cheap nike shoes
michael kors outlet online
oakley sunglasses
coach outlet online
yeezy boost 350
bottega veneta outlet online
mulberry outlet
coach outlet clearance
oakley sunglasses
marc jacobs sale
michael kors outlet
michael kors wallets for women
christian louboutin uk
coach outlet
hermes outlet
hermes belts
hermes outlet store
oakley sunglasses wholesale
ferragamo outlet
michael kors handbags
kate spade
coach factory outlet
louis vuitton handbags
michael kors outlet online
mont blanc outlet
oakley sunglasses sale
coach outlet store online
tory burch outlet online
louis vuitton outlet stores
lebron shoes
ralph lauren outlet
cheap ray ban sunglasses
longchamp handbags
ray ban sunglasses outlet
louis vuitton handbags
prada outlet online
coach outlet online
michael kors outlet online
swarovski jewellery
coach handbags outlet
oakley sunglasses sale
nike air max 90
mbt shoes outlet
cheap oakley sunglasses
gucci outlet online
nhl jerseys wholesale
air max 90
polo outlet
coach outlet store online
rolex uk
cheap oakley sunglasses
coach factory outlet
cleveland cavaliers jerseys
beats by dre
ecco outlet
nike store uk
coach outlet clearance
louis vuitton uk
nike outlet store online
christian louboutin shoes
coach outlet online
michael kors uk
oakley sunglasses wholesale
polo ralph lauren outlet
beats by dre
coach outlet
cheap ray bans
polo outlet online
michael kors outlet
adidas nmd
ralph lauren uk
ray ban sunglasses uk
cheap ray ban sunglasses
coach outlet
polo ralph lauren
nike roshe run
swarovski crystal
cheap ray ban sunglasses
louis vuitton
michael kors uk
coach outlet clearance
swarovski crystal
christian louboutin shoes
polo ralph lauren
gucci borse
nba jerseys wholesale
beats headphones
ray ban sunglasses uk
birkenstock shoes
gucci bags
coach outlet clearance
chanyuan
 
Posts: 298
Joined: Tue May 09, 2017 9:06 am

Next

Return to EZ GUI General

Who is online

Users browsing this forum: No registered users and 5 guests

cron