Re: Dot Syntax docs missing?

2008-07-18 Thread mmalc crawford
On Jul 18, 2008, at 10:16 PM, Andy Lee wrote: Interesting... the online doc is missing a couple of sections that my Xcode doc has. I'm looking here:

Quick problem with arraycontroller

2008-07-18 Thread Jason Cox
I have 2 array controllers. the 1st manages an array of Project objects. within the project object there is an NSMutableArray of ProjectInfo objects. Here is an image of my Interface Builder setup for the 2 controllers: http://www.design-factor.com/jason/bindings.jpg The Projects array contr

Re: CoreData Property access compiles, but fails at runtime

2008-07-18 Thread Rick Mann
I think this is also a bit of a red herring. I realize that my setEp1: is only being called because I instantiated this instance directly. When the instance is created by CoreData, my setEp1 is not called. This is odd, because I'm doing this successfully in a different entity (shadowing the

Re: substitute class at runtime?

2008-07-18 Thread Kyle Sluder
On Sat, Jul 19, 2008 at 1:10 AM, Andy Lee <[EMAIL PROTECTED]> wrote: > Am I misunderstanding? No, I assure you that I'm the one who misunderstood. Although now the question is why would one use an array of strings when one could use an array of Class objects... maybe because the strings are comin

how to clear the whole render tree of CALayer fast and safely?

2008-07-18 Thread Cloud Strife
Hi, everyone.Assuming there is a Core Animation render tree with many calayers and complex levels, should I use the iteration function to remove one layer from one layer or there just is some useful function to delete the whole render tree neatly at once to make the app robust ? After created and

CoreData Property access compiles, but fails at runtime

2008-07-18 Thread Rick Mann
I have a CoreData entity called WireSegment, and a class to implement it. A stripped-down version looks like this: @interface WireSegment : NSManagedObject { } @property CGPoint ep1; @property (retain) NSString* shadowEP1; @end @implementation WireSegment @d

Re: WebView load background color.

2008-07-18 Thread Andy Lee
I'm afraid I don't know, but please don't post a new question by replying to an existing question. It screws up the threading in Mail. --Andy On Jul 19, 2008, at 1:15 AM, Bruce Cresanta wrote: Hello, Is it possible to change the background color when loading a WebView from white to what

Re: Dot Syntax docs missing?

2008-07-18 Thread Andy Lee
On Jul 19, 2008, at 1:01 AM, Rick Mann wrote: On Jul 18, 2008, at 21:53:45, Andy Lee wrote: How up-to-date are your docs? Maybe the Dot Syntax section wasn't written yet in your version of the docs. I was looking online, at the ADC website. I'll check Xcode. Interesting... the online doc

WebView load background color.

2008-07-18 Thread Bruce Cresanta
Hello, Is it possible to change the background color when loading a WebView from white to whatever? Thank you, Bruce ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Cont

Re: Dot Syntax docs missing?

2008-07-18 Thread Rick Mann
On Jul 18, 2008, at 21:51:57, Jerry Krinock wrote: setEp1: should work. The colon is significant and is a part of the method name. In fact, I do have the colon in the actual definition. Definitely something else is going on, I think. I would advise you to embrace and learn both the dot

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-18 Thread Rick Mann
On Jul 18, 2008, at 22:00:56, Andy Lee wrote: I haven't used either properties or dot syntax myself, but in the sidebar of the Objective-C 2.0 doc I see a "Declared Properties" section with a "Using Properties" subsection which has a "Property Declaration" section. Looks like what you wan

Re: Dot Syntax docs missing?

2008-07-18 Thread Glenn L. Austin
On Jul 18, 2008, at 8:58 PM, Rick Mann wrote: Where is the description of the dot syntax? The top of the Obj-C 2.0 docs (Properties section) refers you "Dot Syntax." A search of ADC turns up the first hit: Look for Graphviz. ___ Cocoa-dev mailin

Re: substitute class at runtime?

2008-07-18 Thread Andy Lee
On Jul 19, 2008, at 12:58 AM, Kyle Sluder wrote: On Fri, Jul 18, 2008 at 2:05 PM, Andy Lee <[EMAIL PROTECTED]> wrote: NSClassFromString() No, just use [ClassName class]. NSObject's +class method returns the class itself (in other words, it's as if the metaclass defined -class to return self).

Re: Dot Syntax docs missing?

2008-07-18 Thread Rick Mann
On Jul 18, 2008, at 21:53:45, Andy Lee wrote: How up-to-date are your docs? Maybe the Dot Syntax section wasn't written yet in your version of the docs. I was looking online, at the ADC website. I'll check Xcode. -- Rick ___ Cocoa-dev mailing

Re: property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-18 Thread Andy Lee
On Jul 19, 2008, at 12:53 AM, Rick Mann wrote: I realize after all this, it's not really the Dot Syntax I need. I need to know how a property name (starts with lower-case letter) is transliterated into the getter/setter names. I haven't used either properties or dot syntax myself, but in the

Re: substitute class at runtime?

2008-07-18 Thread Kyle Sluder
On Fri, Jul 18, 2008 at 2:05 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > NSClassFromString() No, just use [ClassName class]. NSObject's +class method returns the class itself (in other words, it's as if the metaclass defined -class to return self). --Kyle Sluder ___

Re: Dot Syntax docs missing?

2008-07-18 Thread Andy Lee
The Xcode doc window is your friend. I did a search for "dot syntax" and "The Dot Syntax" was the second hit. > Here's the link to my Obj-C 2.0 docs: > For me, there's a link on the sidebar to "The Dot Syntax". Do you not have this link? How up-to-date are your docs? Maybe the Dot S

property name-to-accessor munging? (was: Dot Syntax docs missing?)

2008-07-18 Thread Rick Mann
I realize after all this, it's not really the Dot Syntax I need. I need to know how a property name (starts with lower-case letter) is transliterated into the getter/setter names. On Jul 18, 2008, at 20:58:35, Rick Mann wrote: Where is the description of the dot syntax? The top of the Obj-C

Re: Dot Syntax docs missing?

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 9:44 PM, Rick Mann wrote: I know how to use the dot syntax in the typical case. What I want is an authoritative reference on how property names change case to match accessor functions I define. It's probably described in the documentation for Key-Value Coding. If you ha

Re: Dot Syntax docs missing?

2008-07-18 Thread Jerry Krinock
On 2008 Jul, 18, at 20:58, Rick Mann wrote: Where is the description of the dot syntax? The top of the Obj-C 2.0 docs (Properties section) refers you "Dot Syntax." It also refers to "structure elements", by which they mean a C struct. Remember, Objective-C is built on C. With properties,

Re: Dot Syntax docs missing?

2008-07-18 Thread Rick Mann
On Jul 18, 2008, at 21:37:59, Diop Mercer wrote: Rick, I think all you need to do is say: //set someobject.someproperty = foo; //get bar = someobject.someproperty; I know how to use the dot syntax in the typical case. What I want is an authoritative reference on how property names change

Re: Dot Syntax docs missing?

2008-07-18 Thread Glenn L. Austin
On Jul 18, 2008, at 9:08 PM, Rick Mann wrote: On Jul 18, 2008, at 21:05:33, Glenn L. Austin wrote: On Jul 18, 2008, at 8:58 PM, Rick Mann wrote: Where is the description of the dot syntax? The top of the Obj-C 2.0 docs (Properties section) refers you "Dot Syntax." A search of ADC turns

Re: Dot Syntax docs missing?

2008-07-18 Thread Rick Mann
On Jul 18, 2008, at 21:05:33, Glenn L. Austin wrote: On Jul 18, 2008, at 8:58 PM, Rick Mann wrote: Where is the description of the dot syntax? The top of the Obj-C 2.0 docs (Properties section) refers you "Dot Syntax." A search of ADC turns up the first hit: Look for Graphviz. What?

Dot Syntax docs missing?

2008-07-18 Thread Rick Mann
Where is the description of the dot syntax? The top of the Obj-C 2.0 docs (Properties section) refers you "Dot Syntax." A search of ADC turns up the first hit: The Objective-C 2.0 Programming Language: The Dot Syntax - Size: 24k ... The ... Syntax. Objective-C provides a ... ( . ... Listing 4

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 8:31 PM, Michael Ash wrote: On Fri, Jul 18, 2008 at 7:48 PM, Andy Lee <[EMAIL PROTECTED]> wrote: We'll just have to disagree on how odd the objections are. Corner case or not, we must understand that retains, wherever they occur, must be balanced with releases. Therefore

Re: Inverse Regex Library?

2008-07-18 Thread Philip Mötteli
Am 19.07.2008 um 02:13 schrieb Marcel Weiher: On Jul 17, 2008, at 14:11 , Philip Mötteli wrote: What I'm asking is, if you can identify everything that is not a too-many relationship, find them via a process of elimination (if it's not something I can identify, then it must be a too-many)

Re: Unicode names

2008-07-18 Thread Adam R. Maxwell
On Jul 18, 2008, at 5:45 AM, Gerriet M. Denkmann wrote: Is there a way (Cocoa, Carbon or whatsoever) to get the Unicode name of a character? Like: unicodeName( 0x1D110 ) = "MUSICAL SYMBOL FERMATA". Sure, I could (at least on 10.4.11) read /System/Library/Perl/5.8.6/ unicore/UnicodeData.txt

Unicode names

2008-07-18 Thread Gerriet M. Denkmann
Is there a way (Cocoa, Carbon or whatsoever) to get the Unicode name of a character? Like: unicodeName( 0x1D110 ) = "MUSICAL SYMBOL FERMATA". Sure, I could (at least on 10.4.11) read /System/Library/Perl/5.8.6/ unicore/UnicodeData.txt, but as Unicode names are used in Edit -> Special Charac

[Moderator] No iPhone SDK/development discussion here!!! Re: MoveMe gone?

2008-07-18 Thread Scott Anguish
iPhone SDK -- Until an announcement is made otherwise, developers should be aware that the iPhone SDK is still under non-disclosure (section 5.3 of the iPhone Development Agreement). It can't be discussed here, or anywhere publicly. This includes other mailing lists, forums, and def

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Steve Weller
On Jul 18, 2008, at 1:55 PM, Hamish Allan wrote: On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote: What would you use for adjectives -- "owned" and "unowned"? How about "retained" and "unretained"? As in: "this method returns an unretained object". How about "dependent

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 7:48 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > On Jul 18, 2008, at 6:41 PM, Michael Ash wrote: >> >> On Fri, Jul 18, 2008 at 4:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote: >>> >>> On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: The better term already exists: "own".

Re: tidying HTML up

2008-07-18 Thread Marcel Weiher
On Jul 18, 2008, at 14:22 , Ivan wrote: Since NSXMLDocument is no longer (or never had really been) part of the iPhone SDK, now I find my app can't be run on my iPhone. So, I wonder if is there any way I could take to keep on with my development. Just found tidylib at sourceforge, but don

Re: Inverse Regex Library?

2008-07-18 Thread Marcel Weiher
On Jul 17, 2008, at 14:11 , Philip Mötteli wrote: What I'm asking is, if you can identify everything that is not a too-many relationship, find them via a process of elimination (if it's not something I can identify, then it must be a too-many). But I can't make this analysis every-time an

Re: MoveMe gone?

2008-07-18 Thread Diop Mercer
Ok, answered my own question: found it under http://developer.apple.com/iphone/library/samplecode/MoveMe Somebody should fix that link! -m On Fri, Jul 18, 2008 at 7:57 PM, Diop Mercer <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to download the sample project MoveMe from the dev > center websi

Re: NSViewController Binding Problem continued

2008-07-18 Thread Hamish Allan
On Fri, Jul 18, 2008 at 11:18 PM, Cathy Shive <[EMAIL PROTECTED]> wrote: > I wonder if it would actually make a difference in this case. Since the nib > doesn't get loaded until the 'load view' method is called Nor it does. > and she's setting > the rO directly after the initializer (before req

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Hamish Allan
On Fri, Jul 18, 2008 at 10:10 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > On Jul 18, 2008, at 4:55 PM, Hamish Allan wrote: >> >> On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote: >> >>> What would you use for adjectives -- "owned" and "unowned"? >> >> How about "retained" and "unr

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Hamish Allan
On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > What would you use for adjectives -- "owned" and "unowned"? How about "retained" and "unretained"? As in: "this method returns an unretained object". Hamish ___ Cocoa-dev mailing l

Background Color on WebView Load.

2008-07-18 Thread Bruce Cresanta
Hello, How does one change the background color from "White" when a Webview is loading resources?I have tried to change the view alpha's to 0.0 and I've also subclassed WebView to re-implement drawRect.. I suspected that its either the documentView, webView, or frameView that needs

MoveMe gone?

2008-07-18 Thread Diop Mercer
Hi, I'm trying to download the sample project MoveMe from the dev center website: http://developer.apple.com/iphone/gettingstarted/docs/creatingiphoneapps.action According to the link, it is supposed to be available here: http://developer.apple.com/iphone/library/samplecode/MoveMe/index.html bu

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 6:41 PM, Michael Ash wrote: On Fri, Jul 18, 2008 at 4:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote: On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: The better term already exists: "own". As in, "you own the return value" or "you do not own the return value". This tells you ev

Re: NSViewController Binding Problem continued

2008-07-18 Thread Jonathan Dann
Hi Ivy, Can you tell us what the bound object the table receives is? If you could call this method (which, in its current state, would go in an NSTableView subclass) somewhere: - (NSArrayController *)arrayController; { return [[[self tableColumnWithIdentifier:@"myColumn"] infoForBinding

Re: tidying HTML up

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 3:07 PM, Ivan wrote: I'm asking for alternatives to NSXMLDocument to get a tidy XHTML document ready to be parsed with the NSXMLParser class NSXML uses libTidy. If for some reason you can't use those, you should be able to build libTidy yourself and link it into your app.

NSTableHeaderView shifting after scrolling

2008-07-18 Thread Peter Hudson
I've had similar troubles. I fixed it by setting the min and max width of the column - and then an actual width as well. Then set it non re-sizeable. PH ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 4:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: >> The better term already exists: "own". As in, "you own the return >> value" or "you do not own the return value". This tells you everything >> you need to know. > > Well, as I s

Re: NSViewController Binding Problem continued

2008-07-18 Thread Cathy Shive
On Jul 17, 2008, at 10:26 PM, Hamish Allan wrote: You might wish to file an enhancement request for NSViewController to provide an init method taking a representedObject to be set up before attempting bindings etc., which would circumvent this issue. I wonder if it would actually make a diffe

Re: tidying HTML up

2008-07-18 Thread Ivan
Please Mr. Jobe, keep on-topic :-) I'm asking for alternatives to NSXMLDocument to get a tidy XHTML document ready to be parsed with the NSXMLParser class, nothing to do with iPhone... :-) OK, I'm sory, I'll check for another list. Ivan. ___ Coc

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Michael Vannorsdel
In my office we usually call objects returned directly without an autorelease as "short returned" and an retain-autoreleased object as "pooled". Though these sound more slang than something that could be official. On Jul 18, 2008, at 3:10 PM, Andy Lee wrote: Unfortunately, there's no suc

tidying HTML up

2008-07-18 Thread Ivan
Hi, I'm developing a Cocoa Touch app for the iPhone/iPod Touch and I was using NSXMLDocument with the tidyXHTML option to transform some web paged into safe XML documents that I parsed with NSXMLParser later on. Since NSXMLDocument is no longer (or never had really been) part of the iPh

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 4:55 PM, Hamish Allan wrote: On Fri, Jul 18, 2008 at 9:21 PM, Andy Lee <[EMAIL PROTECTED]> wrote: What would you use for adjectives -- "owned" and "unowned"? How about "retained" and "unretained"? As in: "this method returns an unretained object". Unfortunately, there's

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread mmalc crawford
On Jul 18, 2008, at 1:48 PM, Andy Lee wrote: On Jul 18, 2008, at 4:19 PM, mmalc crawford wrote: On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: NSString *name = [aPerson name]; [aPerson setName:@"Fido"]; NSLog(@"Old name: %@", name); And calling the return value from -name "autoreleased" wo

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 4:19 PM, mmalc crawford wrote: On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: "Autoreleased" is inaccurate and is not a proper shorthand for "you must retain it if you want it to stick around". To understand why, consider two possible implementations of a get accessor: -

Re: NSViewController Binding Problem continued

2008-07-18 Thread Jonathan Dann
Hi Ivy, You can bind the representedObject in NIB, I do it all the time. My rO is an NSPersistentDocument subclass, which is set immediately after the view controller is -init-ed. The bindings in the nib are only set up after -loadView is called, which occurs after something in your app

NSPopUpButton style question ... "Push" v.s. "Round Textured"

2008-07-18 Thread lbland
hi- The default NSPopUpButton button style is Push. But, I'm getting board of it and it looks old-style. I think the button style of Round Textured is more "modern". Now I see that Xcode 3.0 -> 3.1 changes the PUB button style to Round Textured (I think)! Looks yummy! Is "Round Textured" P

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 3:49 PM, Michael Ash wrote: I don't see any reason to use "autoreleased" in a situation where the object in question has not, in fact, been sent the "autorelease" method. It's just confusing. Yes, you would have to acknowledge that you don't know whether autorelease has in

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread mmalc crawford
On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: "Autoreleased" is inaccurate and is not a proper shorthand for "you must retain it if you want it to stick around". To understand why, consider two possible implementations of a get accessor: - (NSString *)name { return name; } - (NSString *)

[Moderator] Re: Controlling Preferences on iPhone

2008-07-18 Thread Scott Anguish
iPhone SDK -- Until an announcement is made otherwise, developers should be aware that the iPhone SDK is still under non-disclosure (section 5.3 of the iPhone Development Agreement). It can't be discussed here, or anywhere publicly. This includes other mailing lists, forums, and def

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 3:31 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > On Jul 18, 2008, at 2:59 PM, j o a r wrote: >> >> On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: >>> >>> I don't see the difference from the caller's point of view. >> >> >> There isn't any, and that was not MMalcs point. His poi

Re: how to eliminate an annoying issue of the multi-document cocoa application?

2008-07-18 Thread Tim Isted
In your application delegate object, simply implement: - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender { return NO; } This will prevent the new document automatically being displayed. Tim On 18 Jul 2008, at 16:39, Cloud Strife wrote: Greetings everyone. I am new to

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 3:15 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > On Jul 18, 2008, at 12:15 PM, Matthew Williamson wrote: > >> But really, I still have the same problem, because I don't want to use the >> Carbon APIs (if I want my app to be 64-bit, I can't use any Carbon anyway, >> righ

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 2:59 PM, j o a r wrote: On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: I don't see the difference from the caller's point of view. There isn't any, and that was not MMalcs point. His point was that you were using the term "autoreleased" incorrectly. I don't think I have

how to eliminate an annoying issue of the multi-document cocoa application?

2008-07-18 Thread Cloud Strife
Greetings everyone. I am new to creating an new multi-doc application with Cocoa framework. After I created such one using the Xcode built-in template. There was a window, the new document, automatically jump out after I launched the application. Due to the requirement of my application, this behav

Re: Inverse Regex Library?

2008-07-18 Thread Hamish Allan
On Thu, Jul 17, 2008 at 8:49 PM, Philip Mötteli <[EMAIL PROTECTED]> wrote: > I try to analyze objects, that have been serialized using keyed encoding. > As long as there are only simple values, I have no problem. But the members > of too-many IVars are usually keyed by using something like > "IVar

Re: NSViewController Binding Problem continued

2008-07-18 Thread Hamish Allan
On Thu, Jul 17, 2008 at 8:50 PM, Ron Lue-Sang <[EMAIL PROTECTED]> wrote: > The tableview is expecting to be bound to the arraycontroller directly. It > doesn't know that representedObject is an arrayController. You might wish to file an enhancement request for NSViewController to provide an init

Re: IBOutlet to same control in different nibs

2008-07-18 Thread Hamish Allan
On Thu, Jul 17, 2008 at 5:42 PM, Trygve Inda <[EMAIL PROTECTED]> wrote: > I'll have one instance of this class for each > screen, one of which will be handling the "main" screen. > [...] > Can a single class have an IBOutlet that goes two different (though > functionally identical) places? It's a

Re: Inverse Regex Library?

2008-07-18 Thread John Engelhart
On Jul 17, 2008, at 10:09 AM, Philip Mötteli wrote: Hi, Does anybody know of a library, that takes a bunch of strings and produces a regex-string from them? E. g: "Word1" "Word2" "Word5" "Word8" "Word11" "Word19" "Word23" "Word45" "Word77" should give "Word[0-9]{1,2}". Or I would even be

NSTableHeaderView shifting after scrolling

2008-07-18 Thread sarven
I am reading a csv file into a dictionary and I display the data in a NSTableview. I created my window in Interface builder and added a NSTableview with one column. Depending on the needs of the csv file, I add columns to the table. Here is the code: -(void) awakeFromNib { NSTableCol

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 2:27 PM, Shawn Erickson wrote: On Fri, Jul 18, 2008 at 10:20 AM, Andy Lee <[EMAIL PROTECTED]> wrote: Unless Apple defines another adjective for this purpose, it seems to me that "autoreleased" is a reasonable shorthand for "you must retain it if you want it to stick around

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Nick Zitzmann
On Jul 18, 2008, at 12:15 PM, Matthew Williamson wrote: But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want my app to be 64-bit, I can't use any Carbon anyway, right?). You can; it was mainly HIView and a lot of legacy technologies (QuickDra

Re: QCCompositionLayer for Manipulating other CALayers

2008-07-18 Thread David Duncan
On Jul 17, 2008, at 7:50 PM, Mike Rossetti wrote: Before I spend a lot of time attempting the following I would appreciate any advice based on your experience: I've got a drawing-like application where I'd like the user to be able to rotate individual elements of the drawing. When the mous

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread j o a r
On Jul 18, 2008, at 11:51 AM, Andy Lee wrote: I don't see the difference from the caller's point of view. There isn't any, and that was not MMalcs point. His point was that you were using the term "autoreleased" incorrectly. j o a r ___ Coco

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 2:17 PM, mmalc crawford wrote: On Jul 18, 2008, at 1:20 PM, Andy Lee wrote: Unless Apple defines another adjective for this purpose, it seems to me that "autoreleased" is a reasonable shorthand for "you must retain it if you want it to stick around, or you *may* have a d

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 11:15 AM, Matthew Williamson <[EMAIL PROTECTED]> wrote: > Ok, looking more at the Quartz event tap stuff, there's more there than I > thought--tablet stuff is there, for instance. But really, I still have the > same problem, because I don't want to use the Carbon APIs (if I

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 10:20 AM, Andy Lee <[EMAIL PROTECTED]> wrote: > On Jul 18, 2008, at 10:49 AM, Shawn Erickson wrote: >> >> I should more clearly note that objectForKey: is not returning an >> "autoreleased" object. Also even if it did it would be an >> implementation detail (unless documente

Re: Dispatch NSEvent to everyone

2008-07-18 Thread glenn andreas
On Jul 18, 2008, at 1:15 PM, Matthew Williamson wrote: Ok, looking more at the Quartz event tap stuff, there's more there than I thought--tablet stuff is there, for instance. But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want my app to be 64-b

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread mmalc crawford
On Jul 18, 2008, at 1:20 PM, Andy Lee wrote: Unless Apple defines another adjective for this purpose, it seems to me that "autoreleased" is a reasonable shorthand for "you must retain it if you want it to stick around, or you *may* have a dangling pointer." Similarly, "retained" is a reasona

assertion failure in AppKit

2008-07-18 Thread Torsten Curdt
Hey guys, Some of my users are reporting an exception NSInternalInconsistencyException lockFocus sent to a view whose window is deferred and does not yet have a corresponding platform window This is in the logs: *** Assertion failure in -[NSThemeFrame lockFocus], AppKit.subproj/ NSView

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Matthew Williamson
Ok, looking more at the Quartz event tap stuff, there's more there than I thought--tablet stuff is there, for instance. But really, I still have the same problem, because I don't want to use the Carbon APIs (if I want my app to be 64-bit, I can't use any Carbon anyway, right?). I just tho

Re: Image name for drag and drop from Safari

2008-07-18 Thread Jens Alfke
On 18 Jul '08, at 12:23 AM, chaitanya pandit wrote: In my application, i allow users to drag and drop images from Safari, however while receiving the drop i cannot retrieve the image name from the pasteboard. If i get the data for URL pasteboard type, it gives the URL up to the image, and

Re: substitute class at runtime?

2008-07-18 Thread Nick Zitzmann
On Jul 18, 2008, at 12:00 PM, Nathaniel Gottlieb-Graham wrote: if ([classNameArray containsObject:nameOfClass]) { [[[??? alloc]initWithNibName:nameOfClass] autorelease] } How can I get the class name into the ??? part? Substitute the ?? with a Class data structure, which

Re: substitute class at runtime?

2008-07-18 Thread Andy Lee
NSClassFromString() --Andy On Jul 18, 2008, at 2:00 PM, Nathaniel Gottlieb-Graham wrote: I need to be able to initialize a class, but I don't necessarily know what kind of class it'll be at compile time. Consider the following example in which the name of a class is checked against an ar

substitute class at runtime?

2008-07-18 Thread Nathaniel Gottlieb-Graham
I need to be able to initialize a class, but I don't necessarily know what kind of class it'll be at compile time. Consider the following example in which the name of a class is checked against an array of class names, and if the name of the class is present in the array, a new instance of

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 1:20 PM, Andy Lee wrote: On Jul 18, 2008, at 10:49 AM, Shawn Erickson wrote: I should more clearly note that objectForKey: is not returning an "autoreleased" object. Also even if it did it would be an implementation detail (unless documented in the API docs). It is returning

Re: Did I reinvent the wheel?

2008-07-18 Thread Jean-Daniel Dupas
I don't think there is built-in support for this specific feature. If archiving, serialization and CoreData do not fit your needs, I bet you have to use your own method. That said, you should avoid to use an uninitialized variable in your code ;-) (outCount is used in array initializer before

Re: Xcode3 vs Xcode2 - two problems

2008-07-18 Thread Bill Bumgarner
On Jul 18, 2008, at 10:27 AM, Joeles Baker wrote: Oh my god - after all those years. Thank you. Sorry for this stupid question. But one thing remains. Why am I not able to drag the header of my class to the interface builder window? With Xcode2/IB2 you just had to drag the header file to the

Re: Xcode3 vs Xcode2 - two problems

2008-07-18 Thread Bill Bumgarner
On Jul 18, 2008, at 10:16 AM, Joeles Baker wrote: i just tried the following with Xcode3: 1) read a plist in awakeFromNib store its content in an array NSArray* myArray = [NSPropertyListSerialization 2) tried to setup my tableview like so: - (NSInteger)tableView:(UITableView *)table

Did I reinvent the wheel?

2008-07-18 Thread Jeff LaMarche
Hey, folks. I needed an easy way to turn dictionaries into objects and objects into dictionaries based on their properties. I didn't want to have to custom code this for each of the classes i was using, and I couldn't find that functionality in any of the existing objects, but I have this s

Re: NSMutableDictionary autorelease chrashes application

2008-07-18 Thread Andy Lee
On Jul 18, 2008, at 10:49 AM, Shawn Erickson wrote: I should more clearly note that objectForKey: is not returning an "autoreleased" object. Also even if it did it would be an implementation detail (unless documented in the API docs). It is returning a reference to an object that the vColors dic

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
On Jul 18, 2008, at 9:55 AM, Rick Hoge wrote: Thanks for the replies - seems like a custom view and possibly NSMatrix will do the job. I strongly recommend going with a view hierarchy instead of an NSMatrix. You don't need to create a custom view, either. Views nest; an instance of NSView

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Rick Hoge
Thanks for the replies - seems like a custom view and possibly NSMatrix will do the job. Rick On 18-Jul-08, at 12:38 PM, Chris Hanson wrote: On Jul 18, 2008, at 8:39 AM, Rick Hoge wrote: I expect this is a custom class created by Apple - does anyone know of an efficient way to replicate

[SOLVED] Image name for drag and drop from Safari

2008-07-18 Thread chaitanya pandit
Hi, Thanks for your reply, Clipboard viewer did the trick, Its the NSRTFDPboard type that contains the required data. // Get the rtfd data, get the attachment and then get the attachment name from it NSData *nameData = [[sender draggingPasteboard] dataForType:NSRTFDPboardType]; NSAttrib

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
On Jul 18, 2008, at 8:39 AM, Rick Hoge wrote: I expect this is a custom class created by Apple - does anyone know of an efficient way to replicate this type of view? One thought I had was to create a table with a single row and add the desired controls as cells. Just create a view and ad

Re: [SOLVED] NSButton alternate image problem - not redrawing

2008-07-18 Thread P Teeson
I solved it - thanks for not replying so I had to find out for myself. Seriously I appreciate it because I read more in Cocoa Drawing Guide and learned quite bit. respect Peter On 17-Jul-08, at 1:19 PM, P Teeson wrote: I posted about this issue but so far only one response. For the ful

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Shawn Erickson
On Fri, Jul 18, 2008 at 8:55 AM, Matthew Williamson <[EMAIL PROTECTED]> wrote: > but I need to be able to send Cocoa events into the system--meaning > CGPostMouseEvent won't cut it. > All the code examples I can find seem to use CGPostMouseEvent to accomplish > this kind of thing. But I need to

Re: Dispatch NSEvent to everyone

2008-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 08 à 17:55, Matthew Williamson a écrit : Hello list, Ok, I'm completely new to Cocoa programming, but I've been programming for 10 years, so I think I can figure this out. I'm trying to do something remotely similar to a VNC server (pun intended :-) ), but I need to be able t

Re: Problem compiling first Cocoa app

2008-07-18 Thread Matt Neuburg
On Fri, 18 Jul 2008 07:34:56 -0700, "Paul Denlinger" <[EMAIL PROTECTED]> said: >I'm working on my first Cocoa lesson at >http://www.cocoadevcentral.com/d/learn_cocoa/ >Everything works fine until I try to compile the app. I get error code 71. >Can you tell me what's wrong? Here is the error message

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Jean-Daniel Dupas
Le 18 juil. 08 à 17:39, Rick Hoge a écrit : I would like to include a view divider similar to the one used in Xcode at the top of the editor window (contains forward and back buttons, popups for selection of source file and function, as well as pulldowns for a number of functions). I ex

Dispatch NSEvent to everyone

2008-07-18 Thread Matthew Williamson
Hello list, Ok, I'm completely new to Cocoa programming, but I've been programming for 10 years, so I think I can figure this out. I'm trying to do something remotely similar to a VNC server (pun intended :-) ), but I need to be able to send Cocoa events into the system--meaning CGPostMou

Re: Authentication only for non admin login.

2008-07-18 Thread Gary L. Wade
Sorry, I didn't read your original post too carefully; it looks like you haven't even gotten to that point of authenticating. Check for examples using SFAuthorizationView; it creates the OS-standard lock/unlock icon and label and can prompt the user in the way you want. If you still need the u

Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Rick Hoge
I would like to include a view divider similar to the one used in Xcode at the top of the editor window (contains forward and back buttons, popups for selection of source file and function, as well as pulldowns for a number of functions). I expect this is a custom class created by Apple -

Re: Authentication only for non admin login.

2008-07-18 Thread Michael Ash
On Fri, Jul 18, 2008 at 4:02 AM, ninad walvekar <[EMAIL PROTECTED]> wrote: > hi, > I think I have precisely mentioned what I want to do in the first 2 lines of > my previous post. To add to it my current implementation is asking for a > user name and password for admin as well as standard user logi

  1   2   >