Re: borderless button - hilight on click

2010-10-31 Thread Mitchell Livingston
That's why I have it set as a template and let the OS do the coloring. That way 
any color settings, changes in design between OS releases, etc. are the 
operating system's responsibility. Makes my life a lot easier and keeps the app 
consistent with other apps.

Cheers,
Mitch

On Oct 31, 2010, at 12:44 PM, Laurent Daudelin wrote:

> Be aware that there are 2 appearance themes in OS X, blue and graphite and 
> that the highlight color is also user selectable. Many apps make the 
> assumption that everybody is using the blue theme but it's not always the 
> case. Just a thought...
> 
> -Laurent.
> -- 
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin   
> http://www.nemesys-soft.com/
> Logiciels Nemesys Software
> laur...@nemesys-soft.com
> 
> On Oct 31, 2010, at 11:49, Mitchell Livingston wrote:
> 
>> I'm trying to mimic iTunes 10 and iPhoto '11's buttons on the bottom of the 
>> window, where it's a simple black image that can be toggled to an on state 
>> (blue). I have that working using a template image (it's just black and is 
>> automatically made blue when enabled), but when I click and hold the button 
>> it remains the current color. I would like it to turn a darker blue until 
>> released.
>> 
>> I have the button set as toggle type and textured bezel. Are there any 
>> changes I should make to get this working?
>> 
>> Thanks,
>> Mitch
> 

___

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 arch...@mail-archive.com


borderless button - hilight on click

2010-10-31 Thread Mitchell Livingston
I'm trying to mimic iTunes 10 and iPhoto '11's buttons on the bottom of the 
window, where it's a simple black image that can be toggled to an on state 
(blue). I have that working using a template image (it's just black and is 
automatically made blue when enabled), but when I click and hold the button it 
remains the current color. I would like it to turn a darker blue until released.

I have the button set as toggle type and textured bezel. Are there any changes 
I should make to get this working?

Thanks,
Mitch
___

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 arch...@mail-archive.com


question on speed and memory display on 10.6.

2010-09-12 Thread Mitchell Livingston
In 10.6 the display of disk space was changed from base-2 to base-10, as 
discussed in http://support.apple.com/kb/TS2419. For download rates (KB/sec), 
is that also in base-10 on 10.6? Also, in what base is the display of the 
amount of system memory?
___

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 arch...@mail-archive.com


close sheet with app hidden

2010-02-04 Thread Mitchell Livingston
I have a sheet that shows a progress bar for a file being downloaded. It closes 
automatically, with no problems. The issue is, if I hide the app the sheet does 
not disappear - instead, it stays open. This only happens when the app is 
hidden.

The code to close it is:

[NSApp endSheet: fStatusWindow];
[fStatusWindow orderOut: self];


I have tried adding [NSApp abortModal] and [NSApp stopModal] without any luck. 
Is there anything I can do?
___

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 arch...@mail-archive.com


Re: using QLPreviewPanel and supporting 10.5

2009-10-10 Thread Mitchell Livingston
 
On Saturday, October 10, 2009, at 12:18PM, "Kyle Sluder" 
 wrote:
>On Oct 10, 2009, at 5:40 AM, Mitchell Livingston   
>wrote:
>
>> How would that work with storing the instance variables?
>
>1) Why are you concerned with QLPreviewPanel's instance variables?
>

It won't run on 10.5 with this variable, and NSClassFromString won't work for 
that. I am storing a variable as done in Apple's example program 
QuickLookDownloader.

>2) The API is different between 10.5 and 10.6; you can't just drop in  
>NSClassFromString and continue on as normal.
>

I do not want to use quick look on 10.5, only 10.6.

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

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


Re: using QLPreviewPanel and supporting 10.5

2009-10-10 Thread Mitchell Livingston
How would that work with storing the instance variables?

Thanks,
Mitch
 
On Saturday, October 10, 2009, at 05:30AM, "Julien Jalon"  
wrote:
>
___

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 arch...@mail-archive.com


using QLPreviewPanel and supporting 10.5

2009-10-09 Thread Mitchell Livingston

Hello,

I want to support Quick Look in my application, but still support  
10.5. I'm using the 10.6 SDK and 10.5 deployment target. Launching on  
10.5 gives:


Dyld Error Message:
Symbol not found: _OBJC_CLASS_$_QLPreviewPanel
Referenced from: /Users/robertvehse/Desktop/Transmission.app/Contents/ 
MacOS/Transmission
xpected in: /System/Library/Frameworks/Quartz.framework/Versions/A/ 
Quartz


Obviously this is from using objects only available in 10.6. I won't  
be using the QL classes on 10.5. Is there a way around this?


Thanks,
Mitch
___

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 arch...@mail-archive.com


favicon of address

2009-09-20 Thread Mitchell Livingston

Hey,

I want to get the favicon of a URL address, but don't actually need  
any of the page's content. Is there an efficient way to do this  
besides hammering the site for this info? This image isn't critical,  
so something that works "most of the time" should be fine.


Thanks,
Mitch
___

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 arch...@mail-archive.com


Re: NSDivideRect and 64-bit

2009-09-06 Thread Mitchell Livingston
Under NSRectEdge in the documentation.

For example:

"NSMinXEdge
Specifies the left edge of the input rectangle.

The input rectangle is divided vertically, and the leftmost rectangle with the 
width of amount is placed in slice.

Available in Mac OS X v10.0 and later.

Not available to 64-bit applications.

Declared in NSGeometry.h."

Cheers,
Mitch

On Sunday, September 06, 2009, at 03:14PM, "Jens Alfke"  
wrote:
>
>On Sep 6, 2009, at 12:01 PM, Mitchell Livingston wrote:
>
>> I want to use NSDivideRect in my app, but the documentation for  
>> NSRectEdge (one of the parameter types) says "Not available to 64- 
>> bit applications.". Can I not use this function anymore? Is there an  
>> appropriate replacement for the function?
>
>Where does it say that? In both the 10.5 and 10.6 NSGeometry.h,  
>NSDivideRect and NSRectEdge are available.
>
>—Jens
>
___

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 arch...@mail-archive.com


NSDivideRect and 64-bit

2009-09-06 Thread Mitchell Livingston

Hey,

I want to use NSDivideRect in my app, but the documentation for  
NSRectEdge (one of the parameter types) says "Not available to 64-bit  
applications.". Can I not use this function anymore? Is there an  
appropriate replacement for the function?


Thanks,
Mitch
___

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 arch...@mail-archive.com


Re: Applying color to template images

2009-08-30 Thread Mitchell Livingston

That does the trick. Thanks!

On Aug 29, 2009, at 11:35 PM, Brandon Walkin wrote:


I have a category on NSImage that should do what you need:

- (NSImage *)tintedImageWithColor:(NSColor *)tint
{
NSSize size = [self size];
NSRect imageBounds = NSMakeRect(0, 0, size.width, size.height);

NSImage *copiedImage = [self copy];

[copiedImage lockFocus];

[tint set];
NSRectFillUsingOperation(imageBounds, NSCompositeSourceAtop);

[copiedImage unlockFocus];

return [copiedImage autorelease];
}

Brandon

On 2009-08-29, at 2:36 PM, Mitchell Livingston wrote:


Hello,

I want to use NSImage's built-in template images, but want to  
replace the black color with different colors, such as gray or  
orange. I feel like I'm missing something obvious, but I can't seem  
to figure this out. Could someone point me in the right direction.


Thanks,
Mitch
___

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/bwalkin%40gmail.com

This email sent to bwal...@gmail.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Applying color to template images

2009-08-29 Thread Mitchell Livingston

Hello,

I want to use NSImage's built-in template images, but want to replace  
the black color with different colors, such as gray or orange. I feel  
like I'm missing something obvious, but I can't seem to figure this  
out. Could someone point me in the right direction.


Thanks,
Mitch
___

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 arch...@mail-archive.com


Re: UTI not identified correctly for some users.

2009-06-17 Thread Mitchell Livingston


On Jun 16, 2009, at 6:20 PM, Sean McBride wrote:


On 6/15/09 12:36 AM, Mitchell Livingston said:

Thanks for that. I am dealing with .torrent extensions. I have the  
UTI
defined as "org.bittorrent.torrent". Both apps are using the same  
file

format, so there shouldn't be a problem with a single UTI.


OK, you're in a not-so-bad situation then.  The best you can do is
contact as many authors of torrent apps as you can, and agree upon a
common declaration.  Or maybe there already is one, did you search?


None of the apps I found have it set up in the Info.plist. From users  
with the problem I've discovered they have it set up as  
"com.bittorrent.torrent". Perhaps I should just change it to that, but  
that's not future-proof enough incase another program decides to  
define a different UTI for it. No matter who I contact, if one app  
sets it to something different, this functionally breaks. Since the  
torrent file format is standard, Apple declaring it would be by far  
the safest thing, and pretty much the only thing that would make me  
remove the extension check (instead of just checking UTI).





It would be
great if Apple included this in the OS, although is there a chance
considering their stance on torrent files? It is a legitimate file
format, regardless.


I wasn't aware they had a stance on this format.  Do you have a
reference?  I think you should file a bug regardless.


I have reported the bug already. I assume they have a stance because  
an iPhone front-end for torrents was rejected, and they won't place  
our app on the Mac OS X software download page.





I'm not sure how to use the rdar links - am I missing something
obvious? I will file a bug on Apple Bug Reporter.


You can't see my bugs, but you can reference them in your own bugs.



Will do.


--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___

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 arch...@mail-archive.com


Re: UTI not identified correctly for some users.

2009-06-14 Thread Mitchell Livingston

Hey Sean,

Thanks for that. I am dealing with .torrent extensions. I have the UTI  
defined as "org.bittorrent.torrent". Both apps are using the same file  
format, so there shouldn't be a problem with a single UTI. It would be  
great if Apple included this in the OS, although is there a chance  
considering their stance on torrent files? It is a legitimate file  
format, regardless.


I'm not sure how to use the rdar links - am I missing something  
obvious? I will file a bug on Apple Bug Reporter.


Cheers,
Mitch

On Jun 12, 2009, at 4:42 PM, Sean McBride wrote:


Mitchell,

Welcome to the wonderful world of file extensions! :)

A file has one and only one UTI.  The system (Launch Services aka LS)
decides on a UTI based on the file's extension and HFS type (and MIME
type?).  So if two apps declare different UTIs that refer to the same
extension, LS will pick one of them.  This is happening to you.

What extension are you dealing with?  Is it actually the same file
format that both apps are using?  If so, confer with the other  
developer

and make sure you both have the same UTI declaration.  Then file a bug
asking Apple to include it in the OS.  If it's a different format but
both have conflicting extensions, you are mostly out of luck.  HFS  
types

won't help either because LS always prioritizes extensions, even when
they conflict.

Do file bug(s); dupes increase priority.  You may reference mine:
 .

Cheers,

Sean


On 6/11/09 7:19 PM, Mitchell Livingston said:


As a followup to this, it appears that the users having problems do
have a different app set for this file type, so it's not recognizing
my UTI name for NSOpenPanel's setRequiredType: and NSWorkspace's
typeOfFile:... Is there a way around this besides specifying the file
extension explicitly? Should this be reported to Apple?

Cheers,
Mitch

On Jun 11, 2009, at 6:46 PM, Mitchell Livingston wrote:


I have created an UTI in my app's Info.plist. For open panels,
adding files, etc. I use this (or check [[[NSWorkspace
sharedWorkspace] typeOfFile: file error: NULL]
isEqualToString: ...]). This works fine for me, but this is failing
for the proper file type for some users. Perhaps the system doesn't
properly register the UTI for these users, or perhaps another app
registers a different UTI name for the same file extension. Is there
something I can do to get around this, besides not using UTI's?

Cheers,
Mitch


___

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/sean%40rogue-research.com

This email sent to s...@rogue-research.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: UTI not identified correctly for some users.

2009-06-11 Thread Mitchell Livingston
As a followup to this, it appears that the users having problems do  
have a different app set for this file type, so it's not recognizing  
my UTI name for NSOpenPanel's setRequiredType: and NSWorkspace's  
typeOfFile:... Is there a way around this besides specifying the file  
extension explicitly? Should this be reported to Apple?


Cheers,
Mitch

On Jun 11, 2009, at 6:46 PM, Mitchell Livingston wrote:

I have created an UTI in my app's Info.plist. For open panels,  
adding files, etc. I use this (or check [[[NSWorkspace  
sharedWorkspace] typeOfFile: file error: NULL]  
isEqualToString: ...]). This works fine for me, but this is failing  
for the proper file type for some users. Perhaps the system doesn't  
properly register the UTI for these users, or perhaps another app  
registers a different UTI name for the same file extension. Is there  
something I can do to get around this, besides not using UTI's?


Cheers,
Mitch


___

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 arch...@mail-archive.com


UTI not identified correctly for some users.

2009-06-11 Thread Mitchell Livingston
I have created an UTI in my app's Info.plist. For open panels, adding  
files, etc. I use this (or check [[[NSWorkspace sharedWorkspace]  
typeOfFile: file error: NULL] isEqualToString: ...]). This works fine  
for me, but this is failing for the proper file type for some users.  
Perhaps the system doesn't properly register the UTI for these users,  
or perhaps another app registers a different UTI name for the same  
file extension. Is there something I can do to get around this,  
besides not using UTI's?


Cheers,
Mitch
___

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 arch...@mail-archive.com


svnversion from Run Script in Xcode

2009-06-02 Thread Mitchell Livingston
In Xcode I have a Run Script phase using the /bin/sh shell. The script  
consists of: "sh anotherscript.sh". In this other script I can  
svnversion. This works in terminal, but fails in Xcode. I managed to  
get it to work by adding, before calling anotherscript.sh: "export  
PATH=$PATH:/opt/subversion/bin:/opt/local/bin:/usr/local/bin". The  
thing is, this doesn't seem all that safe and doesn't factor in the  
svnversion could be somewhere else. Is there a better way?


Thanks,
Mitch
___

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 arch...@mail-archive.com


RE: Subject: detect option key on startup

2009-05-09 Thread Mitchell Livingston
In what method would that need to be in to get the key on startup? I tried 
without luck in init and awakeFromNib.
 
On Saturday, May 09, 2009, at 06:48PM, "Kirk Kerekes"  
wrote:
>   
>How About: ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
>
>
>
>
___

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 arch...@mail-archive.com


detect option key on startup

2009-05-09 Thread Mitchell Livingston

Hello,

I want to be able to detect if the option key is being held down on  
launch. I found reference to GetCurrentKeyModifiers(), but that seems  
to be depreciated/not recommended.


Thanks,
Mitch
___

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 arch...@mail-archive.com


Smart Folders and NSOpenPanel

2009-01-16 Thread Mitchell Livingston
I use an NSOpenPanel to allow users to choose a folder to be used  
later. Is there a way so that they can only chose folders, as opposed  
to smart folders?

___

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 arch...@mail-archive.com


Re: UTExportedTypeDeclarations vs CFBundleDocumentTypes

2009-01-12 Thread Mitchell Livingston
Yup.
 
On Monday, January 12, 2009, at 03:16AM, "Kyle Sluder"  
wrote:
>On Sun, Jan 11, 2009 at 7:49 PM, Mitchell Livingston  
>wrote:
>> Thanks for the link. I removed CFBundleTypeExtensions, but now the file icon
>> won't show up for any of that file type (for example, I associate the file
>> to another app, the icon changes for that app; I then re-associate the file
>> with my app but the icon doesn't change back. When I re-add
>> CFBundleTypeExtensions it works as expected. Am I doing something wrong or
>> is this a bug in the Finder?
>
>Have you added the appropriate public.filename-extension array to the
>UTTypeTagSpecification key in your UTI declaration?
>
>--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: UTExportedTypeDeclarations vs CFBundleDocumentTypes

2009-01-11 Thread Mitchell Livingston
Thanks for the link. I removed CFBundleTypeExtensions, but now the  
file icon won't show up for any of that file type (for example, I  
associate the file to another app, the icon changes for that app; I  
then re-associate the file with my app but the icon doesn't change  
back. When I re-add CFBundleTypeExtensions it works as expected. Am I  
doing something wrong or is this a bug in the Finder?


Cheers,
Mitch

On Jan 11, 2009, at 7:38 PM, Kyle Sluder wrote:

On Sun, Jan 11, 2009 at 5:27 PM, Mitchell Livingston > wrote:

My app is 10.5 only. I have a UTI set up in Info.plist with
UTExportedTypeDeclarations. Do I still need CFBundleDocumentTypes,  
since it

seems pretty redundant?


Yes, it's the only way to actually associate the document type with
your app.  Your app bundle can export any type it wants; that doesn't
mean that it can open those types.

See the CFBundleDocumentTypes documentation for the keys you actually
need to provide (the ones that aren't marked as deprecated in
Leopard): http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html#/ 
/apple_ref/doc/uid/20001431-101685


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

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


UTExportedTypeDeclarations vs CFBundleDocumentTypes

2009-01-11 Thread Mitchell Livingston

I've searched this list and google and haven't found a solid answer.

My app is 10.5 only. I have a UTI set up in Info.plist with  
UTExportedTypeDeclarations. Do I still need CFBundleDocumentTypes,  
since it seems pretty redundant?


Cheers,
Mitch
___

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 arch...@mail-archive.com


Re: notification when app is moved

2008-07-17 Thread Mitchell Livingston
I'm actually using UKKQueue in the project (it's a great utility - thanks a 
lot!).

In some small tests I have seen that other apps break when moved while opened 
(testing with TextEdit), so perhaps I should just assume it won't move. I guess 
this is a moot issue then.
 
On Thursday, July 17, 2008, at 05:03PM, "Uli Kusterer" <[EMAIL PROTECTED]> 
wrote:
>On 17.07.2008, at 12:50, Mitchell Livingston wrote:
>> I need to pass the location to a c library and reset the location in  
>> this library when the application is moved, so I need a way to know  
>> when the app is moved.
>
>> How can I call it again if I don't know it moved? Waiting until it  
>> fails is a bit too late in the process. Sure, chances are the app  
>> won't move, but why should it ever fail? Storing it in the library  
>> folder is not a real good option.
>
>
>As someone else said, use a kqueue to detect the app move. I wrote a  
>nice little wrapper class around kqueues for uses like this, find it at
>
>   <http://www.zathras.de/angelweb/sourcecode.htm#UKKQueue>
>
>Watch your application bundle folder with that, and when it notifies  
>you that you've been moved, you can call into your library, passing  
>whatever NSBundle pathForResource: returns then.
>
>Just be aware that Cocoa itself is kinda stupid about coping with the  
>current app's bundle being moved (different from Carbon, funnily  
>enough). So, while your library might still access the correct  
>folders, the rest of your app may still go down in flames. Come to  
>think of it, I'm not even sure whether NSBundle doesn't cache its  
>location, so you might get the old path back. But I guess since the  
>kqueue tells you where it got moved, you could deduce the path anyway.
>
>Cheers,
>-- Uli Kusterer
>"The Witnesses of TeachText are everywhere..."
>http://www.zathras.de
>
>
>
>
>
>
>
___

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: notification when app is moved

2008-07-17 Thread Mitchell Livingston
How can I call it again if I don't know it moved? Waiting until it fails is a 
bit too late in the process. Sure, chances are the app won't move, but why 
should it ever fail? Storing it in the library folder is not a real good option.
 
On Thursday, July 17, 2008, at 12:09AM, "Omar Qazi" <[EMAIL PROTECTED]> wrote:
>
>On Jul 16, 2008, at 8:28 PM, Mitchell Livingston wrote:
>
>> But if the app is moved, the string that was previously returned  
>> from the call is no longer valid.
>
>So... call it again. You can do this whenever the user starts your  
>application, or when the call returns an error saying that it can't  
>find the file.
>
>You might be worrying about this too much. How often will a user move  
>your application? If these files don't change you might even consider  
>copying them to the user's library folder the first time your app is  
>run.
>
>Omar Qazi
>Hello, Galaxy!
>1.310.294.1593
>
>
>
___

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: notification when app is moved

2008-07-16 Thread Mitchell Livingston
I need the full path, yes. I know I can get it using NSBundle. But if the app 
is moved, the string that was previously returned from the call is no longer 
valid. I need to pass the location to a c library and reset the location in 
this library when the application is 
movedhttp://www.me.com/my/mail/en/images/spacer.gif, so I need a way to know 
when the app is moved.
 
On Wednesday, July 16, 2008, at 10:34PM, "Omar Qazi" <[EMAIL PROTECTED]> wrote:
>
>On Jul 16, 2008, at 6:08 PM, Mitchell Livingston wrote:
>
>> I have code that must know where a folder inside the Resources  
>> folder of the application is. This location must be updated whenever  
>> the app is moved to another location. Is there some sort of callback  
>> I can register to receive for this?
>
>Huh? Where a folder inside the resources folder of an application is?  
>I'm going to assume you mean the full path of something inside of an  
>Application bundle.
>
>You don't need to get a notification when the app is moved. Instead, I  
>would recommend using NSBundle's pathForResource: ofType: in  
>combination with NSWorkspace's fullPathForApplication:. So whenever  
>you needed the path of that folder, you could do something like this:
>
>
>NSString *pathToApp = [[NSWorkspace  
>sharedWorkspace]fullPathForApplication:@"Whatever Application"];
>NSBundle *appBundle = [[NSBundle alloc]initWithPath:pathToApp];
>NSString *resourcePath = [appBundle  
>pathForResource:@"WhateverResource" ofType:@"Whatever Type"];
>
>Omar Qazi
>Hello, Galaxy!
>1.310.294.1593
>
>
>
___

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]


notification when app is moved

2008-07-16 Thread Mitchell Livingston

Hello,

I have code that must know where a folder inside the Resources folder  
of the application is. This location must be updated whenever the app  
is moved to another location. Is there some sort of callback I can  
register to receive for this?


Thanks,
Mitchell Livingston
___

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]


mouse down selectively not select the cell

2008-07-01 Thread Mitchell Livingston

Hello,

I have an outline view that consists of custom-drawn cells, where I  
have images representing buttons. I want a left click on the buttons  
to not change the selected cells but still perform mouse tracking (I  
use hitTestForEvent:inRect:ofView: to determine if it should track); a  
mouse down anywhere else would not perform mouse tracking and would  
change the selection. I went through all the possible return values  
for the hit test method, but the only one that doesn't select the cell  
(NSCellHitNone) also causes tracking to not perform. Is there a  
straightforward way to do this?


Thanks,
Mitchell Livingston
___

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]


autoresizing window and scroll bars

2008-05-22 Thread Mitchell Livingston

Hello,

I have a table view nested in a window. I resize the window with  
animation, and when resizing I hide the scroll bars. The problem is  
that they don't seem to reappear on finish. My code is as follows:


NSScrollView * scrollView = [fTableView enclosingScrollView];

[scrollView setHasVerticalScroller: NO];
[fWindow setFrame: [self sizedWindowFrame] display: YES animate: YES];
[scrollView setHasVerticalScroller: YES];

I also tried putting the [scrollView setHasVerticalScroller: YES] in  
the table view's viewDidEndLiveResize method with no luck. Anyone have  
any advice on how to get the desired behavior?


Thanks,
Mitchell Livingston
___

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]


crash when resizing window

2008-05-12 Thread Mitchell Livingston

Hello,

I have code where i manually reorder an outline view, and when it is  
reordered it automatically resizes to fit all the items. A crash  
consistently happens when I move a subitem from one group to another  
(in other words, when I drag a row so that it is originally in one  
expandable row and is put in another). I have spent a day trying to  
track this down with no luck, and it works fine when I rearrange rows  
in their own subgroup (as in they stay under the same expandable row).


Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0020
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib 0x95e806e8 objc_msgSend + 24
1   com.apple.AppKit  	0x9020d58b -[NSOutlineView  
_dataSourceIsItemExpandable:] + 125
2   com.apple.AppKit  	0x901b605f -[NSOutlineView  
_drawDropHighlight] + 138
3   com.apple.AppKit  	0x901b4f9b -[NSTableView drawRect:]  
+ 4552
4   com.apple.AppKit  	0x90244bbe -[NSView  
_drawRect:clip:] + 3765
5   com.apple.AppKit  	0x90243751 -[NSView  
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1050
6   com.apple.AppKit  	0x90243aa5 -[NSView  
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1902
7   com.apple.AppKit  	0x90243aa5 -[NSView  
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1902
8   com.apple.AppKit  	0x90243aa5 -[NSView  
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1902
9   com.apple.AppKit  	0x90243aa5 -[NSView  
_recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1902
10  com.apple.AppKit  	0x902420b4 -[NSView  
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView 
:] + 759
11  com.apple.AppKit  	0x902419f7 -[NSThemeFrame  
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView 
:] + 306
12  com.apple.AppKit  	0x9023e52d -[NSView  
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] +  
3090
13  com.apple.AppKit  	0x9017ef09 -[NSView  
displayIfNeeded] + 933
14  com.apple.AppKit  	0x9023162f -[NSWindow  
_setFrameCommon:display:stashSize:] + 2031
15  com.apple.AppKit  	0x90230e3a -[NSWindow  
setFrame:display:] + 78
16  com.apple.AppKit  	0x902834a5  
_NSMoveHelperTimerCallBack + 1330
17  com.apple.CoreFoundation  	0x91e24b5e CFRunLoopRunSpecific +  
4494

18  com.apple.CoreFoundation0x91e24d18 CFRunLoopRunInMode + 88
19  com.apple.AppKit  	0x903dfcdf -[NSMoveHelper  
_doAnimation] + 889
20  com.apple.AppKit  	0x9045ec93 -[NSMoveHelper  
_resizeWindow:toFrame:display:] + 407
21  com.apple.AppKit  	0x9026bf6c -[NSWindow  
setFrame:display:animate:] + 1038
22  org.m0k.transmission  	0x00016ef6 -[Controller  
setWindowSizeToFit] + 293 (Controller.m:3874)
23  org.m0k.transmission  	0xcd95 -[Controller  
applyFilter:] + 3082 (Controller.m:2041)
24  org.m0k.transmission  	0x00010448 -[Controller  
outlineView:acceptDrop:item:childIndex:] + 1253 (Controller.m:2696)
25  com.apple.AppKit  	0x90682d90 -[NSOutlineView  
performDragOperation:] + 242
26  com.apple.AppKit  	0x9044ff15 NSCoreDragReceiveProc +  
1411

27  com.apple.HIServices0x909c155c DoDropMessage + 97
28  com.apple.HIServices0x909c14d2 SendDropMessage + 41
29  com.apple.HIServices0x909be83a DragInApplication + 492
30  com.apple.HIServices  	0x909bd2de CoreDragStartDragging +  
539
31  com.apple.AppKit  	0x9044dd9d -[NSCoreDragManager  
_dragUntilMouseUp:accepted:] + 597
32  com.apple.AppKit  	0x9044ccc2 -[NSCoreDragManager  
dragImage:fromWindow:at:offset:event:pasteboard:source:slideBack:] +  
1452
33  com.apple.AppKit  	0x9044c70c -[NSWindow(NSDrag)  
dragImage:at:offset:event:pasteboard:source:slideBack:] + 127
34  com.apple.AppKit  	0x90682822 -[NSOutlineView  
dragImage:at:offset:event:pasteboard:source:slideBack:] + 195
35  com.apple.AppKit  	0x9044c354 -[NSTableView  
_doImageDragUsingRowsWithIndexes:event:pasteboard:source:slideBack:] +  
762
36  com.apple.AppKit  	0x90294390 -[NSTableView  
_performDragFromMouseDown:] + 718
37  com.apple.AppKit  	0x902922ea -[NSTableView  
mouseDown:] + 741
38  com.apple.AppKit  	0x902a3edf -[NSOutlineView  
mouseDown:] + 611
39  org.m0k.transmission  	0x0001e278 -[TorrentTableView  
mouseDown:] + 515 (TorrentTableView.m:399)
40  com.apple.AppKit  	0x9024aac3 -[NSWindow sendEvent:] +  
5381
41  com.apple.AppKit  	0x90217714 -[NSApplication  
sendEvent:] + 2780

42  com.apple.AppKit0x901750f9 -[NSApplication run] + 847
43  com.apple.AppKit0x9014230a NSApplicationMain + 574
44  org.m

set space for window

2008-05-10 Thread Mitchell Livingston

Hello,

I have a window that, when closed, is not released because I want to  
save factors like layout, selected values, etc., but I want it, when  
opened, to be put in the current space since it is being "reopened". I  
cannot find a direct way to do this. Am I missing something or is  
there anything I can do to get this behavior?


Thank you,
Mitchell Livingston
___

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]


applicationWillTerminate and animations

2008-03-27 Thread Mitchell Livingston

Hello,

When my program quits, I would like to fade out all the windows using  
the animator. When I put this code in the applicationWillTerminate:  
method, however, it appears to be called but doesn't animate. How  
would I got about to get this to work?


Thank you,
Mitchell Livingston
___

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]


NSOutlineView "sliding" animation

2008-03-25 Thread Mitchell Livingston

Hello,

I want to use core animation to add a sliding effect when expanding/ 
collapsing rows in an outline view (like iChat's groups), but I can't  
figure out where to get started. I have tried using nsview's animator,  
but it doesn't seem to be compatible with this type of animation.  
Could someone point me in the right direction (perhaps a relevant  
tutorial, because my attempts at finding one have failed)?


Thank you,
Mitchell Livingston
___

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]


localizable strings file with macro

2008-03-03 Thread Mitchell Livingston

Hello,

I have C code that I want to generate a strings file for use on Mac. I  
use:


#if defined(SYS_DARWIN)
  #include 
  #define _(a) CFStringGetCStringPtr(CFCopyLocalizedStringFromTable( \
   CFSTR( a ), CFSTR("LibraryLocalizable"), "comment" ),  
kCFStringEncodingMacRoman)

#else
...

Unfortunately genstrings does not seem to compile the code before  
attempting to create the strings file. Is there some way to generate a  
string file while still considering that the code will also be run on  
other operating systems that generate localizable strings in different  
ways?


Thanks,
Mitchell Livingston
___

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]