Re: how to know a window finishes resizing

2008-05-07 Thread Jeff Nouwen

On May-7-2008, at 7:01 AM, Norio wrote:

Would you tell me how to know a window finishes resizing?

I know windowDidResize can track its resizing, but I don't want to get
information while the window resizing.  I do want to know after user
releases the mouse button or presses zoom icon.


-windowDidResize: is indeed the delegate method you're looking for.  
From the docs: Sent by the default notification center immediately  
after an NSWindow object has been resized.


The one that's used _while_ the user is resizing a window is - 
windowWillResize:toSize:


- Jeff
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Disabling screen turning off

2008-05-02 Thread Jeff Nouwen

On May-2-2008, at 2:26 AM, Jere Gmail wrote:
I know I can stop the machine from going to sleep through calling  
the function

UpdateSystemActivity ( UInt8 activity );
But I also want to stop it from turning off the screen, as quicktime  
or vlc do.

How can I do this?


Pass in UsrActivity as your activity value:
UsrActivity
Delays idle sleep and dimming by timeout time.
Available in Mac OS X v10.0 and later.
Declared in Power.h

- Jeff
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: -windowDidLoad not getting called

2008-04-21 Thread Jeff Nouwen

On Apr-21-2008, at 6:34 PM, Rick Mann wrote:
I basically want my controller to go do some stuff after it and the  
window are loaded. -setWindow seems like an ugly place to do this,  
and -init is probably too early. Is there a better place?


- (void)awakeFromNib

- Jeff

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSTreeController, canRemove binding

2008-03-22 Thread Jeff Nouwen

On Mar-22-2008, at 3:20 AM, Alexey Zakhlestin wrote:

I have NSOutlineView bound to NSTreeController
Additionally, I have a button, which is bound to canRemove of
NSTreeController. Unfortunately, button never gets disabled (even if I
have an empty selection in NSOutlineView)


I've run into this before and in my case it was because I forgot to  
bind the Selection Index Paths of my Outline View Content to the  
selectionIndexPaths key path of my tree controller. Forgetting this  
setting caused additional problems like insert: inserting after the  
last-created entry instead of where the selection in the UI was.


Do you have this binding set on your outline view?

- Jeff

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Value binding not updating on text field

2008-02-28 Thread Jeff Nouwen

Hi all,

I have an NSSlider and NSTextField in a window. The Value of the text  
field is bound to the instance of my controller in the nib with a key  
path of slider.floatValue. slider is an instance variable of the  
controller and the outlets are set correctly (confirmed through  
NSLog'ing the values of slider and the text field while tracking the  
slider knob).


When the window is first loaded, the value of the text field is  
correctly set to whatever I've set the Current value of the slider to  
in IB, but the text field never updates either during control tracking  
or after the mouse button is released. Continually Updates Value is  
enabled on the binding.


I know I'm missing something rudimentary, but can't figure out what.

- Jeff
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]