Re: NSTableView updating checkboxes

2009-03-22 Thread Andrew Farmer
On 21 Mar 09, at 04:04, Jo Phils wrote: I have taken some time to work on your suggestions...unfortunately I still can't figure out how to uncheck/recheck the checkboxes by clicking on them. :-( I understand what you're telling me about keeping 2 lists and ultimately I will get to the point

Re: MacRoman -> UTF8 [solved]

2009-03-22 Thread Ben Lachman
Just for the record, this was an issue with my HTTP content type settings and the charset that the input was encoded in, not any issue with NSString. ->Ben -- Ben Lachman Acacia Tree Software http://acaciatreesoftware.com email: blach...@mac.com twitter: @benlachman mobile: 740.590.0009

Memory leak when setting CALayer name

2009-03-22 Thread Gustavo Pizano
Hello, Im having a leak, (showed up by instruments), I was able to detect that its appearing when doing this: [dLayer setName:[[shipaux class]description]]; and I have 4 more layers where Im doing that procedure. After doing a drag and drop Im just removing the CALayer from the superlayer, bu

Re: Memory leak when setting CALayer name

2009-03-22 Thread Filip van der Meeren
If you create a layer with a factory method, then the layer will be released automatically by an NSAutoreleasePool. I suggest you read the rules on Memory Management for Objective-C. I think that the cause of your leak is also in the trend of not knowing the MemoryManagement rules/ not applyi

Re: Memory leak when setting CALayer name

2009-03-22 Thread Gustavo Pizano
I have been trying to follow the rules by the book, but somehow all the time there is something that applies in a different way. All the time Im thinking myself if I "own" the object, who should released, is this a copy, etc, so I can decided if its on me to release it or no. I see the

Re: How can main thread be blocked in mach_msg_trap?

2009-03-22 Thread Michael Ash
On Sat, Mar 21, 2009 at 11:54 PM, Jerry Krinock wrote: > > NSLogs tell me that, when one of my secondary threads executes a > performSelectorOnMainThread::: at a certain point, the requested method > never begins.  So I conclude that the main thread ^is^ blocked. > > But if I "Pause" the debugger

Re: MacRoman -> UTF8 [solved]

2009-03-22 Thread Michael Ash
On Sun, Mar 22, 2009 at 3:48 AM, Ben Lachman wrote: > Just for the record, this was an issue with my HTTP content type settings > and the charset that the input was encoded in, not any issue with NSString. Just a general request for the list here: could we not add "[solved]" to the topic when the

Re: asl_search abysmally slow

2009-03-22 Thread Torsten Curdt
Same here. Even been to the WWDC 2008 Labs. No dice. According to the Apple engineers the code was OK. Wondering whether the Console.app uses some private API. On Fri, Mar 20, 2009 at 17:22, Luke the Hiesterman wrote: > I fought with ASL slowness in trying to develop my app last year. That > pro

Re: MacRoman -> UTF8 [solved]

2009-03-22 Thread Uli Kusterer
On 22.03.2009, at 12:22, Michael Ash wrote: On Sun, Mar 22, 2009 at 3:48 AM, Ben Lachman wrote: Just for the record, this was an issue with my HTTP content type settings and the charset that the input was encoded in, not any issue with NSString. Just a general request for the list here: co

global UIColor

2009-03-22 Thread Harry G
I'm setting up my constants in my app, and have come across a problem. I wish to have a standard UIColor to use for all titles in my app but I get the error "error: initializer element is not constant" and for obvious reasons , but my question is: How am I 'supposed' to implement a single g

Re: global UIColor

2009-03-22 Thread Dave DeLong
While it might be considered overkill, the way I would do this is to make a UIColor category: @interface UIColor (MyColor) + (UIColor *) myColor; @end @implementation UIColor (MyColor) + (UIColor *) myColor { return [UIColor colorWithRed:0.11 green:0.11 blue:0.11 alpha:1.0]; } @end Make sur

Re: NSLevelIndicator Bindings Crash

2009-03-22 Thread Richard Somers
On Mar 21, 2009, at 3:41PM, Walker Argendeli wrote: I'm using Core Data, and I have an entity; we'll call it "Item". It has an attribute called "priority". In the xib, I have an NSLevelIndicator and NSStepper. I have a NSTableView full of "Items". Depending on which item is selected in

Re: global UIColor

2009-03-22 Thread Mike Abdullah
This is almost exactly what I'd do. But for a performance boost, amend to: + (UIColor *)myColor { static UIColor *result; if (!result) { result = [[UIColor colorWithRed:0.11 green:0.11 blue:0.11 alpha:1.0] retain]; } return result; } On 22 Mar 2009,

Extending NSCollectionView

2009-03-22 Thread Shamyl Zakariya
Hi, I'm attempting to recreate something kind of like iPhoto's mechanism for refining face autodetection, like here: http://news.cnet.com/i/bto/20090130/nicoleleeconfirm_610x381.png In my situation, I'd like to have two NSCollectionView instances. One on top, one on the bottom. The entries

Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
Hi everyone: I am wondering if there is some way to change another applications icon programmatically. The problem that I see if that every application's icon name is different and I haven't found a way to read that application's icon location or will just return a NSImage that is the icon. Tha

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Matt Neuburg
On Sat, 21 Mar 2009 12:38:11 -0500, Steve Cronin said: >Folks; > >I'm trying to get a string value back from a simple AppleScript in >Cocoa: > >NSDictionary *errorDict= nil; >NSAppleScript *appleScriptObject = [[NSAppleScript alloc] >initWithSource:theScript]; >NSAppleEventDescriptor *eventDescri

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Steve Cronin
Matt; I really take offense at your tone. I was not lying. I merely clipped out my personal details in order not to provide them to the world. The 'theScript' IS a string - constructed in ObjC differently than you show but a string nonetheless. Turns out the error was that an SDEF file had

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Adam R. Maxwell
On Mar 21, 2009, at 10:38 AM, Steve Cronin wrote: The 'theScript' is a valid script that executes flawlessly in 'Script Editor': tell application "Finder" try comment of file ("/Users/steve/" as POSIX file) on error return "Error" end

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Steve Cronin
Adam; I'm an ObjC guy -- I generally avoid the C stuff if possible - 'cause I have to support my own code. But your method seems like it will work not only as a replacement but actually a doorway to the full gamut of common metadata attributes - very nice!! I know I should lose the resi

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 12:27 PM, Pierce Freeman wrote: I am wondering if there is some way to change another applications icon programmatically. The problem that I see if that every application's icon name is different and I haven't found a way to read that application's icon location or wil

How to get events in PDE auxiliary window?

2009-03-22 Thread Alexander Shmelev
Hello, I have implemented cocoa PDE plugin. Auxiliary window appears when user clicks button on this PDE. I can interact with all controls on this auxiliary window in all applications except Adobe Acrobat Reader. When I select "Print" then open my cocoa PDE and click button then auxiliary w

how to say app using only my plug-in?

2009-03-22 Thread Carlo Gulliani
I finished project, which use Flash player plug-in. But if user has same plug-in (but old version), my application load his. I wanna that app use just my plug-ins from my folder (myapp.app/Contents/PlugIns/Flash Player.plugin) and doesn't use system's plug-in. how to do so?

Re: Programmatically Change Icon

2009-03-22 Thread Uli Kusterer
On 22.03.2009, at 17:27, Pierce Freeman wrote: The problem that I see if that every application's icon name is different and I haven't found a way to read that application's icon location or will just return a NSImage that is the icon. Sure you can retrieve NSImages for application icons.

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Kyle Sluder
On Sun, Mar 22, 2009 at 1:53 PM, Steve Cronin wrote: > I'm an ObjC guy -- I generally avoid the C stuff if possible - 'cause I have > to support my own code. You cannot reasonably expect to avoid C... there's a lot of functionality Cocoa doesn't provide. Launch Services for example. You're only

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
Well, that's what I get for typing this when I was still half asleep. I meant to simply view instead of changing the icon. Would there be any problems (legally or otherwise) with doing this? You seem to know about these issues a lot better them myself... I definitely agree with all the problems

Re: how to say app using only my plug-in?

2009-03-22 Thread Benjamin Dobson
On 22 Mar 2009, at 18:34:46, Carlo Gulliani wrote: I finished project, which use Flash player plug-in. But if user has same plug-in (but old version), my application load his. I wanna that app use just my plug-ins from my folder (myapp.app/Contents/ PlugIns/Flash Player.plugin) and doesn't

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 3:45 PM, Pierce Freeman wrote: Well, that's what I get for typing this when I was still half asleep. I meant to simply view instead of changing the icon. Heh - "... some way to change another applications icon ..." Changing has all those issues attached. Viewing on

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Heh - "... some way to change another applications icon ..." > Changing has all those issues attached. Viewing on the other hand is > easy. My point exactly. ;) >As Uli mentioned, NSWorkspace should be all you need simply to get > a copy of the icon. The bundle stuff is only necessary if

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 5:29 PM, Pierce Freeman wrote: Would NSWorkspace also work if the app was not running, or only if it is? Slightly-challenging-answer: Try it and see. Non-smarmy-answer: Yes. So would the other, more complicated approach. While it doesn't have to do with me, it'

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
Hello David, your garbage collection approach is a bit naive, but not everything is wrong, you can make a google search, it will point you good resources anyway, @implementation AppDelegate - (void)sendSharedMessage:(NSString *)msg { return [[[NSString alloc] initWithFormat:@" %@",msg] autor

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Slightly-challenging-answer: Try it and see. > >Non-smarmy-answer: Yes. So would the other, more complicated > approach. Lol, just wanted to make sure. >I would assume this as well ... there'd be a number of software > companies in hot water otherwise. Especially OS vendors like App

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
I changed my mind, when I was writting this - (void)sendSharedMessage:(NSString *)msg { NSString *print = [[[NSString alloc] initWithFormat:@" %@",msg] autorelease]; NSLog(@" %@", print); } anyway it doesn't change the background On Sun, Mar 22, 2009 at 2:47 PM, mm w wrote: > Hello Davi

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Slightly-challenging-answer: Try it and see. > >Non-smarmy-answer: Yes. So would the other, more complicated > approach. Just tried it, and it works great... Thanks! Just two questions so far: 1. How can I get different sizes of the icon, or are they just linked to the size of the outl

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 6:09 PM, Pierce Freeman wrote: Slightly-challenging-answer: Try it and see. Non-smarmy-answer: Yes. So would the other, more complicated approach. Just tried it, and it works great... Thanks! Just two questions so far: 1. How can I get different sizes of the icon,

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread David Melgar
I'm confused. Bill said that the garbage collection will correctly handle releasing these types of objects despite the circular references. Therefore it appears that no additional actions are required since I am using garbage collection. What is your approach trying to solve? I certainly do

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>I suggest some reading: > > http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classe > s/nsimage_Class/Reference/Reference.html > > http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Im > ages/Images.html > > http://developer.apple.com/document

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
Because I am like this I won't do the job for you, I will only point you directions, that's it Google "garbage collection", it's naive to think that's a "linear" tree. What Bill told you is right, and my comment is following his thought Avoiding circular refs: in 95% of cases it can be avoided,

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Jim Correia
On Mar 22, 2009, at 1:53 PM, Steve Cronin wrote: I'm an ObjC guy -- I generally avoid the C stuff if possible - 'cause I have to support my own code. Objective-C is a superset of C. Avoiding the C stuff isn't really possible - it is a core part of the language. As far as choice of API, I

Re: Programmatically Change Icon

2009-03-22 Thread I. Savant
On Mar 22, 2009, at 6:29 PM, Pierce Freeman wrote: But the odd thing is, if I set the path to a file that I know doesn't exist (ex. /Applications/ soidaoidaiodsaoidiasoadsoidoiaadiosoaidiodaoidasoidaoidasoiado iasdoidaoidadasoidiaosasidoosdiaiodsiodsa.app) it will still return some weird pag

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread Jean-Daniel Dupas
Le 22 mars 09 à 23:37, mm w a écrit : Because I am like this I won't do the job for you, I will only point you directions, that's it Google "garbage collection", it's naive to think that's a "linear" tree. What Bill told you is right, and my comment is following his thought Avoiding circu

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread Clark Cox
On Sun, Mar 22, 2009 at 3:37 PM, mm w wrote: > Because I am like this I won't do the job for you, I will only point > you directions, that's it > > Google "garbage collection", it's naive to think that's a "linear" tree. > > What Bill told you is right, and my comment is following his thought > >

Re: Programmatically Change Icon

2009-03-22 Thread Pierce Freeman
>Come to think of it, it's strange that you get an icon for a non- > existent file, but if it *does* exist, I'd always expect some sort of > icon. I've never run into this situation personally. Which specific > method are you using? There are: > > ­ iconForFile: > ­ iconForFileType: > ­ iconFo

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
On Sun, Mar 22, 2009 at 3:54 PM, Jean-Daniel Dupas wrote: > > Le 22 mars 09 à 23:37, mm w a écrit : > >> Because I am like this I won't do the job for you, I will only point >> you directions, that's it >> >> Google "garbage collection", it's naive to think that's a "linear" tree. >> >> What Bill

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
maybe in your world, anyway there are a bunch of reasons to avoid circular refs I let you discover it Cheers! On Sun, Mar 22, 2009 at 3:58 PM, Clark Cox wrote: > On Sun, Mar 22, 2009 at 3:37 PM, mm w wrote: >> Because I am like this I won't do the job for you, I will only point >> you direction

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread Clark Cox
It's not very conducive to conversation to make claims, and then refuse to back them up, and leave it at "I let you discover it". On Sun, Mar 22, 2009 at 4:19 PM, mm w wrote: > maybe in your world, anyway there are a bunch of reasons to avoid circular > refs > I let you discover it > > Cheers! >

Re: MacRoman -> UTF8 [solved]

2009-03-22 Thread Peter Duniho
On Mar 22, 2009, at 5:22 AM, Uli Kusterer wrote: On 22.03.2009, at 12:22, Michael Ash wrote: Just a general request for the list here: could we not add "[solved]" to the topic when the problem is solved? It breaks threading and causes confusion. Just stick it into the original thread. The act o

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread David Melgar
Some people do that to try and impress. I'm not impressed. No useful information. On Mar 22, 2009, at 7:22 PM, Clark Cox wrote: It's not very conducive to conversation to make claims, and then refuse to back them up, and leave it at "I let you discover it". On Sun, Mar 22, 2009 at 4:19 PM, mm

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
No but this point is on left-side of this subject, anyway, here we can see one side effect at code design-level: here we have some symptoms: - a lack of visibility - when you can be the owner : "be the owner" and control what is happening direct effect you are screwing up the garbage collection

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
On Sun, Mar 22, 2009 at 4:32 PM, David Melgar wrote: > Some people do that to try and impress. > I'm not impressed. > No useful information. > it's not my point, i don't understand your feeling here, I am not trying to impress anyone, I'm only give some points > On Mar 22, 2009, at 7:22 PM, Clar

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
ref my previous email, anyway there are other aspects and side effects due to the circular refs, and one this is a memory issue, GC is now almost clever to detect that's ObjectB reference is hold by a previous ObjectA ref to Object0 our first reference, but it wasn't true at the beginning, and I a

Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread mm w
and to close this: I will open the discussion: in a cpp program I will use a type-recasting behaviour on a circular ref ? Cheers! On Sun, Mar 22, 2009 at 5:26 PM, mm w wrote: > ref my previous email, > > anyway there are other aspects and side effects due to the circular > refs, and one this i

[moderator] Re: Explicit release when using garbage collection with circular references

2009-03-22 Thread Scott Anguish
I'm not entirely sure what the purpose of the last half of this thread has been. I do know that it isn't cocoa related, and has gone on long enough. stop this thread now. Do not start the next one. Lest more than one player be moderated. On 22-Mar-09, at 8:34 PM, mm w wrote: and to close t

Re: NSTableView updating checkboxes

2009-03-22 Thread Jo Phils
Thank you Andrew (and Graham), I think i'm finally realizing that! :-) Thank you very much. Ok I still don't have it yet but it's back to work for me and hopefully the next time I post back I'll finally have it... :-) Thanks again, Rick From: Andrew Farm

Re: MacRoman -> UTF8 [solved]

2009-03-22 Thread Michael Ash
On Sun, Mar 22, 2009 at 8:22 AM, Uli Kusterer wrote: > On 22.03.2009, at 12:22, Michael Ash wrote: >> >> On Sun, Mar 22, 2009 at 3:48 AM, Ben Lachman wrote: >>> >>> Just for the record, this was an issue with my HTTP content type settings >>> and the charset that the input was encoded in, not any

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Michael Ash
On Sun, Mar 22, 2009 at 1:53 PM, Steve Cronin wrote: > Adam; > > I'm an ObjC guy -- I generally avoid the C stuff if possible - 'cause I have > to support my own code. In addition to what the others have said, avoiding the C stuff if possible but being perfectly happy to use *AppleScript*, of all

How to get a scroll view to recognize overflow on a custom view?

2009-03-22 Thread Ken Tozier
Hi I have a custom view inside a scroll view and all works nicely except when the custom view's contents exceeds the depth of the scroll view. The scroll bars don't appear. I created the scroll view in IB from a standard widget and did nothing more than set the class of default content vi

Re: NSAppleScript - what is going on here?

2009-03-22 Thread Adam R. Maxwell
On Mar 22, 2009, at 8:54 PM, Michael Ash wrote: On Sun, Mar 22, 2009 at 1:53 PM, Steve Cronin wrote: Adam; I'm an ObjC guy -- I generally avoid the C stuff if possible - 'cause I have to support my own code. In addition to what the others have said, avoiding the C stuff if possible but

Re: How to get a scroll view to recognize overflow on a custom view?

2009-03-22 Thread Ron Fleckner
On 23/03/2009, at 3:12 PM, Ken Tozier wrote: Hi I have a custom view inside a scroll view and all works nicely except when the custom view's contents exceeds the depth of the scroll view. The scroll bars don't appear. I created the scroll view in IB from a standard widget and did nothing

Re: How to get a scroll view to recognize overflow on a custom view?

2009-03-22 Thread Ken Tozier
I think my issue is slightly different. The scroll bars never appear, no matter how much overflow there might be. I generally don't have a problem using table views as they seem to have some built-in mechanism for notifying the scroll view that they are deeper than it is. I'm trying to make

Re: How to get a scroll view to recognize overflow on a custom view?

2009-03-22 Thread Ron Fleckner
Yes, the scroll bars never appeared in my case as well. That's why I resorted to the workaround. Good luck. On 23/03/2009, at 4:17 PM, Ken Tozier wrote: I think my issue is slightly different. The scroll bars never appear, no matter how much overflow there might be. I generally don't hav

Re: How to get a scroll view to recognize overflow on a custom view?

2009-03-22 Thread Quincey Morris
On Mar 22, 2009, at 21:12, Ken Tozier wrote: Hi I have a custom view inside a scroll view and all works nicely except when the custom view's contents exceeds the depth of the scroll view. The scroll bars don't appear. I created the scroll view in IB from a standard widget and did nothing

Creating UI for as of Get Info Panel

2009-03-22 Thread Ankur Singhal
Hi All, I have to develop an application on which I have to draw a Get Info panel, displaying all the information of the file but I am not able to prepare the UI for this Panel. Is there any API for the Get Info Panel? Or can any one help me is finding the controls that can be used to develop it

[SOLVED] Re: [noob] Best practice for creating multiple instances of a View

2009-03-22 Thread Stuart Malin
On Mar 20, 2009, at 11:08 AM, Stuart Malin wrote: On Mar 20, 2009, at 10:09 AM, mmalc Crawford wrote: Modulo other's comments about premature optimisation, if you want to avoid going back to the disk:

Re: Creating UI for as of Get Info Panel

2009-03-22 Thread Kyle Sluder
We have no idea what file you want to Get Info on, or whether you want to make your own Get Info panel or use the Finder's. For all I know this is a Get Info window in a custom application that has no relation to files on disk besides bearing the same name. http://www.whathaveyoutried.com We wil