ganlirong / iphoneebooks

Automatically exported from code.google.com/p/iphoneebooks
GNU General Public License v2.0
0 stars 0 forks source link

two preference windows #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. press prefference push button twice, and it will animate two preference 
windows 

I suppose preference controller is supposed to be some sort of a singleton.

I am learning obj-c and cocoa programming by looking at your code. Thank you 
very much, you 
inspired me to program on iphone.  

Original issue reported on code.google.com by boris.io...@gmail.com on 22 Nov 2007 at 4:50

GoogleCodeExporter commented 9 years ago
Here is a diff correcting this bug

Original comment by benoitce...@gmail.com on 18 Dec 2007 at 3:05

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch!

I was definitely able to reproduce the original bug on the latest release, so I
applied the patch to my local copy and gave it a try.

Unfortunately, I think the patch may have made to original bug worse.  With this
patch applied, if you click prefs twice, you get no preferences, or a half-risen
prefs window.  Worse, the singleton means prefs are broken at that point until 
you
quit and relaunch the app.

I wonder if instead of creating a singleton for the prefs controller, it would 
be
better to disable the prefs button event from spawning a second prefs windows?  
Set
some flag when the button is pressed *before* the prefs screen starts to show 
and
only clear that flag when the prefs screen closes.  That way a second press to 
the
button will do nothing while the prefs screen is animating up.

The effort is much appreciated, and I definitely don't want to scare anyone 
off.  If
you can find a way to fix the singleton breakage or fix the original bug in some
other way, please submit another patch.  I'll gladly apply it to SVN.

Original comment by pendorbo...@gmail.com on 19 Dec 2007 at 2:26

GoogleCodeExporter commented 9 years ago
Did you have any luck with the new file I sent.  I still don't have the 
problem. 
Using a flag would work too, in fact it could also be combined with using a 
singleton

Original comment by benoitce...@gmail.com on 15 Jan 2008 at 2:49

GoogleCodeExporter commented 9 years ago
this is a correct fix + additional functionality (rotate to landscape)

Original comment by benoitce...@gmail.com on 3 Feb 2008 at 4:37

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in 1.4-pre01

Original comment by pendorbo...@gmail.com on 17 Feb 2008 at 5:45