what replaces ICARegisterEventNotificationPB

2008-11-19 Thread M Pulis
Folks, ICARegisterEventNotificationPB is deprecated in 10.5. What is the recommended replacement? Gary ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: NSShadow

2008-11-19 Thread M Pulis
Thanks, Ken, Will check it out and file a bug should be a cinch to create a demo for them. Need a yet another new class: NSMutableShadow :-)) Gary On Nov 20, 2008, at 12:06 AM, Ken Ferry wrote: Hi Gary, Try making a new shadow rather than mutating the one you get from the view. W

Re: NSShadow

2008-11-19 Thread Ken Ferry
Hi Gary, Try making a new shadow rather than mutating the one you get from the view. When you set it back, the view does not realize the shadow has changed, and so does not update the CoreAnimation layer tree. Please file a bug for this. -Ken On Tue, Nov 18, 2008 at 1:19 AM, M Pulis <[EMAIL PR

Re: Links with ../ and /

2008-11-19 Thread Mr. Gecko
what I am trying to do is get a string of the full url from urls with ../, I have the original url so I can just use that. link = [[NSURL URLWithString:link relativeToURL:[NSURL URLWithString:url]] absoluteString]; Thanks for the help, Mr. Gecko On Nov 20, 2008, at 12:32 AM, Ken Thomases wrot

[moderator] Re: Cocoa apps protection software

2008-11-19 Thread Scott Anguish
On 19-Nov-08, at 9:03 PM, Jean-Nicolas Jolivet wrote: This topic is always a big debate from what I can see!... :) Yes. and the debate about whether to protect or not is always off-topic. There is a Yahoo Group for discussion of business-related issues at:

Re: Fastest way to resize an image?

2008-11-19 Thread Ken Ferry
Hi Jean-Nicolas, This is not a bad way to resize images, but a few things come to mind that you could try: (1) Run it shark to make sure that it's really the image drawing that's getting you, and not something else that is avoidable. You could accidentally be creating redundant copies of image b

Re: Links with ../ and /

2008-11-19 Thread Ken Thomases
On Nov 19, 2008, at 11:13 PM, Mr. Gecko wrote: How do I handle links with ../ for previous directory and / for front of url. I am current;y doing it with Am I misunderstanding or are you reimplementing +[NSURL URLWithString:relativeToURL:] ? Cheers, Ken _

Fastest way to resize an image?

2008-11-19 Thread Jean-Nicolas Jolivet
I have a bunch of images to resize... they are located on the HD so they can be loaded in an NSImage or a BitmapImageRep or pretty much any way I'd like (CIImage, CGImage are possibilities I guess), however I found out that just using the setSize: method of NSImage was unreliable (since bas

Re: Links with ../ and /

2008-11-19 Thread Rob Keniger
On 20/11/2008, at 3:13 PM, Mr. Gecko wrote: How do I handle links with ../ for previous directory and / for front of url. I'm currently doing this: // Example: [ @"/a/b/c/d" relativePathTo: @"/a/e/f/g/h"] => @"../../e/ f/g/h". - (NSString*) relativePathTo: (NSString*) endPath { i

RE: Question about NSThread?

2008-11-19 Thread Stefan Sinclair
Not knowing what your design looks like, in my head I am picturing your worker thread (which reads / generates the images) maintaining a measure of its progress (eg a float from [0,1]) and then exposing that progress value to your main thread in which the UI runs. That is the memory I envisione

RE: Question about NSThread?

2008-11-19 Thread Stefan Sinclair
In a word, yes :) If you are accessing a piece of memory across threads, you should be making sure you are synchronizing any access to that memory which could occur across threads. For simple primitives (such as possibly your work progress number) just using an atomic integer would suffice. F

Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-19 Thread Austin Ziegler
For a project that I'm working on, I have a need to write a code generator that will wrap certain kinds of C functions as Objective C messages on an Objective C proxy. Because I don't ultimately control the input, the parameters on the C functions may be poorly named. I'm looking for advice on how

Links with ../ and /

2008-11-19 Thread Mr. Gecko
How do I handle links with ../ for previous directory and / for front of url. I am current;y doing it with NSArray *linkArray = [[self replace:@"http://"; with:@"" source:[self replace:@"https://"; with:@"" source:link]] componentsSeparatedByString:@"/"]; if ([linkArray count]!=0) {

Using properties (was Re: Outlets / IBOutlet declarations)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 8:40 PM, Michael Ash wrote: On Wed, Nov 19, 2008 at 5:41 PM, mmalcolm crawford <[EMAIL PROTECTED] > wrote: On Nov 19, 2008, at 2:29 PM, Michael Ash wrote: Because there's essentially no good way to dispose of properties given the way that they're implemented. I'm not s

Re: Autorelease Question

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 11:38 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > Seriously, this kind of hysteria does nobody any good. Nothing you do > besides explicitly releasing/draining an NSAutoreleasePool instance > that you explicitly created is going to drain the current autorelease > pool. You

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 5:41 PM, mmalcolm crawford <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2008, at 2:29 PM, Michael Ash wrote: > >> On Wed, Nov 19, 2008 at 5:18 PM, mmalcolm crawford <[EMAIL PROTECTED]> >> wrote: >>> >>> On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: (This is the one t

Setter Declaration for Scalar, with @property --> Silent Runtime Failure

2008-11-19 Thread Jerry Krinock
I'm surprised I couldn't find this in the list archives. While remodelling some old code, I got tired of scrolling and decided to replace a couple dozen old accessors with @property and @synthesize. But I inadvertantly left a few of the old getter declarations in the code. Like this one:

Re: Autorelease Question

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 6:31 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Wed, Nov 19, 2008 at 6:17 PM, Filip van der Meeren > <[EMAIL PROTECTED]> wrote: >> If you wait until the end of your method to autorelease the object, you are >> leaving a whole range of possible memoryleaks open, since ev

Re: NSButton ical Like

2008-11-19 Thread Emmanuel Pinault
Andre, Nice! This looks like what I am trying to build :) I guess I ll take a close look at this. For now I was using the regular DatePicker pointed out earlier but that one what I am looking for Manu On Nov 19, 2008, at 3:17 PM, Andre Masse wrote: I've not used it but this may worth tak

Re: NSButton ical Like

2008-11-19 Thread Emmanuel Pinault
Ken Thanks for the pointers. I will look into those classes. Sounds like what I am looking for. Too bad it is not in the documentation :( Manu On Nov 19, 2008, at 3:27 PM, Ken Ferry wrote: I can see they use some image that somehow but be stretched to fit. but have no idea how to do it.

Re: Autorelease Question

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 6:06 PM, Filip van der Meeren <[EMAIL PROTECTED]> wrote: > I disagree, the retain, autorelease and release are all defined within the > Foundation framework. > And that is something that belongs together with the Objective-C language > (according to me); I know it does not n

Re: Question about NSThread?

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 6:32 PM, Jean-Nicolas Jolivet <[EMAIL PROTECTED]> wrote: > One question... you wrote: > >> So when >> dealing with unknown objects whose thread safety is not documented, >> you cannot access them from multiple threads without synchronization >> just because they present an

Re: SOLVED Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-19 Thread Rua Haszard Morris
Or, you could create an NSView subclass instance with -isFlipped overridden shared among non-flipped views. You can add the flipped view to your view inside -drawRect: and - lockFocus to it temporarily. Depending on your rendering needs, this approach is preferable performance-wise than al

Re: forcing menu validation

2008-11-19 Thread Mudi Dandan
On Nov 20, 2008, at 4:15 AM, Mudi Dandan wrote: On Nov 20, 2008, at 4:01 AM, Quincey Morris wrote: On Nov 19, 2008, at 18:34, Mudi Dandan wrote: I'm using automatic menu validation. The problem comes from that I exchange close window/close tab (as in Safari) shortcuts during the validatio

Re: Info request on developing codec

2008-11-19 Thread Arnab Ganguly
I am going to develop audio codec.Want to support AACplus file streaming.The player I have developed using QT SDK.So can you tell me what would be best approach to develop the codec. Thanks Arnab On Wed, Nov 19, 2008 at 10:40 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]>wrote: > > Le 19 nov. 08 à 17:

Re: forcing menu validation

2008-11-19 Thread Mudi Dandan
On Nov 20, 2008, at 4:01 AM, Quincey Morris wrote: On Nov 19, 2008, at 18:34, Mudi Dandan wrote: I'm using automatic menu validation. The problem comes from that I exchange close window/close tab (as in Safari) shortcuts during the validation process. Unfortunately -validateUserInterfaceItem

Re: forcing menu validation

2008-11-19 Thread Quincey Morris
On Nov 19, 2008, at 18:34, Mudi Dandan wrote: I'm using automatic menu validation. The problem comes from that I exchange close window/close tab (as in Safari) shortcuts during the validation process. Unfortunately -validateUserInterfaceItem: doesn't seem to be called when pressing a shortc

Re: forcing menu validation

2008-11-19 Thread Mudi Dandan
On Nov 20, 2008, at 3:36 AM, Kyle Sluder wrote: On Wed, Nov 19, 2008 at 9:32 PM, Mudi Dandan <[EMAIL PROTECTED]> wrote: The problem comes from that I exchange close window/close tab (as in Safari) shortcuts during the validation process. Don't do this. Instead, change the title of the ite

Re: Plist to tableview

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 9:27 PM, Richard S. French <[EMAIL PROTECTED]> wrote: > How do I return a count and the data? Read up on implementing a table view data source. Your data source object implements these methods and returns the correct data. So once you have loaded the data from a plist and

Re: forcing menu validation

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 9:32 PM, Mudi Dandan <[EMAIL PROTECTED]> wrote: > The problem comes from that I exchange close window/close tab (as in > Safari) shortcuts during the validation process. Don't do this. Instead, change the title of the item (be sure to use localized strings!) and make sure

Re: forcing menu validation

2008-11-19 Thread Mudi Dandan
I didn't. I'm using automatic menu validation. The problem comes from that I exchange close window/close tab (as in Safari) shortcuts during the validation process. Unfortunately -validateUserInterfaceItem: doesn't seem to be called when pressing a shortcut, so hitting command-w will close th

Re: Decomposing an interface into separate nibs

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 1:05 PM, Frank Wilson <[EMAIL PROTECTED]> wrote: > What I want to do is be able to decompose a particular interface into > several nibs. Sometimes this feels right to me because I feel that one > component on the interface can be reused separately. In fact, it might > repres

Re: forcing menu validation

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 9:12 PM, Mudi Dandan <[EMAIL PROTECTED]> wrote: > Is there any way to force a menu validation? Did you miss the documentation for -autoenablesItems? The Application Menu and Pop-up List Progamming Topics for Cocoa guide describes your options: 1. Automatic menu enabling 2

forcing menu validation

2008-11-19 Thread Mudi Dandan
Hi, Is there any way to force a menu validation? Mudi ___ 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/Un

Re: Cocoa apps protection software

2008-11-19 Thread Jean-Nicolas Jolivet
This topic is always a big debate from what I can see!... :) Personally I decided to go with AquaticPrime (and adapt it a bit)... It really depends on your view on the subject, personally I think, as other mentioned, that your app will probably gets cracked eventually anyway... The way I

Re: Cocoa apps protection software

2008-11-19 Thread Rob Keniger
On 20/11/2008, at 3:11 AM, Nick Zitzmann wrote: Does anybody know software protection systems for Cocoa apps and bundles? Like in Windows ASProtect, Themida, etc. You're best off making your own. The only one I know of that's out there is AquaticPrime, and it's trivial to crack globally.

Re: Plist to tableview

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 6:45 PM, Richard S. French <[EMAIL PROTECTED]> wrote: > Newbie question: > How does one import an array of values from a dictionary (plist) and display > on a window? Deserialize the plist into an NSArray object. Provide the values from the NSArray to an NSTableView using

Re: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects)

2008-11-19 Thread j o a r
On Nov 19, 2008, at 4:55 PM, Jeff Laing wrote: Well, that's sort of my point, really. I don't *know* what happens inside the *synthesized* code, the only thing I can do is look to Apple who do and what they've said in the past is "don't do it". Not "its not safe". So I don't think I can ma

RE: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects)

2008-11-19 Thread Jeff Laing
> From: Roland King [mailto:[EMAIL PROTECTED] > I think if you're talking about your own instance variables which you > are declaring and synthesizing, you have enough information to decide > if it's safe to call your property accessors in dealloc or not. Well, that's sort of my point, really. I d

Re: Autorelease Question

2008-11-19 Thread j o a r
On Nov 19, 2008, at 4:24 PM, Kyle Sluder wrote: What prevents someone from manually running the runloop? Nothing, but that wouldn't still create the problem that you proposed. Autorelease pools are stacked. Popping the autorelease pool for the inner runloop wouldn't have any effect on th

Re: Autorelease Question

2008-11-19 Thread Luke the Hiesterman
Nothing prevents someone from running their own runloop, but I dealt with the most common case. Also, if you use your own NSAutoreleasePool, it's even easier to know when autoreleases will happen, because you're doing your own [pool drain]; Luke On Nov 19, 2008, at 4:24 PM, Kyle Sluder wr

Re: Autorelease Question

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 3:07 PM, DKJ wrote: In general, if you retain an object, or use a either a "copy" or an "init..." method to obtain it, you need to release it yourself when you're done with it. Otherwise, you can assume that the object will dispose of itself at some future time. But w

Re: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects)

2008-11-19 Thread Roland King
Jeff Laing wrote: There's no difference between setting through a property, and setting through a plain old setter method. That said, it's up to you to decide if you want to go with the official recommendation or not. If you think that you have enough control over the implementation of your acce

Re: Autorelease Question

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 6:44 PM, Luke the Hiesterman <[EMAIL PROTECTED]> wrote: > It's simply not true that you have "no idea" when an object will be > autoreleased. If you're on the main thread, you know that it will be > released at the end of the runloop, and you know that your current method >

Re: Autorelease Question

2008-11-19 Thread Carmen Cerino Jr.
Thank you all for your clarifications! On Wed, Nov 19, 2008 at 6:53 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > On Nov 19, 2008, at 5:37 PM, Carmen Cerino Jr. wrote: >> >> I am not sure the best way to phrase this question into words, so I >> will phrase it using example code. >> >> - (NSString*)foo

Re: Autorelease Question

2008-11-19 Thread Andy Lee
On Nov 19, 2008, at 5:37 PM, Carmen Cerino Jr. wrote: I am not sure the best way to phrase this question into words, so I will phrase it using example code. - (NSString*)foo { NSString blah = [NSString string]; . //Now do I do: return blah; //Or: return [[blah reta

Re: Blue default button style hangs.

2008-11-19 Thread Russ
I'm looking at this a little more at the moment. Three things concern me: 1) My NSButton instance that is supposed to become default button is enclosed within a small container view, so it is a little further down the view hierarchy than it might otherwise be. Ie the hierarchy is NSWindow/NSV

Plist to tableview

2008-11-19 Thread Richard S. French
Newbie question: How does one import an array of values from a dictionary (plist) and display on a window? It seems that the plist has to be translated to XML data and every byte read into an array. How does one then select just certain members where the plist contains an array under a key? I am tr

Re: Autorelease Question

2008-11-19 Thread Luke the Hiesterman
It's simply not true that you have "no idea" when an object will be autoreleased. If you're on the main thread, you know that it will be released at the end of the runloop, and you know that your current method will return to its caller within the current runloop. Furthermore, you know that

RE: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects)

2008-11-19 Thread Jeff Laing
> There's no difference between setting through a property, and setting > through a plain old setter method. That said, it's up to you to decide > if you want to go with the official recommendation or not. If you > think that you have enough control over the implementation of your > accessor method

RE: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Jeff Laing
On Nov 19, 2008, at 2:29 PM, mmalcolm crawford wrote: > You send a release message to instance variables for which there is a > corresponding retain or copy property. which is why I originally said: >>> (This is the one thing I hate the *most* about properties - they >>> really feel glued on, at

Re: Autorelease Question

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 6:32 PM, Carmen Cerino Jr. <[EMAIL PROTECTED]> wrote: > I guess I should also have included what spawned this question in the > first place. I have read in a handful of places that you can > guarantee, in the example case, that blah will exist until the end of > function, an

Re: NSButton ical Like

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 2:37 PM, Emmanuel Pinault <[EMAIL PROTECTED]> wrote: > How do I make a button like the mini calendar in ical (the one that show the > days and when one is selected , it shows the day with a blue gradient)? Subclass NSButtonCell and put your subclass in an NSMatrix. There's

Re: Autorelease Question

2008-11-19 Thread DKJ
On 19-Nov-08, at 15:17 , Filip van der Meeren wrote: If you already know you will autorelease the object and return it, then you should call the autorelease at the same moment you create the object. NSString *str = [[[NSString alloc] init] autorelease]; Good point. _

Re: Question about NSThread?

2008-11-19 Thread Jean-Nicolas Jolivet
One question... you wrote: So when dealing with unknown objects whose thread safety is not documented, you cannot access them from multiple threads without synchronization just because they present an immutable interface. When you talk about "accessing" these objects, do you also mean read

Re: SOLVED Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-19 Thread Aki Inoue
Or, you could create an NSView subclass instance with -isFlipped overridden shared among non-flipped views. You can add the flipped view to your view inside -drawRect: and - lockFocus to it temporarily. Depending on your rendering needs, this approach is preferable performance-wise than al

Re: Autorelease Question

2008-11-19 Thread Carmen Cerino Jr.
I guess I should also have included what spawned this question in the first place. I have read in a handful of places that you can guarantee, in the example case, that blah will exist until the end of function, and that sometime after the end of the scope of the function blah will be released. So i

Re: Autorelease Question

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 6:17 PM, Filip van der Meeren <[EMAIL PROTECTED]> wrote: > If you wait until the end of your method to autorelease the object, you are > leaving a whole range of possible memoryleaks open, since every call you > make between the allocation and release is a call that might th

Re: NSButton ical Like

2008-11-19 Thread Ken Ferry
> I can see they use some image that somehow but be stretched to fit. but have > no idea how to do it. ... > how would I create a background using a strectched > image? I'm not following what art exactly you're talking about drawing, but it sounds like you might be interested in NSDrawThreePartIm

Re: core-data crash on save. [SOLVED]

2008-11-19 Thread John Clayton
For all that answered me - a huge thanks. I've solved my particular flavour of this problem now. Partly, its a problem of the documentation - and partly my particular configuration. Here, for future reference at the 'facts' I collected along my learning experience - which led me finally t

Re: Autorelease Question

2008-11-19 Thread Kyle Sluder
Read this document: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/ObjectOwnership.html#//apple_ref/doc/uid/2043-BEHDEDDB Then read this one: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html If you are just

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
I feel the need to express one concern about this topic: If you already know you will autorelease the object and return it, then you should call the autorelease at the same moment you create the object. NSString *str = [[[NSString alloc] init] autorelease]; If you wait until the end of you

Re: NSButton ical Like

2008-11-19 Thread Andre Masse
I've not used it but this may worth taking a look at: http://code.google.com/p/calendarcontrol/ Andre Masse On Nov 19, 2008, at 14:37, Emmanuel Pinault wrote: How do I make a button like the mini calendar in ical (the one that show the days and when one is selected , it shows the day with a

Re: Autorelease Question

2008-11-19 Thread Luke the Hiesterman
Agreed. libc can be considered a part of C, so Foundation is a part of Objective-C. Luke On Nov 19, 2008, at 3:06 PM, Filip van der Meeren wrote: I disagree, the retain, autorelease and release are all defined within the Foundation framework. And that is something that belongs together with

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread j o a r
On Nov 19, 2008, at 3:05 PM, Ricky Sharp wrote: Now, when you say "call through your properties in init/dealloc", is that explicitly for things set up with @property? Or, has what I've been doing all these years with calls to accessors in init/dealloc really "bad"? There's no differenc

Re: Autorelease Question

2008-11-19 Thread DKJ
If you've done this: NSString *str = [NSString string]; then you can simply do this: return str; Whoever is getting the returned value should retain it, and then release it when they're done. If you'd done this instead: NSString *str = [[NSString alloc] init]; the

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
I disagree, the retain, autorelease and release are all defined within the Foundation framework. And that is something that belongs together with the Objective-C language (according to me); I know it does not need it to exist as a language, but Objective-C is kind of useless without the Found

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Ricky Sharp
On Nov 19, 2008, at 4:11 PM, j o a r wrote: On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. That is indeed correct. The of

Re: Autorelease Question

2008-11-19 Thread Shawn Erickson
On Wed, Nov 19, 2008 at 2:37 PM, Carmen Cerino Jr. <[EMAIL PROTECTED]> wrote: > I am not sure the best way to phrase this question into words, so I > will phrase it using example code. > > - (NSString*)foo > { > >NSString blah = [NSString string]; > >. > > >//Now do I do: >r

Re: Autorelease Question

2008-11-19 Thread Shawn Erickson
On Wed, Nov 19, 2008 at 2:45 PM, Luke the Hiesterman <[EMAIL PROTECTED]> wrote: > This is really an objective-c question Actually Cocoa memory management isn't and objective-c topic (unless you are using GC then you get more toward a language level concept)... retain/release/autorelease is a Cocoa

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
It will not be contained in a NSAutoreleasePool per-se. Lets say you create a console application, then you would have to make the choice, will I use the NSAutoreleasePool, or try it without (most likely you will, or you wouldn't be able to use autorelease or use any methods that use this me

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
Just one little addition to my previous mail; it is: NSString *blah = [NSString string]; You forgot the star ;-) Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 19 Nov 2008, at 23:47, Filip van der Meeren wrote: As long as you do not contain the "blah" in a NSAutorel

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
As long as you do not contain the "blah" in a NSAutoreleasePool, then you do not have an issue... Just use "return blah;". Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 19 Nov 2008, at 23:37, Carmen Cerino Jr. wrote: I am not sure the best way to phrase this quest

Re: Autorelease Question

2008-11-19 Thread Luke the Hiesterman
This is really an objective-c question (and there is an obj-c list). Anyway, whenever you call a convenience class method +[NSString stringWithString:] as opposed to doing an alloc/init you're getting back an autoreleased object. So, if you're returning that value, it would make sense to si

Re: Question about NSThread?

2008-11-19 Thread Jean-Nicolas Jolivet
Thanks for all the reply! By digging a little deeper I can see that everything isn't working quite as smoothly as I thought it was...! All the info is quite welcomed! Jean-Nicolas Jolivet On 19-Nov-08, at 3:57 PM, Jean-Nicolas Jolivet wrote: I have an app that generates a bunch of images.

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 1:57 PM, Brian Stern wrote: I'm starting to think that maybe using the assign properties is the better way to handle this. That's certainly one approach, and one that was considered. The problem is that you then have to think through every outlet declaration to make s

Re: Autorelease Question

2008-11-19 Thread Joseph Crawford
I believe that would better be done like this - (NSString *)foo { NSString blah = [[[NSString alloc] init] autorelease] ... return blah; } I might not be correct as I am a newbie too.. Thanks, Joseph Crawford On Nov 19, 2008, at 5:37 PM, Carmen Cerino Jr. wrote:

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 2:29 PM, Michael Ash wrote: On Wed, Nov 19, 2008 at 5:18 PM, mmalcolm crawford <[EMAIL PROTECTED] > wrote: On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: (This is the one thing I hate the *most* about properties - they really feel glued on, at this point, rather than b

Autorelease Question

2008-11-19 Thread Carmen Cerino Jr.
I am not sure the best way to phrase this question into words, so I will phrase it using example code. - (NSString*)foo { NSString blah = [NSString string]; . //Now do I do: return blah; //Or: return [[blah retain] autorelease]]; } _

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread j o a r
On Nov 19, 2008, at 2:22 PM, Brian Stern wrote: That is indeed correct. The official guideline is, AFAIK, to not call through your properties in init / dealloc. For whatever reason UIViewController sets its view property to nil from its dealloc method. Greg's override of setView is based

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 5:18 PM, mmalcolm crawford <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: >> >> (This is the one thing I hate the *most* about properties - they really >> feel glued on, at this point, rather than being a language feature that >> the "whole com

Re: Question about NSThread?

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 3:57 PM, Jean-Nicolas Jolivet <[EMAIL PROTECTED]> wrote: > I have an app that generates a bunch of images... the process can be long so > I wanted to start it in a separate thread so that the UI can be responsive > etc... > > basically the only thing I did was: > > [NSThread

Re: SOLVED Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-19 Thread Ken Ferry
On Tue, Nov 18, 2008 at 1:57 PM, Rua Haszard Morris <[EMAIL PROTECTED]> wrote: > What are the different options for flipping the coordinates of the > destination view? I've tried doing it by scaling and translating the > CGContext, but this results in problems with underlining or the character > or

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Brian Stern
On Nov 19, 2008, at 5:11 PM, j o a r wrote: On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. That is indeed correct. The of

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. Correct. (This is the one thing I hate the *most* about properties - they re

Re: Question about NSThread?

2008-11-19 Thread Jean-Daniel Dupas
Yes, as long as you do not access directly your UI from the background thread (you can do it, but using you should use the performOnMainThread: method). Note that you may want to release and recreate your auto release pool from time to time (between each image for example), else your autore

Re: Changing Services HotKey at Runtime

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 22:30, Peter Ammon a écrit : On Nov 19, 2008, at 4:49 AM, Xavier Snark wrote: Greetings, In my application I would like to change the Services Hotkey combination at runtime. So far, the only Apple documentation that I have found states that the hotkey is configured via t

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread j o a r
On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. That is indeed correct. The official guideline is, AFAIK, to not call throu

Re: Question about NSThread?

2008-11-19 Thread Kai
It depends... You may well just be lucky that it seems to work (or unlucky, this again depends...). If your worker thread is only reading any data shared with other threads, it will indeed never disturb these other threads (probably just the main thread in your case). But if the main thre

Re: Cocoa apps protection software

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 12:11 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2008, at 9:53 AM, Donnie Lee wrote: > >> Does anybody know software protection systems for Cocoa apps and >> bundles? Like in Windows ASProtect, Themida, etc. > > > You're best off making your own. The only on

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 7:00 AM, Brian Stern wrote: There are competing issues. Following this best practice forces me to add public properties for all my outlets that my code never uses. This violates encapsulation and seems wasteful and error-prone. No, it's not. The nib-loading mechanis

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Brian Stern
On Nov 19, 2008, at 4:41 PM, Ricky Sharp wrote: From Apple's template code, didReceiveMemoryWarning does have these code comments generated: [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview // Release anything that's not essential, such as cached data

RE: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Jeff Laing
> But if your dealloc is like this... > > - (void)dealloc > { > self.thisProp = nil; > self.thatProp = nil; > ... > } > > then you'll be calling the accessors and the right thing will happen > (i.e. release if necessary). This is what I currently do for all dev > work (iPhone or M

NSComboBox beep

2008-11-19 Thread James Walker
If I use the Return key to select an item from the list of a non-editable combo box, there is a beep and the action message is not sent. This does not happen if the mouse is used to select an item. Is this a bug, or am I missing something? The reason I want to use an uneditable NSComboBox in

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Ricky Sharp
On Nov 19, 2008, at 10:13 AM, Brian Stern wrote: I think that you're probably right and that it's redundant. Needless to say, mmalc's best practice has the outlets being released in dealloc. That's why I had that code there in the first place. FWIW, I don't think that UIViewController

Re: Question about NSThread?

2008-11-19 Thread Jean-Nicolas Jolivet
Mmm I see Well, right now I would say my worker thread is pretty much just reading values (size of image to generate etc)... but it's not "modifying" anything... it doesn't change any variables etc... just reads the info it needs to generate the images and ...well, generates the image

Re: Simple single file renaming application ...

2008-11-19 Thread Iceberg-Dev
On Nov 19, 2008, at 8:09 PM, vince wrote: Thanks for the help ... I want to build a simple single file re-namer. Just a window and a textField that displays the current filename, and a text Field and Save option for the edit. So right click a file/"open with" ... the app runs and loads

Re: Changing Services HotKey at Runtime

2008-11-19 Thread Peter Ammon
On Nov 19, 2008, at 4:49 AM, Xavier Snark wrote: Greetings, In my application I would like to change the Services Hotkey combination at runtime. So far, the only Apple documentation that I have found states that the hotkey is configured via the Info.plist file in the application bundle.

Re: NSButton ical Like

2008-11-19 Thread Emmanuel Pinault
On Nov 19, 2008, at 1:01 PM, Nick Zitzmann wrote: On Nov 19, 2008, at 12:37 PM, Emmanuel Pinault wrote: How do I make a button like the mini calendar in ical (the one that show the days and when one is selected , it shows the day with a blue gradient)? You've got to write one yourself

Re: How to get notification of rerun application

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 5:49 AM, Macarov Anatoli <[EMAIL PROTECTED]> wrote: > No. The program starts up automatically upon system logon, and the icon > appears in the system tray (near clock). A user may not notice the icon , > thus he/she starts the program manually, and then pops up program's m

  1   2   >