Re: IOS iPad PopOver Nav bar color

2013-02-19 Thread Alex Zavatone
This might help.

http://stackoverflow.com/questions/1852319/uinavigationbar-gradient-details



On Feb 17, 2013, at 8:24 PM, Trygve Inda wrote:

> I have a popover view and would like a nav-like title bar on it in a dark
> color that matches the frame gradient of the popover fram. I can make the
> nav bar grey or black, but can't seem to get it to apply the gradient that
> the frame has.
> 
> Ical seems to be able to do this when you tap "Calendars" in the upper
> right, the title "Show Calendars" is on a title bar that I would like.
> 
> Thanks,
> 
> Trygve
> 
> 
> 
> ___
> 
> 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/zav%40mac.com
> 
> This email sent to z...@mac.com

___

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


NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Michael Starke
Hello here,

Yesterday a ran into a strange problem that I could not get my head around. 
Simple setup created in InterfaceBuilder:

A window with a horizontal NSSplitview with two subviews.

If I run this without setting the delegate of the split view the two subviews 
get rescaled as expected.
When I hook up a delegate (for example via InterfaceBuilder) and the delegate 
does not implement any of the @optionals, all is fine.

But when I just add one implementation, e.g:

- (CGFloat)splitView:(NSSplitView *)splitView 
constrainMinCoordinate:(CGFloat)proposedMinimumPosition 
ofSubviewAt:(NSInteger)dividerIndex {
return proposedMinimumPosition;
}

Which should interfere in any way, all goes down the drain. If i drag the 
Splitter, the left view gets resized, the right view just stays the same
If the delegate implements

- (void)splitViewDidResizeSubviews:(NSNotification *)notification

I just get notified for resizing the first view, not the second

Am I to stupid to see my error? Or might this be a bug?

Any help would be great,
Michael
 


___m i c h a e l   s t a r k e 
   geschäftsführer
   HicknHack Software GmbH
   www.hicknhack-software.com
   
___k o n t a k t
   +49 (170) 3686136
   cont...@hicknhack.com
   
___H i c k n H a c k   S o f t w a r e   G m b H
   geschäftsführer - maik lathan | andreas reischuck | michael starke
   bayreuther straße 32
   01187 dresden
   amtsgericht dresden HRB 30351
   sitz - dresden


___

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

iOS/RestKit/XCode 4.6

2013-02-19 Thread Dave

Hi All,

Has anyone managed to successfully add RestKit and AFNetworking as  
part of it) with XCode 4.6.


I've pulled the Sub Module from github and following the installation  
instructions but I just can't get it it build properly. The  
instructions on github are out of date by the looks of things and I'm  
at a loss as it know what to tweak. I really can't understand it's so  
difficult to add something like this in XCode 4, ever since they  
"upgraded" it, I've had nothing by problems.


The documentation and examples for RestKit looked really good, but  
now I've had these problems I'm wondering if it's worth the effort.  
I've found in the past that generally if something takes more than 10  
minutes to add to your existing project then the underlying product  
itself is likely to be flakey too. Since usually the same developers  
that write the code also do the installation setup and documentation.


The is here, I'm not sure if it's not just XCode playing up?

Any help greatly appreciated.

Thanks
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: iOS/RestKit/XCode 4.6

2013-02-19 Thread Dennis
I haven't done so myself (but plan to give it a try soon). However, just 
yesterday, somebody at work made a brief presentation on CocoaPods, which he 
had used to install RestKit with. He mentioned that it made it much easier to 
install RestKit.



On Feb 19, 2013, at 8:04 AM, Dave  wrote:

> Has anyone managed to successfully add RestKit and AFNetworking as part of 
> it) with XCode 4.6.


___

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: iOS/RestKit/XCode 4.6

2013-02-19 Thread Dave

Hi,

I took a quick look but far from making it easier, looks like it will  
add a whole load more complexity to something really should be simple.


Thanks anyway.
Dave

On 19 Feb 2013, at 16:24, Dennis wrote:

I haven't done so myself (but plan to give it a try soon). However,  
just yesterday, somebody at work made a brief presentation on  
CocoaPods, which he had used to install RestKit with. He mentioned  
that it made it much easier to install RestKit.




On Feb 19, 2013, at 8:04 AM, Dave  wrote:

Has anyone managed to successfully add RestKit and AFNetworking as  
part of it) with XCode 4.6.




___

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: No mouseExited when switching windows

2013-02-19 Thread Steve Mills
On Feb 18, 2013, at 16:46:10, Fritz Anderson  wrote:

> "Notified" is the right word. NSWindow posts NSWindowDidResignKeyNotification 
> and NSWindowDidResignMainNotification. There are also delegate methods with 
> nearly the same names (which get passed the same notification objects).

Ah, thanks. I've added this, but it's not behaving nicely. I have a NSControl 
subclass (FCBaselineView) that is NOT loaded from a nib, but instantiated 
manually and added to its owning superview. I've overridden 
viewWillMoveToWindow in my subclass so I can add the notification observer at a 
time when the window exists:

-(void) viewWillMoveToWindow:(NSWindow*)newWindow;
{
// Does the super need to be called? I kind of assume it does not from 
the docs, but it's not clear.
[super viewWillMoveToWindow:newWindow];

NSNotificationCenter*   center = [NSNotificationCenter 
defaultCenter];

[center removeObserver:self name:NSWindowDidResignKeyNotification 
object:nil];
[center addObserver:self selector:@selector(windowDidResignKey) 
name:NSWindowDidResignKeyNotification object:newWindow];
}

Then implemented the windowDidResignKey method:

-(void) windowDidResignKey:(NSNotification*)notification
{
UNUSED_VAR(notification);
printf("notify\n");
}

When I switch windows, I get an exception thrown:

2013-02-19 11:11:10.330 app[40530:303] -[FCBaselineView windowDidResignKey]: 
unrecognized selector sent to instance 0x11f6b750
2013-02-19 11:11:10.331 app[40530:303] -[FCBaselineView windowDidResignKey]: 
unrecognized selector sent to instance 0x11f6b750
2013-02-19 11:11:10.339 app[40530:303] (
0   CoreFoundation  0x92b9c12b __raiseError + 219
1   libobjc.A.dylib 0x9854852e objc_exception_throw 
+ 230
2   CoreFoundation  0x92b9fd9d -[NSObject(NSObject) 
doesNotRecognizeSelector:] + 253
3   CoreFoundation  0x92ae8437 ___forwarding___ + 
487
4   CoreFoundation  0x92ae81e2 
_CF_forwarding_prep_0 + 50
5   Foundation  0x97845c52 
__57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 
49
6   CoreFoundation  0x92b5de01 
___CFXNotificationPost_block_invoke_0 + 257
7   CoreFoundation  0x92aa943a _CFXNotificationPost 
+ 2794
8   Foundation  0x9782e788 
-[NSNotificationCenter postNotificationName:object:userInfo:] + 92
9   Foundation  0x9783e527 
-[NSNotificationCenter postNotificationName:object:] + 55
10  AppKit  0x93c87143 -[NSWindow 
resignKeyWindow] + 599
11  AppKit  0x93b1021d 
_NXSendWindowNotification + 60
12  AppKit  0x93950c0b endKeyAndMain + 81
13  AppKit  0x93b3768c -[NSApplication 
sendEvent:] + 3379
14  AppKit  0x93a5172c -[NSApplication run] 
+ 951
15  AppKit  0x939f46f6 NSApplicationMain + 
1053
16  app 0x012d2c30 main + 160
17  app 0x2d65 start + 53
18  ??? 0x0003 0x0 + 3
)

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



___

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: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Chuck Soper
Are you using Auto Layout in InterfaceBuilder? (See the Use Auto Layout
checkbox in the File inspector for each nib.) If so, implementing
splitView:constrainMinCoordinate:ofSubviewAt: may conflict with auto
layout.

Also, what is your purposed minimum? Where is it defined?

Chuck


On 2/19/13 7:53 AM, "Michael Starke"
 wrote:

>Hello here,
>
>Yesterday a ran into a strange problem that I could not get my head
>around. Simple setup created in InterfaceBuilder:
>
>A window with a horizontal NSSplitview with two subviews.
>
>If I run this without setting the delegate of the split view the two
>subviews get rescaled as expected.
>When I hook up a delegate (for example via InterfaceBuilder) and the
>delegate does not implement any of the @optionals, all is fine.
>
>But when I just add one implementation, e.g:
>
>- (CGFloat)splitView:(NSSplitView *)splitView
>constrainMinCoordinate:(CGFloat)proposedMinimumPosition
>ofSubviewAt:(NSInteger)dividerIndex {
>   return proposedMinimumPosition;
>}
>
>Which should interfere in any way, all goes down the drain. If i drag the
>Splitter, the left view gets resized, the right view just stays the same
>If the delegate implements
>
>- (void)splitViewDidResizeSubviews:(NSNotification *)notification
>
>I just get notified for resizing the first view, not the second
>
>Am I to stupid to see my error? Or might this be a bug?
>
>Any help would be great,
>Michael
> 
>
>
>___m i c h a e l   s t a r k e
>   geschäftsführer
>   HicknHack Software GmbH
>   www.hicknhack-software.com
>   
>___k o n t a k t
>   +49 (170) 3686136
>   cont...@hicknhack.com
>   
>___H i c k n H a c k   S o f t w a r e   G m b H
>   geschäftsführer - maik lathan | andreas reischuck | michael starke
>   bayreuther straße 32
>   01187 dresden
>   amtsgericht dresden HRB 30351
>   sitz - dresden
>
>
>___
>
>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/chucks%40veladg.com
>
>This email sent to chu...@veladg.com



___

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

CALayer's backgrounds filters having effect only on immediate parent?

2013-02-19 Thread Oleg Krupnov
In my understanding, if I apply, say, a blur filter to layer's
background (CALayer->backgroundFilters), all layers that are behind
that layer - that is, immediate parent, grand parent, etc. and all
children and siblings of those parent and grandparents that are lower
in the tree of layers - should appear blurred.

An experiment however shows that it's not the case. The background
blur filter only blurs the direct parent of the target layer, but not
its grandparent and other layers.

The same applies for compositingFilter.

Am I doing something wrong?

Or, if this is the way it should work as documented, how do achieve
the effect I want?

Thanks.
___

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: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Michael Starke
I was thinking about Auto-Layout and indeed it is the source of the Problem. 

Even if the delgate just had
- (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView 
*)view {
return YES;
}
the resizing did not work anymore.

The proposedMinimumPosition was just the input, which is 0. I just wanted to 
implement a method without altering the behavior (which this should have done 
if i read the header documentation correctly)


Anyway. Disabling Autolayout fixed all the quirks. How does one use a Splitter 
with Autolayout? Do I have to add custom constraints to the content views?

On 19.02.2013, at 18:22, Chuck Soper  wrote:

> Are you using Auto Layout in InterfaceBuilder? (See the Use Auto Layout
> checkbox in the File inspector for each nib.) If so, implementing
> splitView:constrainMinCoordinate:ofSubviewAt: may conflict with auto
> layout.
> 
> Also, what is your purposed minimum? Where is it defined?
> 
> Chuck
> 
> 
> On 2/19/13 7:53 AM, "Michael Starke"
>  wrote:
> 
>> Hello here,
>> 
>> Yesterday a ran into a strange problem that I could not get my head
>> around. Simple setup created in InterfaceBuilder:
>> 
>> A window with a horizontal NSSplitview with two subviews.
>> 
>> If I run this without setting the delegate of the split view the two
>> subviews get rescaled as expected.
>> When I hook up a delegate (for example via InterfaceBuilder) and the
>> delegate does not implement any of the @optionals, all is fine.
>> 
>> But when I just add one implementation, e.g:
>> 
>> - (CGFloat)splitView:(NSSplitView *)splitView
>> constrainMinCoordinate:(CGFloat)proposedMinimumPosition
>> ofSubviewAt:(NSInteger)dividerIndex {
>>  return proposedMinimumPosition;
>> }
>> 
>> Which should interfere in any way, all goes down the drain. If i drag the
>> Splitter, the left view gets resized, the right view just stays the same
>> If the delegate implements
>> 
>> - (void)splitViewDidResizeSubviews:(NSNotification *)notification
>> 
>> I just get notified for resizing the first view, not the second
>> 
>> Am I to stupid to see my error? Or might this be a bug?
>> 
>> Any help would be great,
>> Michael
>> 
>> 
>> 
>> ___m i c h a e l   s t a r k e
>> geschäftsführer
>> HicknHack Software GmbH
>> www.hicknhack-software.com
>> 
>> ___k o n t a k t
>> +49 (170) 3686136
>> cont...@hicknhack.com
>> 
>> ___H i c k n H a c k   S o f t w a r e   G m b H
>> geschäftsführer - maik lathan | andreas reischuck | michael starke
>> bayreuther straße 32
>> 01187 dresden
>> amtsgericht dresden HRB 30351
>> sitz - dresden
>> 
>> 
>> ___
>> 
>> 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/chucks%40veladg.com
>> 
>> This email sent to chu...@veladg.com
> 
> 


___m i c h a e l   s t a r k e 
  geschäftsführer
  HicknHack Software GmbH
  www.hicknhack-software.com

___k o n t a k t
  +49 (170) 3686136
  cont...@hicknhack.com

___H i c k n H a c k   S o f t w a r e   G m b H
  geschäftsführer - maik lathan | andreas reischuck | michael starke
  bayreuther straße 32
  01187 dresden
  amtsgericht dresden HRB 30351
  sitz - dresden


___

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: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Chuck Soper
Autolayout works well with NSSplitView. There may be differences between
10.7 or 10.8 but I can't remember. Does your app require Mac OS X 10.8 or
10.7?

The way I use autolayout with NSSplitView is to add constraints to the
subviews in IB. If you need to add or remove those constraints, you can
connect the constraints in IB as ivars, then add/remove them to your view
as necessary. I'm not sure if I'm explaining this very well, one of these
WWDC videos explains it quite well:
WWDC 2012: Introduction to Auto Layout for iOS and OS X
  
WWDC 2012: Auto Layout by Example
  
WWDC 2012: Best Practices for Mastering Auto Layout
  

When I first looked into using autolayout, I thought that it was best to
implement split views without NSSplitView. The reason I thought this was
because one of the autolayout samples (link below) shows how to implement
split views without NSSplitView. It says that this approach is "a lot
simpler." But, I think the comment means writing this sample code is
simpler then writing NSSplitView from scratch.


I think that using NSSplitView with autolayout is simpler than attempting
to write split views without NSSplitView but I didn't discover this by
reading the documentation.



Here's a response that I got a few months ago that was very helpful:
http://lists.apple.com/archives/cocoa-dev/2012/Nov/msg00463.html

hope this helps,
Chuck



On 2/19/13 2:28 PM, "Michael Starke"
 wrote:

>I was thinking about Auto-Layout and indeed it is the source of the
>Problem. 
>
>Even if the delgate just had
>- (BOOL)splitView:(NSSplitView *)splitView
>shouldAdjustSizeOfSubview:(NSView *)view {
>   return YES;
>}
>the resizing did not work anymore.
>
>The proposedMinimumPosition was just the input, which is 0. I just wanted
>to implement a method without altering the behavior (which this should
>have done if i read the header documentation correctly)
>
>
>Anyway. Disabling Autolayout fixed all the quirks. How does one use a
>Splitter with Autolayout? Do I have to add custom constraints to the
>content views?
>
>On 19.02.2013, at 18:22, Chuck Soper  wrote:
>
>> Are you using Auto Layout in InterfaceBuilder? (See the Use Auto Layout
>> checkbox in the File inspector for each nib.) If so, implementing
>> splitView:constrainMinCoordinate:ofSubviewAt: may conflict with auto
>> layout.
>> 
>> Also, what is your purposed minimum? Where is it defined?
>> 
>> Chuck
>> 
>> 
>> On 2/19/13 7:53 AM, "Michael Starke"
>>  wrote:
>> 
>>> Hello here,
>>> 
>>> Yesterday a ran into a strange problem that I could not get my head
>>> around. Simple setup created in InterfaceBuilder:
>>> 
>>> A window with a horizontal NSSplitview with two subviews.
>>> 
>>> If I run this without setting the delegate of the split view the two
>>> subviews get rescaled as expected.
>>> When I hook up a delegate (for example via InterfaceBuilder) and the
>>> delegate does not implement any of the @optionals, all is fine.
>>> 
>>> But when I just add one implementation, e.g:
>>> 
>>> - (CGFloat)splitView:(NSSplitView *)splitView
>>> constrainMinCoordinate:(CGFloat)proposedMinimumPosition
>>> ofSubviewAt:(NSInteger)dividerIndex {
>>> return proposedMinimumPosition;
>>> }
>>> 
>>> Which should interfere in any way, all goes down the drain. If i drag
>>>the
>>> Splitter, the left view gets resized, the right view just stays the
>>>same
>>> If the delegate implements
>>> 
>>> - (void)splitViewDidResizeSubviews:(NSNotification *)notification
>>> 
>>> I just get notified for resizing the first view, not the second
>>> 
>>> Am I to stupid to see my error? Or might this be a bug?
>>> 
>>> Any help would be great,
>>> Michael
>>> 
>>> 
>>> 
>>> ___m i c h a e l   s t a r k e
>>> geschäftsführer
>>> HicknHack Software GmbH
>>> www.hicknhack-software.com
>>> 
>>> ___k o n t a k t
>>> +49 (170) 3686136
>>> cont...@hicknhack.com
>>> 
>>> ___H i c k n H a c k   S o f t w a r e   G m b H
>>> geschäftsführer - maik lathan | andreas reischuck | michael starke
>>> bayreuther straße 32
>>> 01187 dresden
>>> amtsgericht dresden HRB 30351
>>> sitz - dresden
>>> 
>>> 
>>> ___
>>> 
>>> 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/chucks%40veladg.com
>>> 
>>> This email sent to chu...@veladg.com
>> 
>> 
>
>
>___m i c h a e l   s t a r k e
>  geschäftsführer
>  HicknHack Software GmbH
> 

Re: No mouseExited when switching windows

2013-02-19 Thread Shane Stanley
On 20/02/2013, at 4:16 AM, Steve Mills  wrote:

>   [center addObserver:self selector:@selector(windowDidResignKey) 

Don't you mean:

[center addObserver:self selector:@selector(windowDidResignKey:) 

-- 
Shane Stanley 
'AppleScriptObjC Explored' 

___

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: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Kyle Sluder
On Tue, Feb 19, 2013, at 03:31 PM, Chuck Soper wrote:
> Autolayout works well with NSSplitView. There may be differences between
> 10.7 or 10.8 but I can't remember. Does your app require Mac OS X 10.8 or
> 10.7?

Autolayout does not work with NSSplitView on 10.7.

--Kyle Sluder
___

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: CALayer's backgrounds filters having effect only on immediate parent?

2013-02-19 Thread Graham Cox

On 20/02/2013, at 5:42 AM, Oleg Krupnov  wrote:

> In my understanding, if I apply, say, a blur filter to layer's
> background (CALayer->backgroundFilters), all layers that are behind
> that layer - that is, immediate parent, grand parent, etc. and all
> children and siblings of those parent and grandparents that are lower
> in the tree of layers - should appear blurred.
> 
> An experiment however shows that it's not the case. The background
> blur filter only blurs the direct parent of the target layer, but not
> its grandparent and other layers.
> 
> The same applies for compositingFilter.
> 
> Am I doing something wrong?
> 
> Or, if this is the way it should work as documented, how do achieve
> the effect I want?


I think your understanding is incorrect. My interpretation of the docs is 
simply that the background - that is to say, the background colour of the layer 
- is filtered. If you think about how layers are composited, this is the only 
interpretation that makes sense - how could a layer retroactively apply a bunch 
of filters to things that have already been rendered?

Setting the filters on the root layer or on some layer further up the tree 
should achieve the effect you want, though most likely you'll want the 
compositingFilters rather than the background filters property.


--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: dragging NSTableColumn to another table

2013-02-19 Thread Chuck Soper
On 2/18/13 11:06 PM, "Graham Cox"  wrote:

>On 19/02/2013, at 11:09 AM, Chuck Soper  wrote:
>
>> Does anyone know the steps to allow custom dragging of a table column to
>> another table? Is this possible? If I was dealing with an NSView
>>subclass,
>> I think this would be straightforward. I want to show the entire column
>> (header + row) when dragging. I believe that the dragging implementation
>> could go in my NSTableHeaderCell subclass, but I'm not sure how to get
>> started.
>
>
>It's definitely possible, but you'll have to do a bit of subclassing. I
>suspect you're going to need to subclass the overall NSTableView so that
>you can receive a private drag type and do the necessary graphics work as
>part of NSDraggingDestination.
>
>There are two parts to a drag - the drag source and the drag destination.
>The source can be your custom table header cell, but the destination is
>probably going to have to be a subclass of the table view itself. The two
>parts can be programmed fairly independently, once you've settled on how
>they are going to communicate in terms of the column data you pass from
>to the other.
>
>Having subclassed your table header cell, kicking off the drag shouldn't
>be too hard - just handle the mouseDown or mouseDragged and capture an
>image of the column as the drag image. NSView's method for capturing part
>of a view to a bitmap rep is invaluable here. Declare a private drag type
>and use whatever data makes sense to pass the column content through the
>drag pasteboard mechanism - you might not need to actually transfer any
>data, you could just store enough info in shared variables (e.g. just
>make a note of the source column somewhere) that your custom table class
>can access - as it's all private there's no need to consider dragging to
>other apps or supporting standard data formats.
>
>The hardest part as I see it is in receiving the drag. Your custom table
>class will register for the private drag type, and implement
>NSDraggingDestination methods to do whatever is needed to provide
>feedback and validation of the drag. You will need for example to
>highlight the place where the column can be dropped, and maybe animate
>moving other columns apart to "make room". You'll want to pass anything
>else up to super's implementation to continue supporting all the standard
>dragging that the table can handle.
>
>On a drop, you just need to remove the column from the source, use the
>private data to recreate it at the destination and insert it into the
>table view.
>
>--Graham


Thanks for your very thorough response. It sounds possible, but quite
labor intensive. So much so, that I think that I should not be using
NSTableView. I was using NSTableView, with one row, as way to horizontally
scroll custom views. To auto adjust the height of the single row I added
an observer for NSViewFrameDidChangeNotification on the NSTableView
object. Then called setRowHeight: to
scrollView.documentVisibleRect.size.height as the table was resized.

This was pretty fast to implement and worked fine. I think that this could
have been a good way to make use of a table view except for needing to
customize the headerCell and implement custom column dragging. I think
that I'll just use an NSScrollView and avoid customizing NSTableView.

Chuck





___

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: dragging NSTableColumn to another table

2013-02-19 Thread Graham Cox

On 20/02/2013, at 12:10 PM, Chuck Soper  wrote:

> Thanks for your very thorough response. It sounds possible, but quite
> labor intensive. So much so, that I think that I should not be using
> NSTableView. I was using NSTableView, with one row, as way to horizontally
> scroll custom views. To auto adjust the height of the single row I added
> an observer for NSViewFrameDidChangeNotification on the NSTableView
> object. Then called setRowHeight: to
> scrollView.documentVisibleRect.size.height as the table was resized.
> 
> This was pretty fast to implement and worked fine. I think that this could
> have been a good way to make use of a table view except for needing to
> customize the headerCell and implement custom column dragging. I think
> that I'll just use an NSScrollView and avoid customizing NSTableView.


Yeah, sounds to me like you're gaining next to nothing from NSTableView. Just 
implement the whole thing as a custom view containing other custom views (of a 
different or the same kind). In fact, I just did that for something almost 
identical except it's vertical rather than horizontal. I implemented drag and 
drop reordering in almost exactly the way I described and there wasn't too much 
to it - I even have the animation working nicely where an appropriate gap opens 
up to accommodate the dropped item. The main thing I ran into there was that 
using Core Animation (via [NSView animator]) to change frame origins and sizes 
was more troublesome than doing my own animations.

Unfortunately I can't share as a) it's commercial code and b) it's probably too 
rough for public consumption.

--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: dragging NSTableColumn to another table

2013-02-19 Thread Chuck Soper
On 2/19/13 5:54 PM, "Graham Cox"  wrote:

>On 20/02/2013, at 12:10 PM, Chuck Soper  wrote:
>
>> Thanks for your very thorough response. It sounds possible, but quite
>> labor intensive. So much so, that I think that I should not be using
>> NSTableView. I was using NSTableView, with one row, as way to
>>horizontally
>> scroll custom views. To auto adjust the height of the single row I added
>> an observer for NSViewFrameDidChangeNotification on the NSTableView
>> object. Then called setRowHeight: to
>> scrollView.documentVisibleRect.size.height as the table was resized.
>> 
>> This was pretty fast to implement and worked fine. I think that this
>>could
>> have been a good way to make use of a table view except for needing to
>> customize the headerCell and implement custom column dragging. I think
>> that I'll just use an NSScrollView and avoid customizing NSTableView.
>
>
>Yeah, sounds to me like you're gaining next to nothing from NSTableView.
>Just implement the whole thing as a custom view containing other custom
>views (of a different or the same kind). In fact, I just did that for
>something almost identical except it's vertical rather than horizontal. I
>implemented drag and drop reordering in almost exactly the way I
>described and there wasn't too much to it - I even have the animation
>working nicely where an appropriate gap opens up to accommodate the
>dropped item. The main thing I ran into there was that using Core
>Animation (via [NSView animator]) to change frame origins and sizes was
>more troublesome than doing my own animations.
>
>Unfortunately I can't share as a) it's commercial code and b) it's
>probably too rough for public consumption.
>
>--Graham

Excellent. I think I have a good solution. The custom container view I
implement will likely be the documentView within an NSScrollView. Thanks
for all your feedback including mentioning different options for animation.

I was going to ask if you used autolayout to place and resize items within
your container view, but since you're changing frame origins and sizes I'm
sure you're not. I'm about to post a question about whether to use
autolayout in this scenario. At this moment I'm planning to just change
frame origins and sizes because it seems more straightforward than trying
to use autolayout.

Chuck


___

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


NSScrollView: should I use autolayout or not?

2013-02-19 Thread Chuck Soper
I want to use NSScrollView to create a row of custom views. The width of
each custom view can be resized by the user, very similar to an
NSTableView (resizable columns within an NSScrollView). The height of each
custom view would be pinned to the documentView (which would be pinned to
the NSScrollView). I also need to be able to drag and drop custom views
for reordering within the NSScrollView or to another NSScrollView (ideally
opening up a gap between two views in the destination before the drop).


The main question I have is whether I should even try to use autolayout to
place and resize the custom views within the NSScrollView? Not using
autolayout, and simply adjusting the frames for each custom view seems
easier. This approach will still allow me to use autolayout within the
custom views and within the main view for the window. In general, I think
that autolayout is very useful.

Does anyone recommend using autolayout to place and resize custom views
within an NSScrollView? If so, how do you auto adjust the width of the
documentView (of the NSScrollView)? Previously, I found that I had to call
setFrame: on the documentView, but I believe that setFrame: is never
supposed to be used when using autolayout.

And, I'm curious if anyone recommends avoiding the use of autolayout when
placing and resizing items within an NSScrollView. Right now, I'm leaning
towards not using autolayout within this scroll view unless there's some
compelling reason to do so.

Thanks,
Chuck


___

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: dragging NSTableColumn to another table

2013-02-19 Thread Graham Cox

On 20/02/2013, at 1:27 PM, Chuck Soper  wrote:

> I was going to ask if you used autolayout to place and resize items within
> your container view, but since you're changing frame origins and sizes I'm
> sure you're not.


Correct - I didn't use auto-layout. It's not clear to me that it would give you 
anything useful in this particular case.

--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