Re: Notification of window visible?

2010-06-03 Thread Reinhard Segeler
The notification NSWindowDidBecomeKeyNotification will do it for you. -- Reinhard Am 04.06.2010 um 07:11 schrieb Chris Idou: How does one get notification that a window has become visible? I can see notifications for most every type of window event except this most obvious one.

Notification of window visible?

2010-06-03 Thread Chris Idou
How does one get notification that a window has become visible? I can see notifications for most every type of window event except this most obvious one. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or m

icon sizes

2010-06-03 Thread Shane
I'm going to have some icons made for my app, and I'm wondering to what size they should be made. I've been using some placeholder type icons and when I looked at each of their sizes, they are actually different sizes when they appear in Finder. But when I used them in my app on buttons, it seems t

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Markus Spoettl
On Jun 4, 2010, at 12:29 AM, Dave Fernandes wrote: > The Leopard AppKit release notes certainly mention textured windows in a > number of places, but nowhere does it say that they are deprecated. I thought > a bottom bar was just a strip of visible window background. How do you make > the window

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Kyle Sluder
On Thu, Jun 3, 2010 at 9:29 PM, Dave Fernandes wrote: > The Leopard AppKit release notes certainly mention textured windows in a > number of places, but nowhere does it say that they are deprecated. I thought > a bottom bar was just a strip of visible window background. How do you make > the wi

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Dave Fernandes
The Leopard AppKit release notes certainly mention textured windows in a number of places, but nowhere does it say that they are deprecated. I thought a bottom bar was just a strip of visible window background. How do you make the window draggable from the bottom bar without making the window te

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Kyle Sluder
On Jun 3, 2010, at 8:43 PM, Dave Fernandes wrote: What? Deprecated? Where does it say this? Aren't iCal and AddressBook textured windows? Or am I confusing the term? Check the Leopard release notes. Normal and unified styles were merged, textured windows were deprecated and their backgro

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Dave Fernandes
What? Deprecated? Where does it say this? Aren't iCal and AddressBook textured windows? Or am I confusing the term? On 2010-06-03, at 11:38 AM, Kyle Sluder wrote: > On Jun 3, 2010, at 8:29 AM, Michael Hanna wrote: > >> How do I customize the background colour of a window, including the >> tool

Re: va_list and unanticipated format specifiers

2010-06-03 Thread David Duncan
On Jun 3, 2010, at 6:46 AM, jonat...@mugginsoft.com wrote: > My app runs user supplied scripts. > > These scripts may contain RubyCocoa statements such as: > OSX::NSLog("task parameters are %@ and %@", a, b) > > These scripts may contain errors and the generated error reports may contain > the

Re: va_list and unanticipated format specifiers

2010-06-03 Thread Ken Thomases
On Jun 3, 2010, at 8:46 AM, jonat...@mugginsoft.com wrote: > My app runs user supplied scripts. > > These scripts may contain RubyCocoa statements such as: > OSX::NSLog("task parameters are %@ and %@", a, b) > > These scripts may contain errors and the generated error reports may contain > the

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Michael Hanna
OK thanks all. I decided against customizing the window after all. Michael On Thu, Jun 3, 2010 at 12:32 PM, Kyle Sluder wrote: > On Jun 3, 2010, at 9:24 AM, John Joyce wrote: > >> If you REALLY think you need this, look at the Stickies sample code (may >> be named Core Data Stickies, don't reca

Re: Using a UIButton as cell accessory view in plain UITableView

2010-06-03 Thread Tino Rachui
Thanks Kyle and Brian. Seem I wasn't too far off with my tentative solutions. Regards, Tino Am 03.06.2010 um 18:15 schrieb Kyle Sluder: > On Jun 3, 2010, at 8:38 AM, Tino Rachui wrote: > >> On the iPhone I have a plain table. Every cell should have a UIButton as >> accessory view. I configure

Re: CFAttributedString and NSDATA

2010-06-03 Thread glenn andreas
On Jun 3, 2010, at 12:08 PM, Chaitanya Pandit wrote: > > Yeah NSAttributedString is available in 3.2, but what would have been more > helpful would be having the AppKit additions of NSAttributedStrings. > The CFAttributedString and the NSAtttibutedString in 3.2 looks kinda half > hearted effor

Re: CFAttributedString and NSDATA

2010-06-03 Thread Chaitanya Pandit
Yeah NSAttributedString is available in 3.2, but what would have been more helpful would be having the AppKit additions of NSAttributedStrings. The CFAttributedString and the NSAtttibutedString in 3.2 looks kinda half hearted effort without the AppKitAdditions Chaitanya Pandit On Jun 3, 2010,

Re: CFAttributedString and NSDATA

2010-06-03 Thread David Duncan
On Jun 3, 2010, at 9:54 AM, Jens Alfke wrote: > On Jun 3, 2010, at 4:24 AM, Jean-Daniel Dupas wrote: > >> If it behaves as the Mac OS CFAttributedString, cast it into an >> NSAttributedString and use an archiver. > > That will work, but wouldn’t saving it as RTF be a more standard way of doing

Re: CFAttributedString and NSDATA

2010-06-03 Thread Jens Alfke
On Jun 3, 2010, at 4:24 AM, Jean-Daniel Dupas wrote: > If it behaves as the Mac OS CFAttributedString, cast it into an > NSAttributedString and use an archiver. That will work, but wouldn’t saving it as RTF be a more standard way of doing it? (Or does the RTF import/export category on NSAttrib

Re: How to change color of text in webView

2010-06-03 Thread Jens Alfke
On Jun 2, 2010, at 8:53 PM, Shripada Hebbar wrote: > You can do all that stuff such as fonts, color in html/css that you feed to > web view. Or if you don’t have control over the HTML, you can create a custom stylesheet and attach it to the DOM. —Jens__

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Kyle Sluder
On Jun 3, 2010, at 9:24 AM, John Joyce wrote: If you REALLY think you need this, look at the Stickies sample code (may be named Core Data Stickies, don't recall precisely). You'll see how to roll your own window. Part of the benefit of going the textured-window route is that you get stan

Re: Change the background colour of a window and toolbar

2010-06-03 Thread John Joyce
On Jun 3, 2010, at 10:38 AM, Kyle Sluder wrote: > On Jun 3, 2010, at 8:29 AM, Michael Hanna wrote: > >> How do I customize the background colour of a window, including the >> toolbar? I did this a long time ago and vaguely recall that you can do >> this by setting it as a "textured window" and

Re: Using a UIButton as cell accessory view in plain UITableView

2010-06-03 Thread Kyle Sluder
On Jun 3, 2010, at 8:38 AM, Tino Rachui wrote: On the iPhone I have a plain table. Every cell should have a UIButton as accessory view. I configure each cell like this: -(UITableViewCell*)tableView:(UITableView*)theTableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { ... UIButton

Re: Using a UIButton as cell accessory view in plain UITableView

2010-06-03 Thread Brian Slick
Get the superview (possible the superview's superview) for the button (sender). Once you have the cell, ask the table for the index path. Brian On Jun 3, 2010, at 11:38 AM, Tino Rachui wrote: > On the iPhone I have a plain table. Every cell should have a UIButton as > accessory view. I confi

Using a UIButton as cell accessory view in plain UITableView

2010-06-03 Thread Tino Rachui
On the iPhone I have a plain table. Every cell should have a UIButton as accessory view. I configure each cell like this: -(UITableViewCell*)tableView:(UITableView*)theTableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { ... UIButton *btnAdd = [UIButton buttonWithType:UIButtonTypeContactA

Re: Change the background colour of a window and toolbar

2010-06-03 Thread Kyle Sluder
On Jun 3, 2010, at 8:29 AM, Michael Hanna wrote: How do I customize the background colour of a window, including the toolbar? I did this a long time ago and vaguely recall that you can do this by setting it as a "textured window" and changing the background colour, but the exact process is lost

Change the background colour of a window and toolbar

2010-06-03 Thread Michael Hanna
How do I customize the background colour of a window, including the toolbar? I did this a long time ago and vaguely recall that you can do this by setting it as a "textured window" and changing the background colour, but the exact process is lost on me. I vaguely recall there was some sample code o

Re: Monster memory leak and I can't figure out why

2010-06-03 Thread Sean McBride
On Wed, 2 Jun 2010 23:28:23 -0400, Jeff Schilling said: >Are you running with NSZombieEnabled=YES? many an hour has been spent >tracking down 'memory leaks' - I have some firsthand experience with this :-) NSZombieEnabled does not work with garbage collected apps, such as the OP's. :( -- __

Re: va_list and unanticipated format specifiers

2010-06-03 Thread jonat...@mugginsoft.com
On 3 Jun 2010, at 14:20, Ken Thomases wrote: > >> With the va_list we don't know the number of items. >> With the format spec we don't know which of the format specifiers are >> unanticipated. > > Again, what constitutes "unanticipated" for a format specifier? If there's > something like "%@

Re: va_list and unanticipated format specifiers

2010-06-03 Thread Ken Thomases
On Jun 3, 2010, at 6:47 AM, jonat...@mugginsoft.com wrote: > One of my logging methods uses a variable argument list and is accessed via a > macro > > #define MLog(level,s,...) [[MLog sharedController] withLevel:level > sourceFile:__FILE__ lineNumber:__LINE__ format:(s),## __VA_ARGS__] > > The

Re: CFAttributedString and NSDATA

2010-06-03 Thread Jean-Daniel Dupas
Le 3 juin 2010 à 14:07, Kyle Sluder a écrit : > On Jun 3, 2010, at 4:24 AM, Jean-Daniel Dupas wrote: > >> If it behaves as the Mac OS CFAttributedString, cast it into an >> NSAttributedString and use an archiver. > > Is NSAttributedString a public type in 3.2? > Look like it is. NSAttribut

Re: CFAttributedString and NSDATA

2010-06-03 Thread Kyle Sluder
On Jun 3, 2010, at 4:24 AM, Jean-Daniel Dupas wrote: If it behaves as the Mac OS CFAttributedString, cast it into an NSAttributedString and use an archiver. Is NSAttributedString a public type in 3.2? Check the Omni text editor source on Github and see if we have code to serialize attri

va_list and unanticipated format specifiers

2010-06-03 Thread jonat...@mugginsoft.com
One of my logging methods uses a variable argument list and is accessed via a macro #define MLog(level,s,...) [[MLog sharedController] withLevel:level sourceFile:__FILE__ lineNumber:__LINE__ format:(s),## __VA_ARGS__] The method implementation retrieves the va_list and instantiates an NSString

Re: CFAttributedString and NSDATA

2010-06-03 Thread Jean-Daniel Dupas
Le 3 juin 2010 à 12:14, Chaitanya Pandit a écrit : > It's really funny that the 3.2 SDk has incorporated the use of > CFAttributedStrings, but its really funny theres no way to convert it to > NSData and back. > Does anyone have any idea about how to persist a CFAttributedString by > convertin

CFAttributedString and NSDATA

2010-06-03 Thread Chaitanya Pandit
It's really funny that the 3.2 SDk has incorporated the use of CFAttributedStrings, but its really funny theres no way to convert it to NSData and back. Does anyone have any idea about how to persist a CFAttributedString by converting it to NSData on 3.2? I'd appreciate any help. Thanks, Chait