Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / March 2007



Tip: Looking for answers? Try searching our database.

Build incompatibilites between machines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Silver Dream ! - 26 Mar 2007 23:48 GMT
Hello,

I've encountered a strange problem. I've laid out a small GUI (window
with several buttons), connected things in IB, added a little code to
override the keyDown: so that I can take control over what keys are used
to cycle the focus/firstResponder, made the first button the
initialFirstResponder etc. I did all that on my (G4) laptop during a
train trip and everything works like a charm but... the same project
transferred to and built on a desktop (G5) machine exhibits very much
different behaviour:

- the first button (set as initialFirstResponder) doesn't seem to get
the focus (and ring) on startup (works perfectly on the laptop)

- I can't neither TAB nor use my (arrow) keys to cycle through the
buttons (this also works perfectly on the laptop)

XCode env is the latest 2.4.1 in both cases. OS versions are the same.
Yes, there is a difference in the CPUs but both are PPC and we're
talking about high-level fundamentals rather than CPU specific low-level
stuff here.

Is there something I should be aware of that could cause those
anomalies? Yes, I cleaned the project before rebuilding...

Suggestions appreciated.
Sherm Pendley - 26 Mar 2007 23:52 GMT
> I did all that on my (G4) laptop during a
> train trip and everything works like a charm but... the same project
[quoted text clipped - 6 lines]
> - I can't neither TAB nor use my (arrow) keys to cycle through the
> buttons (this also works perfectly on the laptop)

Buttons aren't tab-navigable by default - have you enabled "full keyboard
access" for all controls on your laptop by any chance? (System Preferences/
Keyboard & Mouse/Keyboard Shortcuts).

sherm--

Signature

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Silver Dream ! - 27 Mar 2007 01:02 GMT
>> - the first button (set as initialFirstResponder) doesn't seem to get
>> the focus (and ring) on startup (works perfectly on the laptop)
[quoted text clipped - 5 lines]
> access" for all controls on your laptop by any chance? (System Preferences/
> Keyboard & Mouse/Keyboard Shortcuts).

Sherm,

a) thank you for that quick hint

b) now I am ashamed - in fact that was the case!

The only excuses I have is that:

a) I set it ages ago on both machines but somehow it got turned off on
the desktop, possible by an accidental ^F7 hit or so...

b) Neither TABs nor my programmed keys worked, which I would rather
expect to work regardless of this setting (in fact they also work only
when the full control is enabled)

c) It's almost 2am here now... ;-)

But all that raises another question: does the above mean that I have no
easy way of selecting the buttons with a keyboard whenever the user has
the default settings in his prefs?

Or what should I do rather than

[[self window] selectKeyViewFollowingView:self];

??

I may try addressing all the buttons directly or other experiments but
if you happen to know...

Regards.
Sherm Pendley - 27 Mar 2007 03:27 GMT
> But all that raises another question: does the above mean that I have
> no easy way of selecting the buttons with a keyboard whenever the user
> has the default settings in his prefs?

It means the user can't tab to a button and trigger it with the space bar,
yes. But you can assign a keystroke combination to the button - cmd-a or
whatever - in IB.

sherm--

Signature

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Silver Dream ! - 27 Mar 2007 10:16 GMT
>> But all that raises another question: does the above mean that I have
>> no easy way of selecting the buttons with a keyboard whenever the user
[quoted text clipped - 3 lines]
> yes. But you can assign a keystroke combination to the button - cmd-a or
> whatever - in IB.

You mean the keyEquivalent-s? Yes, I know that (I'll have another
question regarding those) but What I want is that the user could tab (or
use arrow keys) and hit space (or RETURN) even if the settings are
default. For now I think I'll experiment with addressing the buttons
with makeFirstResponder as that seemed to bring the focus ring to the
given button even if the full keyboard access was turned off. Not really
elegant as I probably will have to maintain a (redundant) list of
controls on my side but I have no other ideas as of today.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.