watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Hello, I have a base object that needs to know when any of it's properties or subclasses properties have changed and set a dirty flag on itself. Is there a way to do this? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
12:27 PM, Jens Alfke wrote: On Sep 3, 2009, at 8:24 AM, Alexander Cohen wrote: I have a base object that needs to know when any of it's properties or subclasses properties have changed and set a dirty flag on itself. Is there a way to do this? No, not in general. Key-value observin

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
to set. thx AC On Sep 3, 2009, at 2:43 PM, Jens Alfke wrote: On Sep 3, 2009, at 11:32 AM, Alexander Cohen wrote: Ok, thats what i thought. But just for implementation ideas, how does CoreData know when one of it's @dynamic properties is changed? It must set some sort of flag somewhe

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
n Sep 3, 2009, at 8:24 AM, Alexander Cohen wrote: I have a base object that needs to know when any of it's properties or subclasses properties have changed and set a dirty flag on itself. Is there a way to do this? No, not in general. Key-value observing requires knowing the exact property name(s)

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
On Sep 3, 2009, at 3:44 PM, Quincey Morris wrote: On Sep 3, 2009, at 12:14, Alexander Cohen wrote: Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or

waiting for async callback in main thread

2009-10-27 Thread Alexander Cohen
Hi, I'm working with and SDK that lets me observe objects. When the state of the object changes i receive a callback. The docs for the SDK say that the main NSRunLoop needs to stay active and responsive for me to receive the callbacks. Now, i would like to be able to wait for that callbac

Re: waiting for async callback in main thread

2009-10-27 Thread Alexander Cohen
On Oct 27, 2009, at 2:04 PM, Jens Alfke wrote: On Oct 27, 2009, at 10:40 AM, Alexander Cohen wrote: Now, i would like to be able to wait for that callback on the main thread like this: [object addObserverForCallback] ... wait for callback ... continue on processing with the state of the

Re: waiting for async callback in main thread

2009-10-27 Thread Alexander Cohen
On Oct 27, 2009, at 3:42 PM, Jens Alfke wrote: On Oct 27, 2009, at 12:11 PM, Alexander Cohen wrote: 100% agree with you, and that's what i would normally do. But unfortunately, this time i must wait in the mainthread for the callback. I know it's wrong, but this time i'

Ruby Grammar for TDParseKit

2009-11-02 Thread Alexander Cohen
Hello, Has anyone created a grammar file for Ruby for use with TDParseKit. Seems like thats pretty much the best option out there ( it rocks ), but i'd rather check for a grammar file before i start a new one. thx AC ___ Cocoa-dev mailing list (

NSCoder and CGColorRef

2009-11-05 Thread Alexander Cohen
How would one go about encoding a CGColorRef into a NSCoder? thx AC ___ 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.

NSAttributedString with columns

2010-06-14 Thread Alexander Cohen
Hello, I would like to use an NSAttributed string in order to render a type of key/value 2 column display in a NSTextField. As of now, i'm using tabs between key's and value's on each line but some values need to wrap to the next line and i would like them to wrap to the start of value column a

changes to NSView's frame in its window

2010-06-23 Thread Alexander Cohen
Hello, I have a view in an NSScrollView's document view that has a small child window attached to it, meaning the window follows that view wherever it goes. But when i scroll the scrollview, not much changes for that view. So i'm wondering if there is anyway to get changes to a views "global" f

Re: changes to NSView's frame in its window

2010-06-23 Thread Alexander Cohen
Wow, nice to know. Probably not a good idea to count on it though, right? AC On Jun 23, 2010, at 3:38 PM, Michael Ash wrote: > On Wed, Jun 23, 2010 at 1:33 PM, Alexander Cohen > wrote: >> Hello, >> >> I have a view in an NSScrollView's document view that has a sm

Finding Application support folder without Cocoa or Carbon

2010-07-12 Thread Alexander Cohen
Hello, I need to find the system Application Support folder without using either Carbon or Cocoa, i can use CoreFoundation though. Is there a way to do this? thx AC___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Re: Finding Application support folder without Cocoa or Carbon

2010-07-12 Thread Alexander Cohen
Beautiful, thank you. AC On Jul 12, 2010, at 4:21 PM, Kevin Perry wrote: > You can use the C API in /usr/include/NSSystemDirectories.h. > > On Jul 12, 2010, at 1:17 PM, Alexander Cohen wrote: > >> Hello, >> >> I need to find the system Application Suppo

overriding every method of an object

2010-07-16 Thread Alexander Cohen
Hello, Is there a way for a subclass to override every method of its superclass? thx AC ___ 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-ad

inter-process locks

2011-02-19 Thread Alexander Cohen
Hello, Is there anyway to do interprocess locks using cocoa ( like a Mutex in Win32 )? The best i've found is not cocoa and uses flock but the man pages say its advisory only which is kindof scary. any help appreciated. thx AC___ Cocoa-dev mailing

Re: inter-process locks

2011-02-19 Thread Alexander Cohen
M, Michael Babin wrote: > On Feb 19, 2011, at 12:29 PM, Alexander Cohen wrote: > >> Is there anyway to do interprocess locks using cocoa ( like a Mutex in Win32 >> )? The best i've found is not cocoa and uses flock but the man pages say its >> advisory only which

scaling a transformed view

2011-04-20 Thread Alexander Cohen
Hi, I've come upon a problem i can't seem to get my head around. I have a view that has a rotation transform on it and i need to be able to pull at one of it's corners and scale the view based on the amount pulled. I also need to keep the opposite corner of the pulled corner pinned to it's loca

Julian date

2010-01-07 Thread Alexander Cohen
Hello, How should i go about creating a NSDate object from a julian date NSTimeInterval. thx AC___ 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 coco

cross-process file open notifications

2010-02-03 Thread Alexander Cohen
Is there any way in cocoa to get some sort of notifications when any process opens or closes any file? The reason i need this is because i need to watch the system and do a certain task every time a particular dylib is loaded by an application. thx AC___

Re: cross-process file open notifications

2010-02-03 Thread Alexander Cohen
> On Feb 3, 2010, at 1:50 PM, Alexander Cohen wrote: > >> Is there any way in cocoa to get some sort of notifications when any process >> opens or closes any file? > > I'm pretty sure there isn't. The rate at which those notifications were sent > would be pretty h

Re: cross-process file open notifications

2010-02-03 Thread Alexander Cohen
Unfortunately, the files i need to watch could be anywhere on the system. So i would need something more like a filename only watch and not a complete path. AC On Feb 3, 2010, at 6:15 PM, Jerry Krinock wrote: > > On 2010 Feb 03, at 14:28, Jens Alfke wrote: > >> FSEvents notifies you when a pa

Not responding in activity viewer

2010-03-02 Thread Alexander Cohen
Hello, I've got a very simple launch Agent that always shows up as not-responding in the activity monitor on 10.4 and 10.5 This is issue does not happen on 10.6. The app is very simple and does not do much. It has no UI but does link against Carbon since it uses GetNextProcess. It has 2 threads

Resizing and NSImage to a new NSImage but keeping all metadata

2010-08-30 Thread Alexander Cohen
Hi, I need to take an NSImage, scale it down a bit while drawing it into an new NSImage and all along keep all the metadata associated with the original image ( such as the color profile, etc, ... ). Are there any example out there that show how to do this. I've tried creating a new NSImage of

NSView alphaValue animation on 10.5

2010-09-08 Thread Alexander Cohen
Hi, I've got a lot of code that depends on 10.6's use of NSView's animator and setAlphaValue for showing and hiding animations. Now, i need to bring this to 10.5. On 10.5, to animate the alphaValue, i learnt that the NSView needs to be backed by a layer. I tried doing that and it created mayhem

CFSockets callbacks not firing when menus are being tracked in cocoa app

2010-09-20 Thread Alexander Cohen
Hi, I have a cocoa app that uses a library which uses CFSockets. Those sockets run loop sources are added to all known run loop modes ( common, default, event tracking and modal ). I would expect that the socket callbacks would fire during menu tracking but they dont. Is this a know issues, by

Framework Major versions

2010-10-18 Thread Alexander Cohen
Hello, I'm about to make a change in the Major version of a framework ( new version will be B ). I've read through the docs and all but i'm not sure i understand how to set it up so i keep version A in my build but also build the new version B. Has anyone done this and what should i do? Should

Re: Framework Major versions

2010-10-18 Thread Alexander Cohen
to rev the major version. AC On Oct 18, 2010, at 8:12 PM, Nick Zitzmann wrote: > > On Oct 18, 2010, at 4:50 PM, Alexander Cohen wrote: > >> I'm about to make a change in the Major version of a framework ( new version >> will be B ). I've read through the docs and

Choosing a correct font size when resizing

2010-10-26 Thread Alexander Cohen
Hi, I have a specific layout that has known font sizes for certain page dimensions. I need to take that layout and resize it to fit it in multiple different places in my app. I can't just apply that resize ratio to the fonts, it just does not work. Is there a known way in cocoa to figure out th

Re: Choosing a correct font size when resizing

2010-10-26 Thread Alexander Cohen
Thats an interesting take, let me try that. thx AC On Oct 26, 2010, at 11:07 AM, Ross Carter wrote: > On Oct 26, 2010, at 10:29 AM, Alexander Cohen wrote: > >> I have a specific layout that has known font sizes for certain page >> dimensions. I need to take that layout an

bouncing an NSScrollView like UIScrollView

2010-11-06 Thread Alexander Cohen
Has anyone tried getting the NSScrollView to bounce around when it hits the content edges just like the UIScrollView does? Is there any open source code out there that might do this or at least point me in the right direction? thx AC___ Cocoa-dev mai

Re: bouncing an NSScrollView like UIScrollView

2010-11-06 Thread Alexander Cohen
On Nov 6, 2010, at 7:02 PM, Kyle Sluder wrote: > On Nov 6, 2010, at 3:41 PM, Alexander Cohen wrote: > >> Has anyone tried getting the NSScrollView to bounce around when it hits the >> content edges just like the UIScrollView does? Is there any open source code >> out

localizing a cmd line app

2011-01-26 Thread Alexander Cohen
Does anyone have any pointers on localizing a cmd line app? Like how can i have different Localizable.strings for different languages in the cmd line app? I know i could use a bundle specifically for this but that seems like a bit too much. thx AC___

Re: Cover Flow in Cocoa?

2008-05-28 Thread Alexander Cohen
On May 28, 2008, at 11:08 AM, Jens Alfke wrote: On 28 May '08, at 1:04 AM, Steve Harrison wrote: On another thread on the Apple Mailing Lists, Alexander Cohen said that there is an API in Leopard for CoverFlow (see archived post here: "http://www.cocoabuilder.com/archive/mes

changing locale

2008-06-10 Thread Alexander Cohen
Is there a way to change the locale from cocoa as if i was to go into System Preferences and change the language then the format? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: changing locale

2008-06-10 Thread Alexander Cohen
2008, at 8:05 AM, Alexander Cohen wrote: Is there a way to change the locale from cocoa as if i was to go into System Preferences and change the language then the format? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: changing locale

2008-06-10 Thread Alexander Cohen
On Jun 10, 2008, at 8:50 PM, Douglas Davidson wrote: On Jun 10, 2008, at 5:42 PM, Alexander Cohen wrote: Thats what i though but here is my problem, and i'm sure im not the only who has it. I am currently working on localizing apps for mulitple languages. I would like to have an eas

MobileMe upload file to iDisk

2008-07-16 Thread Alexander Cohen
Is there an API that can be used to transfer files to a MobileMe iDisk? thx AC ___ 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)l

Re: MobileMe upload file to iDisk

2008-07-16 Thread Alexander Cohen
Does it support WebDAV? AC On Jul 16, 2008, at 5:21 PM, glenn andreas wrote: On Jul 16, 2008, at 4:16 PM, Alexander Cohen wrote: Is there an API that can be used to transfer files to a MobileMe iDisk? thx There use to be - the "dot Mac" SDK provided that sort of thing.

Re: MobileMe upload file to iDisk

2008-07-16 Thread Alexander Cohen
On Jul 16, 2008, at 6:08 PM, Nick Zitzmann wrote: On Jul 16, 2008, at 3:16 PM, Alexander Cohen wrote: Is there an API that can be used to transfer files to a MobileMe iDisk? Yes, but as others have mentioned, the DotMacKit framework hasn't been updated in years, is obsolete,

sending email with attachement from cocoa

2008-09-26 Thread Alexander Cohen
Is there a way to use a url request to open mail with all its fields completed but most importantly, contain an image attachement? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

NSString from wstring

2008-03-04 Thread Alexander Cohen
Hi, Whats the best way to get an NSString from a wstring? thanks AC ___ 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

Re: NSString from wstring

2008-03-04 Thread Alexander Cohen
thx, works like a charm. AC On 4-Mar-08, at 12:49 PM, [EMAIL PROTECTED] wrote: On 4 Mar 2008, at 18:43, Alexander Cohen wrote: Hi, Whats the best way to get an NSString from a wstring? This is what I do: @interface NSString (wstring_additions) +(NSString*) stringWithwstring:(const std

memory warnings

2008-03-12 Thread Alexander Cohen
Is there any way to be notified when my app is running low on memory? My app is very memory intensive and needs to have a lot of images in memory at the same time, id like to be able to clear some cache if memory gets too low. thx AC ___ Cocoa-d

Re: memory warnings

2008-03-12 Thread Alexander Cohen
th experimenting with. It might be telling you about physical RAM, not process address space, which are both interesting but have different failure modes (VM thrashing, failures in malloc). Nick Zitzmann wrote: On Mar 12, 2008, at 11:40 AM, Alexander Cohen wrote: Is there any way to be

DO problems

2008-03-18 Thread Alexander Cohen
Hi, i have a server and client communication through DO. Connections are all set up then the client send a message to the server with itself as the first argument. The server should then just reply right away to the client using the first argument as the proxy. Problem is, im getting the er

[OFF] unicode characters

2008-04-09 Thread Alexander Cohen
Sorry for the off-topic post but this is the best place to get info ( lots of smart people ). I have a string that is composed unicode characters. I want to be able to transform that string into all ascii characters by transforming all non-ascii characters into their ascii equivalent. ex:

listing users

2008-04-16 Thread Alexander Cohen
Whats the best way in cocoa to get a list of users on a machine for 10.4 and up? thx AC ___ 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-

NSString and utf16

2008-04-16 Thread Alexander Cohen
I have an NSString that contains this Unicode character: '\u00e9'. I have another app that represents the same character as 'e\u0301'. Is there any way to transform one to the other so that isEqualToString returns YES? thx AC ___ Cocoa-dev maili

Re: NSString and utf16

2008-04-16 Thread Alexander Cohen
Just noticed that by using the NOrmalize functions i can get what i need. thx AC On Apr 16, 2008, at 11:43 AM, Alexander Cohen wrote: I have an NSString that contains this Unicode character: '\u00e9'. I have another app that represents the same character as 'e\u0301'

NSCoding, objects that can

2008-12-23 Thread Alexander Cohen
Hi, i have a class that contains an NSDictionary. That dictionary is encoded in encodeWithCoder:. Once in a while, a user might put in something liek a CGColorSpaceRef or something similar and everything stops working. Is there a way to find out if bjects in the dictionary can actually be e

NSCoding, objects that can

2008-12-23 Thread Alexander Cohen
Hi, i have a class that contains an NSDictionary. That dictionary is encoded in encodeWithCoder:. Once in a while, a user might put in something liek a CGColorSpaceRef or something similar and everything stops working. Is there a way to find out if bjects in the dictionary can actually be e

NSScrollView begin/end scrolling

2009-01-06 Thread Alexander Cohen
Hi, Is there a way to get notified of when a scrollView begins and ends a scrolling session? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

NSRunLoop / CFRunLoop

2009-02-13 Thread Alexander Cohen
Hi, Not sure if this is the right place to ask since my question is about CFRunLoop, not Cocoa but CoreFoundation. If not, please direct me to the right list. I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there is a simple call for it but i'm stuck with tiger for n

Re: NSRunLoop / CFRunLoop

2009-02-13 Thread Alexander Cohen
Le 13 févr. 09 à 21:54, Alexander Cohen a écrit : Hi, Not sure if this is the right place to ask since my question is about CFRunLoop, not Cocoa but CoreFoundation. If not, please direct me to the right list. I'm looking for a way to get the main CFRunLoop on tiger. On le

window flash

2008-11-18 Thread Alexander Cohen
Hi, I have a window controller that i'm creating dynamically in the applicationDidFinishLaunching: app delegate notification. In this window controllers windowDidLoad:, i'm adding subviews to it's content view. When i create it then call showWindow: on it, the window shows up on screen wi

window flash

2008-11-18 Thread Alexander Cohen
Hi, I have a window controller that i'm creating dynamically in the applicationDidFinishLaunching: app delegate notification. In this window controllers windowDidLoad:, i'm adding subviews to it's content view. When i create it then call showWindow: on it, the window shows up on screen wi

Re: window flash

2008-11-18 Thread Alexander Cohen
You are absolutely right. thank you. AC On Nov 18, 2008, at 6:33 PM, Michael Ash wrote: On Tue, Nov 18, 2008 at 4:15 PM, Alexander Cohen <[EMAIL PROTECTED] > wrote: Hi, I have a window controller that i'm creating dynamically in the applicationDidFinishLaunching: app delegate n

display callbacks

2008-11-19 Thread Alexander Cohen
Hi, Is there a callback available when the display profile is changed by the user or programmatically? Also, is there a calllabck available when the user drags a window between different screens? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: display callbacks

2008-11-19 Thread Alexander Cohen
Excellent. I did read the docs but i guess i stopped reading before the end of the page. thx AC On Nov 19, 2008, at 10:24 AM, Etienne Guérard wrote: Did you read the documentation reference for NSWindow? NSWindowDidChangeScreenNotification Posted whenever a portion of an NSWindow object's

NSArrayController trouble

2008-11-30 Thread Alexander Cohen
Hi, Im getting the following line in the console when sending the 'removeObjectsAtArrangedObjectIndexes:' message to an NSArrayController instance. -[NSCFArray removeObjectAtIndex:]: mutating method sent to immutable object I understand what it means but i'm not sure why it's happening. I

NSArray represented in 2 different views at same time

2008-12-08 Thread Alexander Cohen
Hi, I've got a list of objects in an NSArray and i'm currently managing them with an NSArrayController and a view that is binded to it. Now i need to be able to show that same view in a new window with the same content but with possibly different selections and sort descriptors. I also ne

NSArrayController and moving around its contents.

2008-12-08 Thread Alexander Cohen
I have a custom view that pretty much shows an ordered list of items in a grid ( kindof like iPhoto ). This custom view exposes a content binding. Items in this grid can be reordered by drag n drop. Then this occurs, i have an NSIndexSet of selected indexes and a drop index where i need to

microsoft file formats in cocoa

2009-05-16 Thread Alexander Cohen
Does anyone know of any libraries that can read microsoft formats ( xls, ppt, doc, etc, ... )? I'd rther not reinent the wheel if something is already out there. thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: microsoft file formats in cocoa

2009-05-17 Thread Alexander Cohen
rs/footers, comments and lots of other things. I've tried to find a library that would do that, but failed. If you do find anything like that (or reinvent it for that matter ;) ), please, let me know as well. Timofey On May 17, 2009, at 10:37 AM, Thomas Davie wrote: Op 17 May 2009,