Help

  • Cheers,
    Pucky

    Sent from my iPhone

    On Jan 19, 2008, at 7:17 PM, <cocoa-dev-request...> wrote:

    > Send Cocoa-dev mailing list submissions to
    > <cocoa-dev...>
    >
    > To subscribe or unsubscribe via the World Wide Web, visit
    > http://lists.apple.com/mailman/listinfo/cocoa-dev
    > or, via email, send a message with subject or body 'help' to
    > <cocoa-dev-request...>
    >
    > You can reach the person managing the list at
    > <cocoa-dev-owner...>
    >
    > When replying, please edit your Subject line so it is more specific
    > than "Re: Contents of Cocoa-dev digest..."
    >
    >
    > Today's Topics:
    >
    > 1. Re: What happens when I call NSMakeCollectable on a
    > CFArrayRef? (mmalc crawford)
    > 2. Re: why are there zero examples in the cocoa docs?! (Joeles
    > Baker)
    > 3. Re: why are there zero examples in the cocoa docs?! (Hamish
    > Allan)
    > 4. Re: What happens when I call NSMakeCollectable on a
    > CFArrayRef? (Clark Cox)
    > 5. Re: Linking against HIServices? (Twisted Theory Software)
    > 6. Re: why are there zero examples in the cocoa docs?! (Scott
    > Andrew)
    > 7. Multiple Views and NSWindowController (Philip Bridson)
    > 8. Re: why are there zero examples in the cocoa docs?! (I. Savant)
    > 9. Re: Multiple Views and NSWindowController (Scott Andrew)
    > 10. Scripting: Dynamic properties possible (straightforwardly)?
    > (Luke Evans)
    > 11. Re: "Convert to Objective-c 2.0" (Bill Bumgarner)
    > 12. Re: Multiple Views and NSWindowController (Philip Bridson)
    > 13. Re: How do I add a framework to XCode? (arri mafkees)
    > 14. Re: designing beyond MV and (one) C (Ken Thomases)
    > 15. Where should AppleScripts reside? (Devraj Mukherjee)
    >
    >
    > ----------------------------------------------------------------------
    >
    > Message: 1
    > Date: Sat, 19 Jan 2008 15:04:49 -0800
    > From: mmalc crawford <mmalc_lists...>
    > Subject: Re: What happens when I call NSMakeCollectable on a
    > CFArrayRef?
    > To: Andrew Thompson <lordpixel...>
    > Cc: cocoa dev <cocoa-dev...>
    > Message-ID: <6088EE78-B273-44CA-8CD8-109A5AFACC5A...>
    > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
    >
    >
    > On Jan 19, 2008, at 2:56 PM, Andrew Thompson wrote:
    >
    >> I want to call a Core function that returns a CFArrayRef and make
    >> the result garbage collectable.
    >> The CFArray contains CFStrings...
    >> Is this pattern OK?
    >> -(NSArray *) doFoo {
    >> return NSMakeCollectable(CFCopyFoo(someArgs));
    >> }
    >> Where CFCopyFoo returns a new CFArray containing copied CFStrings.
    >>
    > {CF,NS}MakeCollectable only apply to the argument:
    > <http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection
    /Articles/gcCoreFoundation.html
    >>
    >
    > mmalc
    >
    >
    >
    > ------------------------------
    >
    > Message: 2
    > Date: Sun, 20 Jan 2008 00:11:09 +0100
    > From: Joeles Baker <joelesbaker...>
    > Subject: Re: why are there zero examples in the cocoa docs?!
    > To: <cocoa-dev...>
    > Message-ID: <E0B94B6F-F96A-4248-81DC-BD725E734A10...>
    > Content-Type: text/plain; charset=US-ASCII; format=flowed
    >
    > Hi I. Savant, Andrew, Kyle,
    >
    > just wanted to say thank you for all your comments.
    > I hope they'll help me on my way.
    >
    > :-)
    >
    > best
    >
    > --Joeles
    >
    >
    > ------------------------------
    >
    > Message: 3
    > Date: Sat, 19 Jan 2008 23:16:18 +0000
    > From: "Hamish Allan" <hamish...>
    > Subject: Re: why are there zero examples in the cocoa docs?!
    > To: "Joeles Baker" <joelesbaker...>
    > Cc: <cocoa-dev...>
    > Message-ID:
    > <597e7edb0801191516s61355bf1o622060631aa0c30c...>
    > Content-Type: text/plain; charset=ISO-8859-1
    >
    > On Jan 19, 2008 7:47 PM, Joeles Baker <joelesbaker...>
    > wrote:
    >
    >> why does the documentation suck so much (for beginners)? :-)
    > ...
    >> "Each array element is an NSDictionary containing key-value pairs."
    > ...
    >> but i have really no idea how that chapterarray should look like :-/
    > ...
    >> looking forward for the "initial hint" that will hopefully light the
    >> spark :-)
    >
    > My initial hint would be: if you approach mailing lists with humility
    > rather than casting aspersions, you're less likely to be told to RTFM.
    >
    > My follow-up hint would be: if you don't know what an NSDictionary
    > is, RTFM!
    >
    > Hamish
    >
    > P.S. Please read this email tongue-in-cheek; if others hadn't already
    > made such constructive replies, I'd have tried to be more helpful :)
    >
    >
    > ------------------------------
    >
    > Message: 4
    > Date: Sat, 19 Jan 2008 15:17:41 -0800
    > From: "Clark Cox" <clarkcox3...>
    > Subject: Re: What happens when I call NSMakeCollectable on a
    > CFArrayRef?
    > To: "Andrew Thompson" <lordpixel...>
    > Cc: cocoa dev <cocoa-dev...>
    > Message-ID:
    > <ca1720e90801191517y62fa10cdqfd27ed4892edb2f4...>
    > Content-Type: text/plain; charset=UTF-8
    >
    > On Jan 19, 2008 2:56 PM, Andrew Thompson <lordpixel...> wrote:
    >> I want to call a Core function that returns a CFArrayRef and make the
    >> result garbage collectable.
    >> The CFArray contains CFStrings...
    >>
    >> Is this pattern OK?
    >>
    >> -(NSArray *) doFoo {
    >> return NSMakeCollectable(CFCopyFoo(someArgs));
    >> }
    >>
    >> Where CFCopyFoo returns a new CFArray containing copied CFStrings.
    >
    > This will make the array collectable, but will do nothing to the items
    > contained therein; the contents are still reference counted. However,
    > this is most likely what you want anyway (Just as in pre-GC code, when
    > an item is removed from the array, or the array itself is
    > collected/deallocated, the item will have its reference count
    > decremented, and will be deallocated if that was the last remaining
    > reference).
    >
    >> Or do I have to iterate over the array and call NSMakeCollectable on
    >> each item in it?
    >
    > That would do something completely different, and would not be a good
    > idea (it would be akin to calling CFRelease on each of the items).
    >
    > --
    > Clark S. Cox III
    > <clarkcox3...>
    >
    >
    > ------------------------------
    >
    > Message: 5
    > Date: Sat, 19 Jan 2008 17:22:20 -0600
    > From: Twisted Theory Software <developer...>
    > Subject: Re: Linking against HIServices?
    > To: cocoadev <cocoa-dev...>
    > Message-ID:
    > <DCF82682-9A5A-4239-B880-85B8E40DFF57...>
    > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
    >
    >
    > On 19 Jan, 2008, at 4:58 PM, Kyle Sluder wrote:
    >
    >> On 1/19/08, Twisted Theory Software <developer...>
    >>> wrote:
    >>> I'm trying to use the private API CoreMenuExtraAddMenuExtra(), which
    >>> is compiled into HIServices.  However, adding its umbrella
    >>> framework,
    >>> ApplicationServices, does not link correctly.  I'm working in
    >>> Leopard,
    >>> but compiling against 10.4u SDK.
    >>
    >> On Tiger:
    >>
    >> $ strings /System/Library/Frameworks/ApplicationServices.framework/
    >> Frameworks/HIServices.framework/Versions/A/HIServices
    >> |grep Menu |wc -l
    >> 0
    >>
    >> So it doesn't exist?
    >
    > Try:
    > $ grep CoreMenuExtraAddMenuExtra /System/Library/Frameworks/
    > ApplicationServices.framework/Frameworks/HIServices.framework/
    > Versions/
    > A/HIServices
    > Binary file /System/Library/Frameworks/ApplicationServices.framework/
    > Frameworks/HIServices.framework/Versions/A/HIServices matches
    > $
    >
    > Josh
    >
    >
    > ------------------------------
    >
    > Message: 6
    > Date: Sat, 19 Jan 2008 15:24:34 -0800
    > From: Scott Andrew <scottandrew...>
    > Subject: Re: why are there zero examples in the cocoa docs?!
    > To: Hamish Allan <hamish...>
    > Cc: "<cocoa-dev...>" <cocoa-dev...>
    > Message-ID: <7AFCEC32-17B2-4FCC-A727-C436E3A3FFF5...>
    > Content-Type: text/plain;    charset=US-ASCII;    format=flowed;
    > delsp=yes
    >
    >
    >
    > Sent from my iPod
    >
    > On Jan 19, 2008, at 3:16 PM, "Hamish Allan" <hamish...> wrote:
    >
    >> On Jan 19, 2008 7:47 PM, Joeles Baker <joelesbaker...>
    >> wrote:
    >>
    >>> why does the documentation suck so much (for beginners)? :-)
    >> ...
    >>> "Each array element is an NSDictionary containing key-value pairs."
    >> ...
    >>> but i have really no idea how that chapterarray should look like :-/
    >> ...
    >>> looking forward for the "initial hint" that will hopefully light the
    >>> spark :-)
    >>
    >> My initial hint would be: if you approach mailing lists with humility
    >> rather than casting aspersions, you're less likely to be told to
    >> RTFM.
    >>
    >> My follow-up hint would be: if you don't know what an NSDictionary
    >> is, RTFM!
    >>
    >> Hamish
    >>
    >> P.S. Please read this email tongue-in-cheek; if others hadn't already
    >> made such constructive replies, I'd have tried to be more helpful :)
    >
    >
    > ------------------------------
    >
    > Message: 7
    > Date: Sat, 19 Jan 2008 23:29:55 +0000
    > From: Philip Bridson <philipleebridson...>
    > Subject: Multiple Views and NSWindowController
    > To: Cocoa Development <cocoa-dev...>
    > Message-ID: <D149A758-0356-4AF0-B3F9-806A2D48CFE9...>
    > Content-Type: text/plain;    charset=US-ASCII;    delsp=yes;
    > format=flowed
    >
    > I have recently been working on using multiple nibs in a file. I had
    > no trouble loading nibs but I could not change the view. Now I can
    > load the view but cannot display windows, I don't understand why this
    > is as I have not changed the code that I used to open the window.
    > Below is an excerpt from my app.
    >
    > //This is the header file for my Window Controller
    >
    > @interface MyWindowController : NSWindowController {
    >
    > IBOutlet NSWindow    *myWindow;
    > IBOutlet NSBox        *myBox;
    > IBOutlet NSView        *primaryView;
    > IBOutlet NSView        *subView;
    > }
    >
    > -(IBAction)cancel:(id)sender;
    > -(IBAction)previous:(id)sender;
    > -(IBAction)next:(id)sender;
    >
    > @end
    >
    > //Implementation File
    >
    > @implementation MyWindowController
    >
    > -(IBAction)cancel:(id)sender
    > {
    > [self close];
    > [self release];
    > }
    >
    > -(IBAction)previous:(id)sender
    > {
    > [subView removeFromSuperview];
    > [myBox addSubview:primaryView];
    > }
    >
    > -(IBAction)next:(id)sender
    > {
    > [primaryView removeFromSubview];
    > [myBox addSubview:subView];
    > }
    >
    > @end
    >
    > //Action Controller - creates an instance of the window.
    >
    > @interface MyAction : NSObject {
    >
    > }
    >
    > -(IBAction)openEditWindow;
    >
    > @end
    >
    > //Implementation
    >
    > @Implementation MyAction
    >
    > -(IBAction)openEditWindow
    > {
    > NSWindowController *_newWindow = [[NSWindowController alloc]
    > initWindowWithNibName:@"MyNib"];
    > [_newWindow showWindow:self];
    > }
    >
    > @end
    >
    > I had been opening windows like this via a button press from a
    > seperate nib and it had been working fine. Now I can't get it to do
    > anything. Also,, how do I initialize myBox to have primaryView
    > displayed when I load the nib? Previously, when the code above did
    > work, myBox would appear in the window bu would have no subview.
    >
    > Thanks guys...
    >
    > Phil
    >
    >
    >
    > ------------------------------
    >
    > Message: 8
    > Date: Sat, 19 Jan 2008 18:34:27 -0500
    > From: "I. Savant" <idiotsavant2005...>
    > Subject: Re: why are there zero examples in the cocoa docs?!
    > To: Boyd Collier <bcollier...>
    > Cc: Cocoa-Dev Apple <cocoa-dev...>
    > Message-ID: <2FEE1224-446D-4209-A21E-B27F54078E82...>
    > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
    >
    > On Jan 19, 2008, at 5:59 PM, Boyd Collier wrote:
    >
    >> Objective-C is a superset of C, not C++, as I'm sure he knows.
    >> Thought I should mentioned it, lest the originator of the original
    >> question (rant?) thinks he needs to start learning C++ (God forbid).
    >
    >
    > Of course you're right. I always say "C++" for some reason. :-)
    >
    > --
    > I.S.
    >
    >
    >
    >
    >
    >
    > ------------------------------
    >
    > Message: 9
    > Date: Sat, 19 Jan 2008 15:42:38 -0800
    > From: Scott Andrew <scottandrew...>
    > Subject: Re: Multiple Views and NSWindowController
    > To: Philip Bridson <philipleebridson...>
    > Cc: Cocoa Development <cocoa-dev...>
    > Message-ID: <9BD10609-0434-4DB9-8935-49A85ACD797F...>
    > Content-Type: text/plain;    charset=US-ASCII;    format=flowed;
    > delsp=yes
    >
    > So the obvious question is do you have the controller's window
    > variable pointing to the window in the nob file?
    >
    > On Jan 19, 2008, at 3:29 PM, Philip Bridson <philipleebridson...>
    > wrote:
    >
    >> I have recently been working on using multiple nibs in a file. I had
    >> no trouble loading nibs but I could not change the view. Now I can
    >> load the view but cannot display windows, I don't understand why
    >> this is as I have not changed the code that I used to open the
    >> window. Below is an excerpt from my app.
    >>
    >> //This is the header file for my Window Controller
    >>
    >> @interface MyWindowController : NSWindowController {
    >>
    >> IBOutlet NSWindow    *myWindow;
    >> IBOutlet NSBox        *myBox;
    >> IBOutlet NSView        *primaryView;
    >> IBOutlet NSView        *subView;
    >> }
    >>
    >> -(IBAction)cancel:(id)sender;
    >> -(IBAction)previous:(id)sender;
    >> -(IBAction)next:(id)sender;
    >>
    >> @end
    >>
    >> //Implementation File
    >>
    >> @implementation MyWindowController
    >>
    >> -(IBAction)cancel:(id)sender
    >> {
    >> [self close];
    >> [self release];
    >> }
    >>
    >> -(IBAction)previous:(id)sender
    >> {
    >> [subView removeFromSuperview];
    >> [myBox addSubview:primaryView];
    >> }
    >>
    >> -(IBAction)next:(id)sender
    >> {
    >> [primaryView removeFromSubview];
    >> [myBox addSubview:subView];
    >> }
    >>
    >> @end
    >>
    >> //Action Controller - creates an instance of the window.
    >>
    >> @interface MyAction : NSObject {
    >>
    >> }
    >>
    >> -(IBAction)openEditWindow;
    >>
    >> @end
    >>
    >> //Implementation
    >>
    >> @Implementation MyAction
    >>
    >> -(IBAction)openEditWindow
    >> {
    >> NSWindowController *_newWindow = [[NSWindowController alloc]
    >> initWindowWithNibName:@"MyNib"];
    >> [_newWindow showWindow:self];
    >> }
    >>
    >> @end
    >>
    >> I had been opening windows like this via a button press from a
    >> seperate nib and it had been working fine. Now I can't get it to do
    >> anything. Also,, how do I initialize myBox to have primaryView
    >> displayed when I load the nib? Previously, when the code above did
    >> work, myBox would appear in the window bu would have no subview.
    >>
    >> Thanks guys...
    >>
    >> Phil
    >
    >
    > ------------------------------
    >
    > Message: 10
    > Date: Sat, 19 Jan 2008 15:48:29 -0800
    > From: Luke Evans <luke...>
    > Subject: Scripting: Dynamic properties possible (straightforwardly)?
    > To: Cocoa-Dev Dev <cocoa-dev...>
    > Message-ID: <0900D1CC-4A79-4864-BB03-8670194329E5...>
    > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
    >
    > I have an object that (amongst other things) can hold a set of
    > 'variables'.  These are simply name/value pairs, and the value is
    > polymorphic (in fact, they are NSMutableObjects with a 'value' field
    > that corresponds to the storage types in Core Data).
    >
    > The behaviour of the 'variables' is supposed to be simple.  Ergo, if
    > you ask for a variable by name that doesn't exist, you get nil, but
    > you can set a value to a name that doesn't exist, in which case a new
    > variable is added to the set, with the right value type (i.e the
    > construction of the variable is hidden/automatic).
    >
    > In the basic code I have chosen (for convenience I thought) to
    > implement a form of dynamic key on the container object for the
    > variables, such that it responds to valueWithKey: and setValue:withKey
    > for any key path that is prefixed by "variable.".  Whether or not this
    > is a great idea is another matter, but it allows the container object
    > to react directly to values, rather than introducing another level of
    > object the 'variable' itself, which is then indirected to get the
    > value properly (though this is exactly what happens in the model - the
    > dynamic key stuff is just a short-cut).
    >
    > Now that I'm going through adding scriptability for this stuff, I'm
    > somewhat hoisted by my own petard.  In order to mirror the convenience
    > of being able to get/set variables on the top level container object,
    > I would need to be able to describe dynamic keys in my sdef file, and
    > then (presumably) my existing KVC accessors would work, so long as the
    > key was allowed to be of the right form "variable.<varName>" - though
    > this might itself be a pipedream.
    >
    > If I go more with the flow of regular scripting, then I suppose I
    > ought to expose the 'variables' layer, so you could get the variable
    > with a specific na
  • On Jan 19, 2008 7:37 PM, Pucky Loucks <pucky...> wrote:
    >
    >
    > Cheers,
    > Pucky

    Unless I'm missing something, you didn't actually include any content
    in your message. Additionally, it's usually best to compose a new
    message to the list instead of replying to a message from the list.

    --
    Clark S. Cox III
    <clarkcox3...>
previous month january 2008 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today