<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
    <channel>
        <title>Cocoa mail archive</title>
        <description><![CDATA[Cocoa and Xcode mail archive brought to you by Cocoabuilder.com]]></description>
        <link>http://www.cocoabuilder.com/archive/bydate/cocoa</link>
        <lastBuildDate>Wed, 08 Oct 2008 08:36:05 +0100</lastBuildDate>
        <generator>Mamasam RSSWriter</generator>
        <image>
            <url>http://www.cocoabuilder.com/imgs/banner.gif</url>
            <title>cocoabuilder.com logo</title>
            <link>http://www.cocoabuilder.com</link>
            <width>88</width>
            <height>31</height>
            <description>Feed provided by Cocoabuilder.com</description>
        </image>
        <language>en-us</language>
        <managingEditor>Bertrand Mansion</managingEditor>
        <item>
            <title>Getting pointer to NSWindowController</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/8/219701</link>
            <description><![CDATA[I am very new to cocoa and am trying to understand key value coding.&nbsp; I have<br />a document app wherein the NSDocument creates the NSWindowController which<br />loads a NIB that contains a NSView inside an NSWindow.&nbsp; The NSWindow<br />contains the NSView and also a couple of NSTextFields bound to numerical<br />properties owned by the NSWindowController.&nbsp; I then display current mouse<br />coordinates by using the following code in the NSView's mouse move handler:<br /><br />&nbsp; &nbsp; extern NSWindowController *wc;<br /><br />&nbsp; &nbsp; NSPoint loc = [event locationInWindow];<br /><br />&nbsp; &nbsp; loc.x -= [self frame].origin.x;<br /><br />&nbsp; &nbsp; loc.y -= [self frame].origin.y;<br /><br />&nbsp; &nbsp;  [wc setValue:[NSNumber numberWithDouble:(double) loc.y] forKey:@"ypos"<br />];<br /><br />&nbsp; &nbsp; [wc setValue:[NSNumber numberWithDouble:(double) loc.x] forKey:@"xpos"];<br /><br /><br />This works just fine when wc is a global pointer to the NSWindowController,<br />which I added out of desperation.&nbsp; But the following code, which I tried<br />first, doesnt work for getting wc:<br /><br /><br />&nbsp; &nbsp; NSWindow *w = [self window];<br /><br />&nbsp; &nbsp; NSWindowController *wc = [w windowController];<br /><br /><br />&nbsp; &nbsp; produces NULL for wc<br /><br /><br /><br />It seems I must be doing something wrong since the NSWindow class have a<br />property for NSWIndowController isnt documented to&nbsp; always return NULL.&nbsp; And<br />it is hard to believe that the architects of cocoa intended to require that<br />every bit of shared data be defined as global.<br /><br /><br />Any chance my overall approach is wrong?&nbsp; If so, what would be a more<br />conventional approach for having events processed by a view result in<br />updates to a control owned by the same window that owns the view?]]></description>
            <author>Nirias</author>
            <category>Cocoa</category>
            <pubDate>Wed, 08 Oct 2008 05:00:29 +0100</pubDate>
            <guid>a42631660810072200h45950f0na0fb02f90d061e97@mail.gmail.com</guid>
        </item>
        <item>
            <title>Bottombar appearance</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/8/219696</link>
            <description><![CDATA[Hi folks,<br />The Apple HIG describes bottombars but gives graphical examples that I can't achieve. They are using mainly iCalc as an example.<br /><br /><a href="http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/chapter_18_section_4.html#//apple_ref/doc/uid/20000961-SW6">http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/chapter_18_section_4.html#//apple_ref/doc/uid/20000961-SW6</a><br /><br />In iCalc, and iChat and probably many other Apple products the bottom bar and the toolbar has a black indentation line between the bar and the main content view giving a bas relief appearance to the main content. I've got a standard window, textured as per instructions with a Splitview in it (outlineView on left, tableView on right) but I can't get the same appearance. How is this done?<br /><br />On a related point, why do Apple insist on demanding we implement interface elements that don't appear to be out-of-the-box or aren't adequately described how to be achieved?<br /><br />Steven Hamilton | Solutions Designer | BT Infrastructure | Business Technology | Suncorp | Tel: 07 3135 4684<br />steven.&lt;email_removed&gt; | Level 27, Brisbane Square, 266 George Street, Brisbane<br /><br /><br /><br />________________________________<br />This e-mail is sent by Suncorp-Metway Limited ABN 66 010 831 722 or one of its related entities "Suncorp".<br />Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 13 11 55 or at suncorp.com.au.<br />The content of this e-mail is the view of the sender or stated author and does not necessarily reflect the view of Suncorp. The content, including attachments, is a confidential communication between Suncorp and the intended recipient. If you are not the intended recipient, any use, interference with, disclosure or copying of this e-mail, including attachments, is unauthorised and expressly prohibited. If you have received this e-mail in error please contact the sender immediately and delete the e-mail and any attachments from your system.<br />If this e-mail constitutes a commercial message of a type that you no longer wish to receive please reply to this e-mail by typing Unsubscribe in the subject line.]]></description>
            <author>HAMILTON, Steven</author>
            <category>Cocoa</category>
            <pubDate>Wed, 08 Oct 2008 03:18:56 +0100</pubDate>
            <guid>8C0D1570261B744CABA0885AA06697C9243BD420EC@PBNECRMSX4710.int.corp.sun</guid>
        </item>
        <item>
            <title>How can I access full source of a WebView</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/8/219688</link>
            <description><![CDATA[Hi<br /><br />I am trying to send the contents of a webwiew with email. I have found&nbsp; <br />several ways to do that, but there are minor problems.<br /><br />// &nbsp; &nbsp;get the attributes string of the webview<br /> &nbsp; &nbsp;id res = (id &lt;WebDocumentText&gt; )[[[myWebView mainFrame] frameView]&nbsp; <br />documentView];<br /> &nbsp; &nbsp;NSAttributedString *p = [res attributedString];<br /> &nbsp; &nbsp;NSPasteboard *pb = [NSPasteboard pasteboardWithName:@"PBtoMail"];<br /><br />// &nbsp; &nbsp;init a private pastebord for data transfer, this time use&nbsp; <br />webarchive for transfer<br /> &nbsp; &nbsp;[pb declareTypes:[NSArray arrayWithObject:NSRTFDPboardType]&nbsp; <br />owner:self];<br /><br />// &nbsp; &nbsp;convert the attributed string to rtfd and place it on the private&nbsp; <br />pasteboard<br /> &nbsp; &nbsp;NSRange range;<br /> &nbsp; &nbsp;range.location = 0;<br /> &nbsp; &nbsp;range.length = [p length];<br /> &nbsp; &nbsp;[pb setData:(NSData *)[p RTFDFromRange:range documentAttributes:nil&nbsp; <br />forType:NSRTFDPboardType];<br /> &nbsp; &nbsp;<br />// &nbsp; &nbsp;open mail window using the rtfd data using services...<br /> &nbsp; &nbsp;NSPerformService(@"Mail/Send Selection", pb);<br /> &nbsp; &nbsp;<br />This works, but quality is no so good. So I tried a different approach<br /><br />// &nbsp; &nbsp;init a private pastebord for data transfer, this time use&nbsp; <br />webarchive for transfer<br /> &nbsp; &nbsp;NSPasteboard *pb = [NSPasteboard pasteboardWithName:@"PBtoMail"];<br /> &nbsp; &nbsp;[pb declareTypes:[NSArray arrayWithObject:WebArchivePboardType]&nbsp; <br />owner:self];<br /><br />// &nbsp; &nbsp;get the webarchive and place it on pboard<br /> &nbsp; &nbsp;[pb setData:[[[myWebView mainFrameDocument] webArchive] data]&nbsp; <br />forType:WebArchivePboardType];<br /><br /> &nbsp; &nbsp;NSPerformService(@"Mail/Send Selection", pb);<br /><br />This works better. However external CSS code is not copied, which&nbsp; <br />makes the page look different. When I select all and copy from the&nbsp; <br />webview manualy and then paste it on a new mail window it works fine,&nbsp; <br />the external CSS is copied as well. Is there any way I get the full&nbsp; <br />source (including the external CSS) so that I can place it on the&nbsp; <br />pasteboard?<br /><br />Thanks in advance.]]></description>
            <author>&amp;Ouml;mer Karda?</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 22:45:22 +0100</pubDate>
            <guid>C7708367-85BF-4CB6-99AF-0D4F94825E4D@me.com</guid>
        </item>
        <item>
            <title>Trouble with NSSplitView</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/7/219683</link>
            <description><![CDATA[Hi,<br /><br />I have set up in IB a window with 3 split views. The main split view&nbsp; <br />(with a vertical divider) contains 2 splits (horizontal divider):<br /><br />**************************************<br />*&nbsp; &nbsp;  *&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  *<br />*&nbsp; 1&nbsp; ********************************<br />*&nbsp; &nbsp;  *&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *<br />*&nbsp; &nbsp;  *&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *<br />*******&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  *<br />*&nbsp; &nbsp;  *&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *<br />*&nbsp; 2&nbsp; *&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *<br />**************************************<br /><br />I'm using an NSViewController subclass (with an associated nib) for&nbsp; <br />each of the views. In the - windowDidLoad: method of my&nbsp; <br />NSWindowController subclass, I set dividers positions and add each&nbsp; <br />view, resizing it according to the size available in each pane. I'm&nbsp; <br />testing this interface so all views contain dummy controls:<br /><br />1- has only buttons<br />2- has only a Date picker in calendar form<br />3- has a multiline text view (with scroller) and 2 buttons.<br />4- has a NSTableView<br /><br /><br />At launch, everything is good and I've no problem changing the&nbsp; <br />splitter's position between pane 1 and 2 or with the vertical divider.&nbsp; <br />Now, if I change the splitter's position between pane 3 and 4 all the&nbsp; <br />way up or down and back, the header of the NSTableView and the top of&nbsp; <br />the text view, become hidden (under the divider). I've tried many&nbsp; <br />combinations of resize/lock for these views in IB, played various&nbsp; <br />constants with -setAutoresizingMask:. No luck. Either I'm missing the&nbsp; <br />good one, or I'm in the wrong track. This is driving me nuts, any&nbsp; <br />advice on getting the good combination?<br /><br />Thanks,<br /><br />Andre Masse]]></description>
            <author>Andre Masse</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 21:41:30 +0100</pubDate>
            <guid>DEBA6C3E-0445-49E0-8CBF-5A86A3AD721B@videotron.ca</guid>
        </item>
        <item>
            <title>Cocoaheads Lake Forest (92630) meeting 10/8/2008 at 7 pm on 	&quot;Parallel Processing with a ...</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/7/219682</link>
            <description><![CDATA[Hello, all,<br /><br />CocoaHeads Lake Forest will be meeting on the second Wednesday in<br />October, 10/8, from 7 to 9 PM.&nbsp; We will meet in our usual location at<br />the Orange County Public Library (El Toro) community room, 24672<br />Raymond Way, Lake Forest, CA 92630.&nbsp; The A/C has been fixed, and there<br />is much rejoicing.<br /><br />James Gregurich will be speaking on parallel processing with a Core Data store.<br /><br />This will cover some of the basics of Core Data, such as setting up a<br />simple schema and displaying it in a table view, as well as how to<br />load data in multiple threads.<br /><br />Bring your comments, your books, and your bugs, and we will leap right in.<br /><br />As always, details can be found on the cocoaheads web site at<br />www.cocoaheads.org.<br /><br />Thanks go to O'Reilly Media for providing us one of their books as a door prize.<br /><br />Note: if you receive this directly from me, and no longer wish to,<br />please reply offlist, and I will pull you from future mailings.]]></description>
            <author>Scott Ellsworth</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 21:39:24 +0100</pubDate>
            <guid>55ded9420810071439l224d818ev612faf0cacc15651@mail.gmail.com</guid>
        </item>
        <item>
            <title>Getting the values from the selected row of a table?</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/7/219668</link>
            <description><![CDATA[I need to get the value of the primary key (shown in the table) of the<br />selected row of my table, no matter how the table is sorted interactively.<br /><br />I'm able to get the selected row index, but this seems to give the<br />"geographic" index of the selected row in the table, as sorted.<br /><br />So far, I've solved my problem by ensuring that the table source is sorted<br />by it's primary key, and blocking sorting in the table itself.&nbsp; This is not<br />too bad&nbsp; for my application (in it's current state, at least),&nbsp; but<br />eventually I'd like to be able to sort the table interactively and map the<br />selection back to the original data.<br /><br />I'm using IB and key value binding, and registering a notification to get<br />the fact of selection did change.<br /><br /><br />Thanks,<br /><br />John Velman]]></description>
            <author>John Velman</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 18:55:21 +0100</pubDate>
            <guid>20081007185521.GB213@cox.net</guid>
        </item>
        <item>
            <title>Next Key View doesn't &quot;go to&quot; pushbutton</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/7/219664</link>
            <description><![CDATA[I've got a number of text boxes to be filled in by the user.&nbsp; Tab order<br />works fine using next key view in IB.&nbsp; After filing the last box, I'd like<br />the user to be able to tab to a "commit" button, but next key view doesn't<br />go there, even though the IB heads up boxes and inspector panes show that<br />it does.<br /><br />Ideally, tabbing to the Commit button would bring it into focus, light its<br />focus ring, and the allow the user to press "enter" (or "return" :-). to<br />commit the data.&nbsp; Then the next key view would recycle to the first in the<br />sequence of text fields.&nbsp; <br /><br />Seems that this should be possible to set up in IB, but&nbsp; dogon if I'm<br />seein' a way to do it (been watching too much campaign TV lately).<br /><br />Related question:&nbsp; How can I (again in IB) set it so the return key follows<br />the next key view sequence as well as tab key does?<br /><br />Neither Hillgass nor Anderson seem to cover these (I admit I read<br />impatiently and rely on the index a lot), and the Apple documentation (and<br />various archives) are so extensive I haven't been able to hit exactly the<br />key words to get to the answers.<br /><br />Best,<br /><br />John Velman]]></description>
            <author>John Velman</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 18:47:04 +0100</pubDate>
            <guid>20081007184703.GA213@cox.net</guid>
        </item>
        <item>
            <title>File's owner as target of button-action</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/7/219665</link>
            <description><![CDATA[I have a nib-file with the File's Owner class set to my own subclass of<br />NSViewController. The nib-file also contains a custom view with a button whose<br />target and action is set to a method in File's Owner.<br /><br />The trouble is that I get EXC_BAD_ACCESS when I click the button and it tries<br />to call my action method.<br /><br />I guess I have misunderstood something here. Is there something special about<br />File's Owner that prevents this from working?<br /><br />Regards,<br /><br />Andreas]]></description>
            <author>Andreas Eriksson</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 18:34:21 +0100</pubDate>
            <guid>1f4b35e00810071134u157a5afdi15bc7cddb85cff76@mail.gmail.com</guid>
        </item>
        <item>
            <title>Re: IKImageView and delegate callback/notification of image</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/7/219650</link>
            <description><![CDATA[<span class="quoted1">&gt; On Tue, 7 Oct 2008 at 09:38:01, Jim Turner said:<br />&gt;<br />&gt; Binding to my IKImageView's "image" property nets the following:<br />&gt;<br />&gt; [&lt;IKImageView 0x1adc6e60&gt; addObserver:&lt;MyController 0x1adc3c30&gt;<br />&gt; forKeyPath:@"image" options:0x7 context:0x1adc3c30] was sent to an<br />&gt; object that is not KVC-compliant for the "image" property.<br />&gt;<br />&gt; Is "image" not the key to which I should be binding?<br />&gt;<br /></span><br /><br />Hi Jim.&nbsp; I've also been fooling around with IKImageView and -- if&nbsp; <br />nothing else -- I have at least figured out what the delegate does and&nbsp; <br />what delegate methods get called under what circumstances.<br /><br />If this is of any interest, let me know.<br />Dave]]></description>
            <author>Dave Jewell</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 16:34:37 +0100</pubDate>
            <guid>EA93D1B6-1051-4165-B556-4AF8D662E823@mac.com</guid>
        </item>
        <item>
            <title>Appropriate use of bindings?</title>
            <link>http://www.cocoabuilder.com/archive/message/cocoa/2008/10/7/219649</link>
            <description><![CDATA[I'm having a slight dilemma in deciding which I should use, notifications or bindings.&nbsp; Here is the background: <br /><br />I have a bunch of C++ code that uses something akin to delegates; you derive from a base class, pass that into an instance of a server class, and the server class calls the delegate at appropriate times.&nbsp; I wanted to cleanly encapsulate all of this in Objective-C, so that the rest of my code can be pure Objective-C, so wrote wrappers for each base class.&nbsp; Now, I pass the internally wrapped C++ instance to the server, while the rest of my code will hook up to Objective-C wrapper.<br /><br />My dilemma is how to do this hookup; I can use either notifications or bindings, but I can't decide which is better in this situation.&nbsp; Bindings seem to be simpler to use, but reading about them suggests that you are expected to use the MVC design pattern, and I'm not doing MVC here. Notifications are used anywhere you want, but require more (and more careful) work to get right.&nbsp; So, are bindings considered general purpose, or should they really be reserved for MVC situations (even though they can work anywhere)?<br /><br />Thanks,<br />Cem Karan]]></description>
            <author>Karan, Cem (Civ, ARL/CISD)</author>
            <category>Cocoa</category>
            <pubDate>Tue, 07 Oct 2008 16:31:10 +0100</pubDate>
            <guid>E3A5474D13D5CE4BABB8F088DF4060C8C8947A@ADLCAML03.DS.ARL.ARMY.MIL</guid>
        </item>
    </channel>
</rss>
