Bug or Intentional behaviour?

2016-04-24 Thread Graham Cox
I’ve noticed a problem with the way key events are sent to views (at least in 
10.11.4, but it’s likely a longstanding issue). 

If I type an ordinary key, I get a -keyDown:, when I release it, I get a -keyUp:

If I type an ordinary key with the command key down, and the key isn’t a menu 
shortcut, I get the -keyDown:, but never receive a -keyUp:

If I type an ordinary key (getting the -keyDown:), keep it held, press command, 
then release the first key, I also get no -keyUp:

This only happens with the command modifier, not any of the others. This is 
proving to be a nuisance because my app uses a keyup/keydown pair to set a 
temporary mode that persists only while a key is held. Without the keyup, the 
mode doesn’t recognise when to end. I can mitigate this somewhat in my code, 
but ultimately the lack of a -keyUp: is the real problem. Is this a bug or is 
it intentional? Why wouldn’t a cmd-key combo (that wasn’t a menu shortcut) NOT 
send a keyup?

—Graham



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo

2016-04-24 Thread Bill Cheeseman

> On Apr 24, 2016, at 1:13 PM, Dave  wrote:
> 
> I’ve got the Text View Selected in XCode/IB and I can’t find any option for 
> “Layout” in any of the property tabs? Auto-layout is off at the moment for 
> this window, it wouldn’t have anything to do with that would it?

I was describing text fields in my first paragraph, about nib files and 
storyboards. My second paragraph was about text views, which you have to do 
programmatically as far as I know.

-- 

Bill Cheeseman - wjcheese...@comcast.net

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo

2016-04-24 Thread Dave
Hi,


> On 24 Apr 2016, at 17:29, Bill Cheeseman  wrote:
> 
> 
>> On Apr 24, 2016, at 12:04 PM, Dave > > wrote:
>> 
>> I’m not sure what you mean? Is this a method or property on NSScrollView or 
>> NSTextView?
>> 
>> I can’t see it in the XIB file?
> 
> 
> In an NSTextField, IB shows you the "Layout" pop-up menu, which includes a 
> "truncate" item, and the "Uses Single Line Mode" checkbox just below. From 
> the docs, I think the single line mode might ignore the Layout settings. The 
> same IB controls are of course available in the text field in the cell view 
> in a view-based table view. The methods underlying these settings are in 
> NSCell.

I’ve got the Text View Selected in XCode/IB and I can’t find any option for 
“Layout” in any of the property tabs? Auto-layout is off at the moment for this 
window, it wouldn’t have anything to do with that would it?
> 
> You can control trucation behavior in an NSTextView by using NSTextStorage, 
> which is a subclass of NSMutableAttributedString. The truncation methods are 
> in NSParagraphStyle).

Thanks a lot,
All the Best
Dave

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo

2016-04-24 Thread Bill Cheeseman

> On Apr 24, 2016, at 12:04 PM, Dave  wrote:
> 
> I’m not sure what you mean? Is this a method or property on NSScrollView or 
> NSTextView?
> 
> I can’t see it in the XIB file?


In an NSTextField, IB shows you the "Layout" pop-up menu, which includes a 
"truncate" item, and the "Uses Single Line Mode" checkbox just below. From the 
docs, I think the single line mode might ignore the Layout settings. The same 
IB controls are of course available in the text field in the cell view in a 
view-based table view. The methods underlying these settings are in NSCell.

You can control trucation behavior in an NSTextView by using NSTextStorage, 
which is a subclass of NSMutableAttributedString. The truncation methods are in 
NSParagraphStyle).

-- 

Bill Cheeseman - wjcheese...@comcast.net

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo

2016-04-24 Thread Dave
Hi,

I’m not sure what you mean? Is this a method or property on NSScrollView or 
NSTextView?

I can’t see it in the XIB file?

Cheers
Davw


> On 24 Apr 2016, at 16:58, Andreas Mayer  wrote:
> 
> 
>> Am 24.04.2016 um 17:15 schrieb Dave :
>> 
>> I have an NSTextView inside an NSScrollView. At present the Text Lines is 
>> wrapped if they are longer than the Scroll View, I'd them to truncate. I had 
>> thought I’d seen some properties somewhere for doing this but I can’t find 
>> them in IB.
> 
> NSParagraphStyle lineBreakMode  seems to be what you are looking for.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo

2016-04-24 Thread Andreas Mayer

> Am 24.04.2016 um 17:15 schrieb Dave :
> 
> I have an NSTextView inside an NSScrollView. At present the Text Lines is 
> wrapped if they are longer than the Scroll View, I'd them to truncate. I had 
> thought I’d seen some properties somewhere for doing this but I can’t find 
> them in IB.

NSParagraphStyle lineBreakMode  seems to be what you are looking for.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo

2016-04-24 Thread Dave
Hi All,

I know this has been covered before but I can’t for the life of me find it by 
searching.

I have an NSTextView inside an NSScrollView. At present the Text Lines is 
wrapped if they are longer than the Scroll View, I'd them to truncate. I had 
thought I’d seen some properties somewhere for doing this but I can’t find them 
in IB.

Thanks in Advance for any help.
All the Best
Dave


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

nsopenpanel no title bar

2016-04-24 Thread Rick C.
Hi,

Since 10.11 it seems the title bar no longer appears even when using setTitle: 
does anyone know what happened and how to get the old behavior back?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com