When is the - (id)init method not called for an Objective-C class?

2008-12-30 Thread Michael A. Crawford
I have an init method for an NSView sub-class that is never called. Not expert enough with Objective-C to understand why? Anyone have a clue? -Michael -- The united stand. The divided get played. -- Bernie MAC smime.p7s Description: S/MIME cryptographic signature _

Re: When is the - (id)init method not called for an Objective-C class?

2008-12-30 Thread Andrew Farmer
On 30 Dec 08, at 00:24, Michael A. Crawford wrote: I have an init method for an NSView sub-class that is never called. Not expert enough with Objective-C to understand why? Anyone have a clue? The designated initializer for NSView is initWithFrame:, IIRC. __

Re: When is the - (id)init method not called for an Objective-C class?

2008-12-30 Thread Marcus S. Zarra
Normally on a NSView the -initWithFrame: is called rather than the - init method Marcus S. Zarra Zarra Studios LLC Simply Elegant Software for OS X www.zarrastudios.com On Dec 30, 2008, at 1:24 AM, Michael A. Crawford wrote: I have an init method for an NSView sub-class that is never called.

Re: When is the - (id)init method not called for an Objective-C class?

2008-12-30 Thread Stephen J. Butler
On Tue, Dec 30, 2008 at 2:24 AM, Michael A. Crawford wrote: > I have an init method for an NSView sub-class that is never called. Not > expert enough with Objective-C to understand why? Anyone have a clue? The documentation for awakeFromNib lists the scenarios and what messages are sent:

Re: When is the - (id)init method not called for an Objective-C class?

2008-12-30 Thread Jean-Daniel Dupas
Le 30 déc. 08 à 09:29, Andrew Farmer a écrit : On 30 Dec 08, at 00:24, Michael A. Crawford wrote: I have an init method for an NSView sub-class that is never called. Not expert enough with Objective-C to understand why? Anyone have a clue? The designated initializer for NSView is initWi

Safari Contextual Menu

2008-12-30 Thread Bryan Hansen
I'm interested in creating a contextual menu in Safari and other apps based on the text or selection the user clicked on. It seems like there are some apps that pull this off, but there doesn't seem to be a straightforward method. Do I need to create a CMM plugin? I've looked at the CMM exa

Re: NSOutlineView

2008-12-30 Thread Mahaboob
Hi Chaitanya, I tried it then it fires the event - (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item and it returns 0. But when I'm selecting the same table from the popupButton then it returns the actual number of children. Why this happens? Thanks mahaboob On 12/

SOAP Client - OpenSource - looking for supporting developpers

2008-12-30 Thread Marc De Roover
Ladies & Gentlemen, Allow me te introduce to you some superb developer tools by Todd Ditchendorf: http://www.scan.dalo.us/ One of these tools is SOAP Client: SOAP Client is a free Cocoa-based developer tool for Mac OS X Tiger that allows you access and debug WSDL & SOAP-based Web Se

Re: NSOutlineView

2008-12-30 Thread Mahaboob
I put breakpoint there but the OutlineView shows nil. On 12/30/08 2:49 PM, "Timothy Larkin" wrote: > I would put a breakpoint there and confirm that OutlineView is not nil > when you call reloadData. > > Sent from my iPhone > > On Dec 30, 2008, at 3:57 AM, Mahaboob wrote: > >> I'm calling t

Re: NSOutlineView

2008-12-30 Thread Graham Cox
On 30 Dec 2008, at 8:39 pm, Mahaboob wrote: I'm calling this method from the action method that opens this window. I used the code: - (IBAction) openMediaWindow: (id) sender { [cbChooseDatabase selectItemWithTitle:@"Default table"]; [self medialistSelectionChanged]; [OutlineView reloadDat

Re: NSOutlineView

2008-12-30 Thread Mahaboob
When I'm calling [self medialistSelectionChanged]; from - (IBAction) openMediaWindow: (id) sender, OutlineView shows 0x0 and when I'm calling the same method from -(IBAction) comboSelectionChanged: (id) sender then OutlineView shows 0x14c460 in debugger. On 12/30/08 3:09 PM, "Mahaboob" wrote:

RE: RE: NSColorWell shows no color

2008-12-30 Thread tobias assmann
Hi thanx for your answer, I know it is an unusual place for setting the color. Putting the code in the awakeFromNib makes no difference for my problem. The color is not drawn in the NSColorWell until I click it. I have still no idea what this is all about. Tobias _

Re: NSColorWell shows no color

2008-12-30 Thread Graham Cox
On 30 Dec 2008, at 9:40 pm, tobias assmann wrote: I know it is an unusual place for setting the color. It's not unusual, it's wrong. When the colour well's setColor: method is called, one thing it will do is invalidate itself by calling setNeedsDisplay: which will cause drawRect: to get

RE: NSColorWell shows no color

2008-12-30 Thread tobias assmann
Hi, I changed the place of the initialization now. Still no difference.. The colors are valid. I checked this and also tried with predefined colors like [NSColor greenColor]. It seems a very strange problem to me. So am I right if I think, the colors should be drawn after they are set? Would ma

Re: NSColorWell shows no color

2008-12-30 Thread Graham Cox
On 30 Dec 2008, at 10:09 pm, tobias assmann wrote: I changed the place of the initialization now. Still no difference.. The colors are valid. I checked this and also tried with predefined colors like [NSColor greenColor]. It seems a very strange problem to me. So am I right if I think, the

[NSImageView animator] - will this animate setImage: ?

2008-12-30 Thread Benjámin Salánki
Hi all, I was playing around with core animation and was wondering if sending animator to a view, specifically an NSImageView, will it only manage animation of bounds and size and rotation changes or can it too be used for changing the contents of the NSImageView? I am trying to animate t

Paginated PDF from NSView saved in memory

2008-12-30 Thread Dragan Milić
Hello all, Is there any way of saving paginated multipage PDF created with NSPrintOperation into memory? What I need to do is to create multiple PDF out of the NSTextView and put it into the memory buffer. The PDF document should be properly paginated, and NSTextView can hold RTFD attribu

Re: Create UILabel to fit into text size

2008-12-30 Thread Devon Ferns
Here's how I do it for a UIButton which is centered in the view/window and has some padding added around the text. You'll most likely have to set a maximum size for your label width as well and change the font size to suit your needs. #import NSString* buttonText; CGSize fontSize = [button

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread Michael Ash
On Mon, Dec 29, 2008 at 11:49 PM, Steve Cronin wrote: > Folks; > > I have some methods which might be handled by one of several objects. > So I have a set of if ( [objectX respondsToSelector:@selector(foo)] ) > {... } else if ( [objectY respondsToSelector:@selector(foo)] ) {... } > > The f

Re: Saving unseen NSView with subviews to NSImage

2008-12-30 Thread Michael Ash
On Tue, Dec 30, 2008 at 1:11 AM, John Kestner wrote: > So am I right in believing that drawRect: should not need to be explicitly > called in each subview from within my custom view's drawRect:? In any case, > see if you can make sense of this... > > > // This is in my controller: > - (IBAction) s

Re: Tweaking a window size

2008-12-30 Thread Michael Ash
On Tue, Dec 30, 2008 at 1:48 AM, Graham Cox wrote: > One of my windows has a delegate implementing the -windowWillResize:toSize: > method. This forces the window size to be certain whole multiples of rows in > a matrix of icons, the idea being to prevent the user from sizing the window > so that o

Re: Scrollwheel ignores line scroll setting in NSScrollView - bug?

2008-12-30 Thread Michael Ash
On Mon, Dec 29, 2008 at 10:02 PM, Graham Cox wrote: > The scrollwheel input ignores NSScrollView's -setVerticalLineScroll: > setting. > > Is this intentional, or should I file a bug? > > Is there a way to fix this behaviour other than subclassing that I've > missed? It's pretty annoying. Why woul

Re: A Mac App & helper NSStatusItem - how to share preferences

2008-12-30 Thread Michael Ash
On Mon, Dec 29, 2008 at 4:16 AM, Steve Cronin wrote: > Kyle; > > Thanks for that pointer! Based on the documentation you cited I've now got > the reading of NSUserDefaults functioning! > > In the hopes that it might be useful to someone else, I include these 'Cocoa > friendly' methods. > I grant

Re: A Mac App & helper NSStatusItem - how to share preferences

2008-12-30 Thread Jean-Daniel Dupas
Le 30 déc. 08 à 14:37, Michael Ash a écrit : On Mon, Dec 29, 2008 at 4:16 AM, Steve Cronin wrote: Kyle; Thanks for that pointer! Based on the documentation you cited I've now got the reading of NSUserDefaults functioning! In the hopes that it might be useful to someone else, I include

-[CKConnection connect]

2008-12-30 Thread Mike Abdullah
What is the desired intent of the -connect method? If you call it while already connected, should it: A) Restart the connection -- In which case I need to update the header docs B) Do nothing -- In which case I need to make relatively small adjustments to the code ___

Odd EXEC_BAD_ACCESS after executing URLRequest

2008-12-30 Thread marc hoffman
Hi, i'm hoping someone has an idea here - i'm seeing odd crashes after doing URL requests. the first request completes fine (up to it triggering connectionDidFinishLoading:), but shortly after or while doing a subsequent request, i get a EXC_BAD_ACCESS in what seems to be a secondary work

Re: -[CKConnection connect]

2008-12-30 Thread Matt Long
Both? I can see reasons to want both depending upon what the developer is providing the end-user. How about a parameter letting me specify? ;-) -Matt On Dec 30, 2008, at 7:51 AM, Mike Abdullah wrote: What is the desired intent of the -connect method? If you call it while already connected,

Re: iTunes Scripting Bridge examples?

2008-12-30 Thread has
Scott Anguish wrote: Does anyone have any examples of using the Scripting Bridge with iTunes? Specifically how you get the currently selected tracks returned as an array of iTunesTrack items. FYI, appscript's ASTranslate tool is pretty good at converting application commands from AppleScri

Display Format Pop-up on Open Panel

2008-12-30 Thread Dong Feng
If there are more than one items, with the same NSDocumentClass, in the CFBundleDocumentTypes array of the Info.plist, I see the "Save As..." save panel will be automatically augmented with an accessor view containing a format pop-up. Meanwhile, the open panel of "Open File..." does not have an acc

Re: Overriding NSHTTPCookieStorage for WebView

2008-12-30 Thread Mr. Gecko
I'm going to try and use the WebKit source to make it do what I need it to do. On Dec 29, 2008, at 6:46 PM, Mike Abdullah wrote: The WebResourceLoadDelegate will notify you when it receives a URL response. That response should be of the NSHTTPURLResponse class and the -allHeaderFields meth

Re: Overriding NSHTTPCookieStorage for WebView

2008-12-30 Thread glenn andreas
On Dec 30, 2008, at 11:05 AM, Mr. Gecko wrote: I'm going to try and use the WebKit source to make it do what I need it to do. That's a bad idea, unless you like rewriting your code for (potentially) every OS update, having a large test matrix that allows you to test against multiple "d

Re: Odd EXEC_BAD_ACCESS after executing URLRequest

2008-12-30 Thread Jason Foreman
On Tue, Dec 30, 2008 at 10:10 AM, marc hoffman wrote: >while (!done) >{ >[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode > beforeDate:[NSDate dateWithTimeIntervalSinceNow:timeout]]; >} > Since you want the request to happen synchronousl

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread Steve Cronin
Folks; This is a clarification for the record After some sleep and a cup of coffee and I realize that something I wrote was hasty, oh OK, sloppy! I took Bill's quoted example: @interface NSObject (MyClassOptionalMethodsThatMightBeImplementedByJustAboutAnything) - (void) someSpecial: (Sauce

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread Bill Bumgarner
On Dec 30, 2008, at 9:50 AM, Steve Cronin wrote: It now seems to me that while attaching my tweak to the header does in fact silence the compiler, it is overly broad -> 'sloppy'. Why create a category on the entire hierarchy of NSObject? Why create the possibility (albeit remote) of category

modal sheet with validation logic

2008-12-30 Thread Ronnie B
Hi All and Happy New Year , I am trying to do something not usual with the modal sheet. I have a field and a submit button on a sheet, and I want to implement some validation behavior. Two things I am trying to achieve are: 1. If the field's data fails my validation, I want to have the colored re

Re: Odd EXEC_BAD_ACCESS after executing URLRequest

2008-12-30 Thread marc hoffman
Jason, On Tue, Dec 30, 2008 at 10:10 AM, marc hoffman wrote: while (!done) { [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:timeout]]; } Since you want the request to happen synchronous

Re: iTunes Scripting Bridge examples?

2008-12-30 Thread Kyle Sluder
On Tue, Dec 30, 2008 at 11:53 AM, has wrote: > which you can then clean up or rewrite into whatever form you need. Won't > help you with SB specifically, of course, but I think my views on SB are > sufficently recorded by now. Uh, Scott Anguish probably has very good reason to want a Scripting Br

Re: Saving unseen NSView with subviews to NSImage

2008-12-30 Thread John Kestner
On Dec 30, 2008, at 8:22 AM, Michael Ash wrote: You make this brand-new view, and never put any subviews into it. It should be pretty well obvious why no subviews ever show up Yeah, it started to dawn on me last night when NSLog(@"%@", [self subviews]) turned up no subviews. I have a di

Re: Paginated PDF from NSView saved in memory

2008-12-30 Thread Joel Norvell
Dragan, This doesn't answer your questions, but it might be a useful hint pointing you toward a solution. I think the key method you want to use is [NSView dataWithPDFInsideRect] It's discussed in the "Generating EPS and PDF Data" section of Apple's printing doc. "A print operation does not

Re: Help using NSAppleScript

2008-12-30 Thread Tobias Zimmerman
Thank you very much for your help. One reason I had avoided using NSScreen is that I am working with CGDisplay functions and AppleScript, and so want to keep all of the coordinates in an upper-left-origin orientation, but I may try the NSScreen method and see if I can use one of the flipping func

AW: NSColorWell shows no color

2008-12-30 Thread tobias assmann
Hello, I have built the stuff in IB. And looking into the nib file again, I have seen the should really show blue. But they are white, no matter if I set a color or not. Unfortunately there is no more code related with the wells except having actions handling if a color gets choosen: // InAct

Re: -[CKConnection connect]

2008-12-30 Thread Mike Abdullah
My apologies everyone, somehow sent this to completely the wrong mailing list. It should have been to the ConnectionKit list, not cocoa- dev at all. Mike. On 30 Dec 2008, at 15:38, I. Savant wrote: On Tue, Dec 30, 2008 at 9:51 AM, Mike Abdullah wrote: What is the desired intent of the -con

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread Bill Bumgarner
Steve followed up to my response off-list. My original post was... terse. I have had my coffee now. Let me clarify a bit more... On Dec 30, 2008, at 10:52 AM, Steve Cronin wrote: You seem to be saying that I should have ALL the impacted methods visible in my category declaration. Don't '

Re: Overriding NSHTTPCookieStorage for WebView

2008-12-30 Thread Mr. Gecko
Ok, Thanks for telling me, I'll just read how it does the cookies and than make my private cookie system work with what they do. On Dec 30, 2008, at 11:14 AM, glenn andreas wrote: On Dec 30, 2008, at 11:05 AM, Mr. Gecko wrote: I'm going to try and use the WebKit source to make it do what I

NSTableView headers

2008-12-30 Thread Donnie Lee
Hi! I have 2-column NSTableView and want to make some rows to act as headers. How can I join columns in some rows to make header's caption all table long? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: A Mac App & helper NSStatusItem - how to share preferences

2008-12-30 Thread Steve Cronin
Michael - So does the revised code below fix the leak? After a bit more studying of the documentation, I offer these revised 'more Cocoa-friendly' updates: The driving issue is a helper app which wants to access prefs written by the 'motherApp'. - (NSDictionary *) prefDictionary {

Re: NSTableView headers

2008-12-30 Thread Raleigh Ledet
Donnie, If you're app is 10.5 and up only, check out the following delegate methods in NSTableView.h - (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn: (NSTableColumn *)tableColumn row:(NSInteger)row - (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row O

Re: paragraph styles in NSTextView--help

2008-12-30 Thread Martin Wierschin
I want to use different combinations of paragraph styles in nstextview . for example : combination of linespacing, paragraphspacing, headindent and tailindent . These all styles must be activated in a single operation ,such as in a single buttonclick etc. You'll want to work with the tex

NSTreeController delete slowness...

2008-12-30 Thread kvic...@pobox.com
i've got an NSOutlineView bound via an NSTreeController to a mutable set in my model. in the sample i've been exploring, my outline consists of 608 top level items in the outline, and only goes one level deep. each top level item has 2 or more children, and there are a total of 1393 children.

Input Method Kit Sample Code

2008-12-30 Thread Richard Somers
Does anyone know of sample code specific to the Input Method Kit Framework? Richard ___ 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-admi

Re: [NSImageView animator] - will this animate setImage: ?

2008-12-30 Thread Benjamin Dobson
On 30 Dec 2008, at 12:52:45, Benjámin Salánki wrote: Hi all, I was playing around with core animation and was wondering if sending animator to a view, specifically an NSImageView, will it only manage animation of bounds and size and rotation changes or can it too be used for changing the

Re: Scrollwheel ignores line scroll setting in NSScrollView - bug?

2008-12-30 Thread Benjamin Dobson
In addition to what Michael said, I say that the amount scroll wheels scroll is the same across all apps. Changing this value would make the application feel disproportionate and odd. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Input Method Kit Sample Code

2008-12-30 Thread Jean-Daniel Dupas
Cocoa documentation has been updated to include "related sample codes" links everywhere (class description, each method documentation, etc…) Just open a IMK class reference, and you can find one: For example, the IMKServer contains a link to the NumberInput_IMKit_Sample. http://developer.a

Re: AW: NSColorWell shows no color

2008-12-30 Thread Benjamin Dobson
On 30 Dec 2008, at 19:22:04, tobias assmann wrote: // InActiveBeatColor has been selected - (IBAction)iaSelectInactiveBeatColor:(id)sender{ [topv.colors setColor:[sender color] forKey:@"inactiveBeat"]; } You can probably do this using Bindings. http://developer.apple.com/documentation/Co

iPhone ripple effect

2008-12-30 Thread David Blanton
There is an iPhone app, Koi Pond, that ripples water. Core Image, hence filters, is not available for iPhone. Is there a filter for producing a ripple effect in iPhone SDK that I cannot find? David Blanton ___ Cocoa-dev mailing list (Cocoa-dev

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread Bill Bumgarner
I should have also mentioned -- now that I can :) -- that there is a new pattern for declaring informal protocols that is pervasive across the iPhone's UIKit. Specifically, the use of @optional in an @protocol to declare all methods in the protocol as optional. For example, you could decl

Re: Input Method Kit Sample Code

2008-12-30 Thread Richard Somers
I never noticed that! Thank you so much. Richard On Dec 30, 2008, at 3:49PM, Jean-Daniel Dupas wrote: Cocoa documentation has been updated to include "related sample codes" links everywhere ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Notification when NSPersistentDocument done loading model

2008-12-30 Thread Richard Ashwell
Wow that worked suprisingly well, Thank you Dave, so basically I added a flag and set it during initWithType:error: so I new the flag was happening during a New document creation rather than a load document, I then checked the flag in windowControllerDidLoadNib and for a new document I was

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread Kyle Sluder
On Tue, Dec 30, 2008 at 6:12 PM, Bill Bumgarner wrote: > Specifically, the use of @optional in an @protocol to declare all methods in > the protocol as optional. Using optional protocol methods instead of the traditional informal protocol approach of categories on NSObject also has the nice benef

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread mmalc crawford
I hope Bill will forgive me adding another option. With this pattern, it's also common for your protocol to adopt another protocol, such as NSObject: @MyProtocol @optional - (void)myMethod; @end This way you can test your delegate using respondsToSelector: without the compiler complaining

Re: respondsToSelector - #import OR compiler warnings?

2008-12-30 Thread Bill Bumgarner
On Dec 30, 2008, at 3:51 PM, mmalc crawford wrote: I hope Bill will forgive me adding another option. With this pattern, it's also common for your protocol to adopt another protocol, such as NSObject: @MyProtocol @optional - (void)myMethod; @end This way you can test your delegate using re

Re: Saving unseen NSView with subviews to NSImage

2008-12-30 Thread Michael Ash
On Tue, Dec 30, 2008 at 1:50 PM, John Kestner wrote: > > On Dec 30, 2008, at 8:22 AM, Michael Ash wrote: > >> You make this brand-new view, and never put any subviews into it. It >> should be pretty well obvious why no subviews ever show up > > Yeah, it started to dawn on me last night when NS

Re: A Mac App & helper NSStatusItem - how to share preferences

2008-12-30 Thread Michael Ash
On Tue, Dec 30, 2008 at 4:14 PM, Steve Cronin wrote: > Michael - So does the revised code below fix the leak? > > After a bit more studying of the documentation, I offer these revised 'more > Cocoa-friendly' updates: > > The driving issue is a helper app which wants to access prefs written by the

Re: Scrollwheel ignores line scroll setting in NSScrollView - bug?

2008-12-30 Thread Graham Cox
On 31 Dec 2008, at 9:42 am, Benjamin Dobson wrote: In addition to what Michael said, I say that the amount scroll wheels scroll is the same across all apps. Changing this value would make the application feel disproportionate and odd. Possibly, and I take your point (and Michael's). Howe

Re: Tweaking a window size [SOLVED]

2008-12-30 Thread Graham Cox
On 31 Dec 2008, at 12:27 am, Michael Ash wrote: Or better yet, have a separate method which generates the needed size, and then call that method both from here and the -windowWillResize: implementation. Yep, I realised this was all I needed to do, so I refactored the code. Easy. thanks,

Re: AW: NSColorWell shows no color

2008-12-30 Thread Graham Cox
On 31 Dec 2008, at 6:22 am, tobias assmann wrote: Is there a way to have a closer look at the code produced by IB?? Maybe something is happening there. Well, IB doesn't produce code - common misconception. It consists of an archive of objects only. When the nib is loaded, code runs that

Re: Display Format Pop-up on Open Panel

2008-12-30 Thread Graham Cox
On 31 Dec 2008, at 4:04 am, Dong Feng wrote: If there are more than one items, with the same NSDocumentClass, in the CFBundleDocumentTypes array of the Info.plist, I see the "Save As..." save panel will be automatically augmented with an accessor view containing a format pop-up. Meanwhile, the

Re: A Mac App & helper NSStatusItem - how to share preferences

2008-12-30 Thread Steve Cronin
Michael; OK to really perhaps beat the poor horse, is the following kosher? (NSDictionary *) prefDictionary { return [(NSDictionary *)CFPreferencesCopyMultiple(NULL, appBundleID, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost) autorelease]; } Steve Michael said: Yep, this fix

Re: [NSImageView animator] - will this animate setImage: ?

2008-12-30 Thread Jeffrey J. Early
On Dec 30, 2008, at 2:39 PM, Benjamin Dobson wrote: On 30 Dec 2008, at 12:52:45, Benjámin Salánki wrote: Hi all, I was playing around with core animation and was wondering if sending animator to a view, specifically an NSImageView, will it only manage animation of bounds and size and rot

Making an object release itself?

2008-12-30 Thread Jacob Rhoden
Im still learning cocoa, so I have a question about if this is a good idea or a crazy noob mistake. Given the following code can I alter it so that postreader auto releases itself? -(IBAction) fetchThreads:(id) sender { [progress startAnimation:nil]; PostReader* reader = [[PostReader al

Re: Odd EXEC_BAD_ACCESS after executing URLRequest

2008-12-30 Thread Jacob Rhoden
On 31/12/08 3:10 AM, marc hoffman wrote: i'm hoping someone has an idea here - i'm seeing odd crashes after doing URL requests. the first request completes fine (up to it triggering connectionDidFinishLoading:), but shortly after or while doing a subsequent request... Are you sure you are no

Re: AW: NSColorWell shows no color

2008-12-30 Thread Andy Lee
On Dec 30, 2008, at 2:22 PM, tobias assmann wrote: I have built the stuff in IB. And looking into the nib file again, I have seen the should really show blue. But they are white, no matter if I set a color or not. I wonder if this could be caused by inadvertently setting a binding? *Somet

Re: AW: NSColorWell shows no color

2008-12-30 Thread Andy Lee
On Dec 30, 2008, at 7:58 PM, Graham Cox wrote: Maybe posting the code where you create the preferences window controller and load the nib might shed some light. Also, since at one point you were doing something in drawRect:, it sounds like you're using a custom view? Can you tell us more ab

Initial Prefs Setting Of Checkbox?

2008-12-30 Thread Chunk 1978
i have a few checkboxes in my prefs window which are bound... however, i was under the impression that i could easily set the very first load state of these boxes in IB by checking "Selected" (Inspector > Attributes > Visual > Selected) before the userdefaults are written... it doesn't seem to work

Re: Initial Prefs Setting Of Checkbox?

2008-12-30 Thread Graham Cox
On 31 Dec 2008, at 3:25 pm, Chunk 1978 wrote: i have a few checkboxes in my prefs window which are bound... however, i was under the impression that i could easily set the very first load state of these boxes in IB by checking "Selected" (Inspector > Attributes > Visual > Selected) before the u

Re: NSOutlineView

2008-12-30 Thread Mahaboob
I used awakeFromNib method. When I¹m running the program in debugger, outlineView get instantiated and shows its value ³0x14c260² and also its variables(_numberOfRows ,...) shows the value ³0² and opens the main window. >From the main window when I¹m clicking the button, that opens the window conta

UISlider changes between 2.1 and 2.2, rating widget?

2008-12-30 Thread Colin Doncaster
Hi there, I was wondering if anyone has a work around for the change in behavior between iPhone OS 2.1 and 2.2 UISlider element? Previously I was able to click anywhere on the slider and it would update, now you have to grab the knob to adjust the value. This has broken the functionality

Reversing a String

2008-12-30 Thread Gabe Shahbazian
What is the best way to take an NSString and reverse the characters so that "hello" becomes "olleh"? Thanks for any and all help, Gabe S ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to th

Re: Reversing a String

2008-12-30 Thread Ron Fleckner
On 31/12/2008, at 4:08 PM, Gabe Shahbazian wrote: What is the best way to take an NSString and reverse the characters so that "hello" becomes "olleh"? Thanks for any and all help, Gabe S Hi Gabe. I don't think there's anything in Cocoa that does this for you. I needed to reverse strings

Re: Reversing a String

2008-12-30 Thread Graham Cox
On 31 Dec 2008, at 4:23 pm, Ron Fleckner wrote: char reverseChars[stringLength]; Have you tested this? I don't think this is legal - you can't declare a statically sized array with a dynamically computed size. The compiler might let it through because stringLength is declared const, ev

Re: Reversing a String

2008-12-30 Thread Graham Cox
On 31 Dec 2008, at 4:35 pm, Graham Cox wrote: I don't think this is legal Hmm, seems C99 allows this. I didn't know that - my bad. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

Re: Reversing a String

2008-12-30 Thread Adam R. Maxwell
On Dec 31, 2008, at 4:23 PM, Ron Fleckner wrote: const int stringLength = [aString length]; char reverseChars[stringLength]; for (i = stringLength - 1, j = 0; i >= 0; i--, j++) { char c = [aString characterAtIndex:i]; reverseChars[j

Re: UISlider changes between 2.1 and 2.2, rating widget?

2008-12-30 Thread Robert Marini
There is no "standard" ratings widget (and I'd advise you submit a bugreport requesting one if you haven't done so already) nor is there a good work-around for fixing the slider since some would argue that it isn't actually broken (one common complaint in the past was that accidentally touc

Re: Reversing a String

2008-12-30 Thread Ron Fleckner
On 31/12/2008, at 4:42 PM, Graham Cox wrote: On 31 Dec 2008, at 4:35 pm, Graham Cox wrote: I don't think this is legal Hmm, seems C99 allows this. I didn't know that - my bad. --Graham Ha ha, yes. I resisted trying to explain that because I wouldn't be able to do it properly. I did

Re: Reversing a String

2008-12-30 Thread Adam R. Maxwell
On Dec 31, 2008, at 4:42 PM, Graham Cox wrote: On 31 Dec 2008, at 4:35 pm, Graham Cox wrote: I don't think this is legal Hmm, seems C99 allows this. I didn't know that - my bad. Personally, I avoid variable length arrays out of fear that the allocation might fail. On 10.3 or 10.4 I ran

Re: Reversing a String

2008-12-30 Thread Robert Marini
In general, it would perhaps be best to create a c string from the NSString using the proper text encoding and then iterating through the C string in reverse, appending each character to an NSMutableString. Iterating through each character of an NSString is likely to be slow and the usage

Re: Reversing a String

2008-12-30 Thread Nick Zitzmann
On Dec 30, 2008, at 10:23 PM, Ron Fleckner wrote: - (NSString *)reverseString:(NSString *)aString { // Do the reversing with the help of an array of chars int i, j; const int stringLength = [aString length]; char reverseChars[stringLength]; for (

Re: Reversing a String

2008-12-30 Thread Kyle Sluder
On Wed, Dec 31, 2008 at 12:08 AM, Gabe Shahbazian wrote: > What is the best way to take an NSString and reverse the characters so that > "hello" becomes "olleh"? This doesn't make sense for all locales. Are you sure you want to do this? --Kyle Sluder

Re: NSOutlineView

2008-12-30 Thread Mahaboob
I¹m calling this method from a toolbar menu item. I observed that when I¹m calling this method from an NSButton¹s action method, outlineView displays the outline data. Why this happens? I need to call this method from toolbar menu item only. How can I achieve this? On 12/31/08 10:23 AM, "Mahaboob

Re: UISlider changes between 2.1 and 2.2, rating widget?

2008-12-30 Thread Colin Doncaster
I imagine it's one of those things that could be an endless debate as to whether it should or shouldn't jump to the selection point vs. adjusting it with the button, and it's slightly odd that it exhibits the old behavior in the simulator but not when run on the device. It would be good i

Re: Reversing a String

2008-12-30 Thread Ron Fleckner
On 31/12/2008, at 5:26 PM, Nick Zitzmann wrote: On Dec 30, 2008, at 10:23 PM, Ron Fleckner wrote: - (NSString *)reverseString:(NSString *)aString { // Do the reversing with the help of an array of chars int i, j; const int stringLength = [aString length];