Re: Custom CALayer Action as animation key?

2008-10-20 Thread Matt Long
Patrick, I believe the only animatable properties are the ones explicitly labeled "animatable" in the documentation. That is why (I believe) there is a section labeled "Animatable Properties" in the Core Animation Programming guide. I think the reason is that you can't guarantee that your

Re: NSRulerView cusom hashMarks

2008-10-20 Thread Graham Cox
On 21 Oct 2008, at 5:40 am, josh hughes wrote: Hi, I need to alter the hashMarks of an NSRulerView so that the labels increment from 1 rather than the default: 0. As I understand it, this should be done by either subclassing NSRulerView and overriding drawHashMarkAndLabelsInRect: or usin

Re: NSURL, NSURLRequest, and NSURLConnection

2008-10-20 Thread Stephen J. Butler
On Mon, Oct 20, 2008 at 2:19 PM, Robert Mullen <[EMAIL PROTECTED]> wrote: > When sending a NSURLRequest to an secure website via NSURLConnection will > the initial URL be encrypted or only the response? I have looked around at > Apple's docs and am unclear. An HTTPS URL? Everything but the server

Core Data saving / Leopard / The temporary directory at ...

2008-10-20 Thread Jonathan Freeman
Hello all, I've got an odd saving issue that one of my beta users just found. I can replicate this on 10.5.5, and it's basically one cannot save a Core Data document with a specific series of events. I've done the google route and found a few other developers seeing this with no resolve. Any in

Device Information from NSEvent?

2008-10-20 Thread Kevin Gessner
My application uses an event tap to capture keyboard events, and I'd like to know which device (i.e. which keyboard) each event comes from. Is there an sort of device-identifying information along with the CGEvent that a tap gets (or the related NSEvent)? I've looked at NSEvent's methods bu

NSURL, NSURLRequest, and NSURLConnection

2008-10-20 Thread Robert Mullen
When sending a NSURLRequest to an secure website via NSURLConnection will the initial URL be encrypted or only the response? I have looked around at Apple's docs and am unclear. Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

NSRulerView cusom hashMarks

2008-10-20 Thread josh hughes
Hi, I need to alter the hashMarks of an NSRulerView so that the labels increment from 1 rather than the default: 0. As I understand it, this should be done by either subclassing NSRulerView and overriding drawHashMarkAndLabelsInRect: or using a delegate. I must admit, I'm quite new to coc

Using Core Animation to animate view properties?

2008-10-20 Thread Jim Correia
I have some view properties for which I'd like to use Core Animation to drive the animation. In my old code, I used a subclass of NSAnimation which interpolated the target value and set the property on the view via KVO. This seems like a perfect use for CABasicAnimation and the animator pro

Re: lockFocus error

2008-10-20 Thread Graham Cox
On 21 Oct 2008, at 10:48 am, DKJ wrote: On 20 Oct, 2008, at 16:32, Graham Cox wrote: What would you expect it to do? Suppose I wanted it to draw lines in response to user input. Would I put NSBezierPath methods in drawRect: and expose the relevant properties in the subclass? To draw

@property and HeaderDoc

2008-10-20 Thread Jerry Krinock
The scripts menu in Xcode has some nice macros for generating HeaderDoc comments for classes, methods, etc. Some of them need improvement, but I've gotten so that I use them every day. But they don't know how to handle @property declarations. As far as the programmer is concerned, even thou

Re: How to draw a Recessed Button Shadow

2008-10-20 Thread Rob Keniger
On 21/10/2008, at 4:34 AM, Dalzhim Dalzhim wrote: I am currently trying to subclass NSPopUpButton while keeping compatibility with Mac OS 10.4 in order to add the possibility of choosing the color of the highlight when the mouse is placed over the button, including gradient fills. The pro

Re: lockFocus error

2008-10-20 Thread DKJ
On 20 Oct, 2008, at 16:32, Graham Cox wrote: What would you expect it to do? Suppose I wanted it to draw lines in response to user input. Would I put NSBezierPath methods in drawRect: and expose the relevant properties in the subclass? ___ Coc

Re: (Solved!) Return and Enter don't "behave" in Text Field (Newb)

2008-10-20 Thread John Velman
Thanks, Aki, for the explanation of the "possibly". I finally got the messages and receivers right to do it inside control:textView:doCommandBySelector:. I had some confusion between the control, the text field, the window, but I think I understand now. Anyway, it seems to be working! Thanks for

Re: lockFocus error

2008-10-20 Thread Graham Cox
On 21 Oct 2008, at 10:26 am, DKJ wrote: Is this a good way of going about it? I subclassed NSView and defined the properties border_colour, fill_colour, and pic. These are initialised to nil. I then implemented drawRect: like this: - (void)drawRect:(NSRect)rect { if( bord

Re: lockFocus error

2008-10-20 Thread DKJ
On 20 Oct, 2008, at 09:15, Nick Zitzmann wrote: you do all your drawing in -drawRect:, and call -setNeedsDisplay: & friends when you need to refresh part of the view. Is this a good way of going about it? I subclassed NSView and defined the properties border_colour, fill_colour, and pic. The

Re: Return and Enter don't "behave" in Text Field (Newb)

2008-10-20 Thread Aki Inoue
On 2008/10/20, at 13:46, John Velman wrote: Thanks, Aki, this helps clear some things up. However, two questions: 1) What does "possibly" depend on? Surely its not random :-) Well, I admit "possibly" is probably too vague to be useful 8-). The behavior is controlled by the NSTextMovement

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Corbin Dunn
On Oct 20, 2008, at 2:49 PM, Dalzhim Dalzhim wrote: This following episode of Late Night Cocoa gives a solution to this precise problem of implementing the delete functionality on TableViews and OutlineViews without having to subclass it. http://www.mac-developer-network.com/podcasts/laten

Re: GDB Problems

2008-10-20 Thread Bridger Maxwell
I finally fixed (I think) the problem. All it took was for me to delete ~/Library/PreferencePanes/. I have no idea why this worked, as I have not ever done any preference pane programming. I only had one file in there (PlugSuit.prefPane). I did not have to delete /Library/PreferencePanes/. Go figur

Re: lockFocus error

2008-10-20 Thread Graham Cox
On 21 Oct 2008, at 2:21 am, DKJ wrote: When I do this in the controller's awakeFromNib method: [theView lockFocus]; Then don't do it! stuff like -lockFocus comes into the category of "advanced techniques". 99% of Cocoa programmers will never need it. Move along now, nothing to

Re: Mutable arrays

2008-10-20 Thread Michael Ash
On Mon, Oct 20, 2008 at 11:45 AM, I. Savant <[EMAIL PROTECTED]> wrote: > On Mon, Oct 20, 2008 at 11:37 AM, Roland King <[EMAIL PROTECTED]> wrote: > >> I'm not sure I totally agree with step 0. I think there is value in >> understanding how your code is going to run, or is going to run most times, >

Re: Mutable arrays

2008-10-20 Thread Michael Ash
On Mon, Oct 20, 2008 at 10:40 AM, <[EMAIL PROTECTED]> wrote: > > Michael Ash wrote on 20/10/2008 15:31:01: >> And don't forget step 0: >> >> 0) Don't even bother >> >> A lot of people optimize code that's already plenty fast. A lot of >> people optimize code that *hasn't even been written yet*. Th

Re: Screen not redrawing

2008-10-20 Thread Graham Cox
On 21 Oct 2008, at 4:30 am, Russ wrote: Still having trouble getting my screen redraw to come to life. Very odd--- 1) The window title bar isn't getting redrawn right either when a different app's menu steps on it. 2) If I use the normal NSView instead of my subclassed version, still d

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Dalzhim Dalzhim
This following episode of Late Night Cocoa gives a solution to this precise problem of implementing the delete functionality on TableViews and OutlineViews without having to subclass it. http://www.mac-developer-network.com/podcasts/latenightcocoa/episode9/index.html Hope it helps :) -Dalzhim

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Sean McBride
On 10/20/08 2:27 PM, Corbin Dunn said: >> Overriding deleteBackward: (from NSResponder) doesn't seem to work. >> For >> some reason, it is never called. > >For various reasons, NSTableView doesn't implement - >interpretKeyEvents:, that's why it isn't called. Thanks for your reply Corbin! I assum

Re: Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Corbin Dunn
On Oct 20, 2008, at 2:07 PM, Sean McBride wrote: Hi all, In 10.5, NSTableView handles many keypresses automatically: up arrow, down arrow, page up, page down, home, end, and even 'type select'. I also need to (robustly!) support the 'delete' key. Overriding deleteBackward: (from NSResponder)

Properly supporting 'delete' key presses in NSTableView

2008-10-20 Thread Sean McBride
Hi all, In 10.5, NSTableView handles many keypresses automatically: up arrow, down arrow, page up, page down, home, end, and even 'type select'. I also need to (robustly!) support the 'delete' key. Overriding deleteBackward: (from NSResponder) doesn't seem to work. For some reason, it is never

Re: Return and Enter don't "behave" in Text Field (Newb)

2008-10-20 Thread John Velman
Thanks, Aki, this helps clear some things up. However, two questions: 1) What does "possibly" depend on? Surely its not random :-) 2) So, I gather that I should be able to get the behaviour I want by putting in my delegate something like [[aTextView window] selectNextKeyView:[aTextView

Re: Launchd timeout messages

2008-10-20 Thread Shawn Erickson
On Mon, Oct 20, 2008 at 1:23 PM, Tom Fortmann <[EMAIL PROTECTED]> wrote: > Jason, > > Thanks. I will try removing the OnDemand key. If that doesn't work I will > report on Darwin-dev list. A list exists for launchd as well... launchd-dev

Re: Custom button cells for NSMatrix

2008-10-20 Thread Ricky Sharp
On Oct 20, 2008, at 6:23 AM, Ricky Sharp wrote: This is actually quite difficult. I can send you details later today. In my case, I needed accessibility and mimic the Aqua radio buttons in terms of all their behaviors. I ended up subclassing NSMatrix and NSActionCell. I could not get a s

RE: Launchd timeout messages

2008-10-20 Thread Tom Fortmann
Jason, Thanks. I will try removing the OnDemand key. If that doesn't work I will report on Darwin-dev list. Thanks again, Tom -Original Message- From: Jason Coco [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2008 3:14 PM To: Tom Fortmann Cc: cocoa-dev@lists.apple.com Subject: Re

Re: Launchd timeout messages

2008-10-20 Thread Jason Coco
On Oct 20, 2008, at 15:52 , Tom Fortmann wrote: I need help debugging a problem with a long running daemon running under launchd. The daemon is being repeatedly killed and restarted. The daemon follows all of the rules for running under launchd. It is starting successfully, but then rece

Launchd timeout messages

2008-10-20 Thread Tom Fortmann
I need help debugging a problem with a long running daemon running under launchd. The daemon is being repeatedly killed and restarted. The daemon follows all of the rules for running under launchd. It is starting successfully, but then receives a SIGTERM signal after a few seconds (assumedly fro

Re: Return and Enter don't "behave" in Text Field (Newb)

2008-10-20 Thread Aki Inoue
John, "End editing" doesn't necessarily mean losing focus in terms of behavior visually users can see. In this case, NSTextField does end editing, but calls -selectAll: immediately afterwards to keep the focus. Discussion Field editors interpret Tab, Shift-Tab, and Return (Enter) as cues

Return and Enter don't "behave" in Text Field (Newb)

2008-10-20 Thread John Velman
This must have a simple answer, but I can't find it. I have several text fields in in a window. I've set the nextKeyView as I like it, and tabbing works. But pressing enter or return highlights the whole cell as selected, rather than ending editing of that cell as I believe it should. I used ca

How to draw a Recessed Button Shadow

2008-10-20 Thread Dalzhim Dalzhim
Hello, I am currently trying to subclass NSPopUpButton while keeping compatibility with Mac OS 10.4 in order to add the possibility of choosing the color of the highlight when the mouse is placed over the button, including gradient fills. The problem is that neither NSPopUpButton or NSPopUpButton

Re: Screen not redrawing - SOLVED

2008-10-20 Thread Russ
Got it! Windows were getting inadvertently and indirectly created with NSBackingStoreRetained. Hadn't caught it because used backingLocation instead of backingType and got wished-for answer(2) from wrong call. Presto all is cheerier and I plough ahead. - Original Message From: Russ

Re: Superscript attribute with CATextLayer

2008-10-20 Thread Stephan Michels
2008/10/20 Scott Anguish <[EMAIL PROTECTED]>: > what is the result? do you have an image you can link to? The result is that superscript attribute seems to be completely ignored. I made a simple test project with a TextView (top), a CATextLayer(middle) and with drawAtPoint:(bottom) Screenshot:

Re: Custom button cells for NSMatrix

2008-10-20 Thread Benjamin Dobson
Highlighting each cell in a matrix will let you change the image for it. On 20 Oct 2008, at 12:19:04, norio wrote: Hi, I'm trying to make a custom cell object for NSMatrix which behaves like radio button, this is, when you press the second cell, the second cell is highlighting still. Wou

Re: How can I launch Preview.app from my application for collection of images

2008-10-20 Thread Fritz Anderson
On 20 Oct 2008, at 11:21 AM, Randall Meadows wrote: Tangential to the OP, but might be worth the electrons: Preview can display the contents of the clipboard (when it contains image data) by using File -> New From Clipboard (cmd-N). (The OP might be able to managed this via scripting, but

[[Moderator] How do people use and contribute to the list

2008-10-20 Thread Scott Anguish
I think that the original poster probably has their answer now. You can't effectively follow (let a lone contribute) simply using the digest version of the list. Once you subscribe to the individual mails there are many ways of sorting them. - mail.app - procmail - gmail and labeling - a

Re: Question about tackling a project

2008-10-20 Thread Michael Paluszek
Look at this sample code http://developer.apple.com/samplecode/GeekGameBoard/index.html Sincerely, Mike On Oct 20, 2008, at 11:49 AM, Dustin Dembrosky wrote: I'm working on a application in Xcode and I'm trying to figure out how to start. All I need to get working is to make a grid, the si

Re: Screen not redrawing

2008-10-20 Thread Russ
Still having trouble getting my screen redraw to come to life. Very odd--- 1) The window title bar isn't getting redrawn right either when a different app's menu steps on it. 2) If I use the normal NSView instead of my subclassed version, still doesn't work. 3) If I replace my subclassed drawR

Question about tackling a project

2008-10-20 Thread Dustin Dembrosky
I'm working on a application in Xcode and I'm trying to figure out how to start. All I need to get working is to make a grid, the size 6x6. The size of the grid would look like a chess board. Next I need to get a image or a sprite, to fit within one of the cells and just be able to jump

[MEET] LA CocoaHeads Thursday 10/23 7:30pm

2008-10-20 Thread Rob Ross
Hey LA CocoaHeads. Next week we continue our study group meeting for the Aaron Hillegass book "Cocoa Programming for Mac OS X, 3rd Edition". http://search.barnesandnoble.com/Cocoa-Programming-for-Mac-OS-X/Aaron-Hillegass/e/9780321503619/?itm=1 We'll be covering chapters 10-12. Please jot dow

Re: Pointing in the right direction for an XCode 3 pref pane.

2008-10-20 Thread Adam Penny
On Oct20, 2008, at 10:55 AM, Adam Penny wrote: Hi again, Sorry, in my naivité I had expected the drag and drop to do more, but having just created a new NSObject in IB and pointed at the wopolpref class I now discover that it dragging and dropping has done the trick. Thank you very muc

Re: [OT] How do people use and contribute to this list?

2008-10-20 Thread Benjamin Stiglitz
> Can anyone offer any advice or suggestions? Or should I settle for the > cumbersome digest mode? I’ve found that a combination of procmail rules on my IMAP box and Mutt compiled with the ignore-thread patch [1] work quite well for me. I haven’t found a MUA which beats Mutt for reading mailing li

Re: How can I launch Preview.app from my application for collection of images

2008-10-20 Thread Randall Meadows
On Oct 16, 2008, at 10:04 AM, Fritz Anderson wrote: On 16 Oct 2008, at 10:48 AM, Alexander Shmelev wrote: I have set of images, how can i open Preview.app from my Cocoa application to display them all? See -[NSWorkspace openFile:withApplication:]. If your images are in memory only, you'll

Re: lockFocus error

2008-10-20 Thread Nick Zitzmann
On Oct 20, 2008, at 10:09 AM, DKJ wrote: I'm just practising with views and animations. Generally, you don't call -lockFocus on a view unless you have a very good reason. As you've already found out, -lockFocus will raise exceptions if things aren't set exactly right. Instead, you do all

Re: lockFocus error

2008-10-20 Thread DKJ
On 20 Oct, 2008, at 08:59, Nick Zitzmann wrote: Out of curiosity, why are you locking focus on a view in - awakeFromNib? I'm just practising with views and animations. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Mutable arrays

2008-10-20 Thread Andy Lee
On Oct 20, 2008, at 11:37 AM, Roland King wrote: I think there is value in understanding how your code is going to run, or is going to run most times, and picking constructs which are clearly efficient if it's really not more work to do so and it represents the data you're working with. Of

Re: lockFocus error

2008-10-20 Thread Nick Zitzmann
On Oct 20, 2008, at 9:21 AM, DKJ wrote: I have a custom view in a window, set as an instance of MyView, and connected to my controller as an IBOutlet theView. When I do this in the controller's awakeFromNib method: [theView lockFocus]; Out of curiosity, why are you locking focus

Custom CALayer Action as animation key?

2008-10-20 Thread Patrick Mau
Good afternoon, I have implemented a layer-based view that acts as the layer delegate and defines a layer action named "test". Afterwards I create a CABasic animation to animate the test property. If you look at the line marked 'THIS WORKS", you'll see that sending "setValue:forKey" triggers

Re: Mutable arrays

2008-10-20 Thread I. Savant
On Mon, Oct 20, 2008 at 11:37 AM, Roland King <[EMAIL PROTECTED]> wrote: > I'm not sure I totally agree with step 0. I think there is value in > understanding how your code is going to run, or is going to run most times, > and picking constructs which are clearly efficient if it's really not more

Re: Mutable arrays

2008-10-20 Thread Roland King
On Oct 20, 2008, at 10:31 PM, Michael Ash wrote: On Mon, Oct 20, 2008 at 1:35 AM, j o a r <[EMAIL PROTECTED]> wrote: Some general suggestions for best practices wrt. optimizations: 1) Measure first 2) Implement supposed optimization 3) Measure to see the impac

Re: [OT] How do people use and contribute to this list?

2008-10-20 Thread Michael Gardner
On Oct 19, 2008, at 10:18 PM, Scott Ribe wrote: The "view unread only" option is the reason I haven't switched to Mail and still use Entourage. You know you can sort by unread status by clicking on the 'unread' column in Mail, right? It's not exactly the same, but it works well for me.

lockFocus error

2008-10-20 Thread DKJ
I have a custom view in a window, set as an instance of MyView, and connected to my controller as an IBOutlet theView. When I do this in the controller's awakeFromNib method: [theView lockFocus]; I get this error: *** Assertion failure in -[MyView lockFocus], /SourceCache/AppKit/ A

Re: Mutable arrays

2008-10-20 Thread Jason Stephenson
DKJ wrote: Since mutable arrays and dictionaries expand as required when new objects are added, when should one use -initWithCapacity: methods? I have used it when my program can figure out roughly how many items will be in the mutable object to begin with. Say my program is pulling some dat

Re: Mutable arrays

2008-10-20 Thread graham . lee
Michael Ash wrote on 20/10/2008 15:31:01: > On Mon, Oct 20, 2008 at 1:35 AM, j o a r <[EMAIL PROTECTED]> wrote: > > Some general suggestions for best practices wrt. optimizations: > > > >1) Measure first > >2) Implement supposed optimization > >3) Measure to

Re: Mutable arrays

2008-10-20 Thread Michael Ash
On Mon, Oct 20, 2008 at 1:35 AM, j o a r <[EMAIL PROTECTED]> wrote: > Some general suggestions for best practices wrt. optimizations: > >1) Measure first >2) Implement supposed optimization >3) Measure to see the impact of the code change >4) Base

Re: Is there a character limit in (NSString* title) and (NSString* message) in NSBeginCriticalAlertSheet dialog?

2008-10-20 Thread Michael Ash
On Sun, Oct 19, 2008 at 11:30 PM, Lance Kwan <[EMAIL PROTECTED]> wrote: > Is there a character limit in (NSString* title) and (NSString* message) in > NSBeginCriticalAlertSheet dialog? > > or there is limited characters for (NSString* message)? There is no limit aside from the inherent limits cre

Re: what do you use to make icons and similar?

2008-10-20 Thread Dave DeLong
If you don't have skill, pay somebody to do it. Not always an option, even if desirable. For those of who do want to go with the paid route, our CocoaHeads group keeps a list of some of the Mac-oriented graphic designers we've found and/or used in the past. Feel free to register on the si

Re: Custom button cells for NSMatrix

2008-10-20 Thread Ricky Sharp
This is actually quite difficult. I can send you details later today. In my case, I needed accessibility and mimic the Aqua radio buttons in terms of all their behaviors. I ended up subclassing NSMatrix and NSActionCell. I could not get a subclass of NSButtonCell in an NSMatrix to work comp

Custom button cells for NSMatrix

2008-10-20 Thread norio
Hi, I'm trying to make a custom cell object for NSMatrix which behaves like radio button, this is, when you press the second cell, the second cell is highlighting still. Would you tell me which method I need to override? Thank you. Norio ___ C

Re: NSMetadataQuery question

2008-10-20 Thread Timothy Larkin
There is only one way I have figured out to have a date as the RHS of a predicate, which I found by looking at an example of a date predicate produced by IB as part of a predicate binding. The date has to be cast to a float. This [NSString stringWithFormat:@"CAST(%f, \"NSDate\")", [date t

Re: stringWithFormat

2008-10-20 Thread Conor
"You "create" an object using a method whose name begins with “alloc” or “new” or contains “copy” (for example, alloc, newObject, or mutableCopy)." "Many classes provide methods of the form +className... that you can use to obtain a new instance of the class. Often referred to as “conve

Re: stringWithFormat

2008-10-20 Thread Roland King
Ron Green wrote: stringWithFormat: returns an NSString that is autoreleased. I know this because I read it in Hillegasses book. But since this does not seem to be covered in the documentation, if I had not read it in a book, how would I discover that the NSString was autoreleased? __

Re: Pointing in the right direction for an XCode 3 pref pane.

2008-10-20 Thread Adam Penny
Hi again, Sorry, in my naivité I had expected the drag and drop to do more, but having just created a new NSObject in IB and pointed at the wopolpref class I now discover that it dragging and dropping has done the trick. Thank you very much! Adam On Oct20, 2008, at 1:59 AM, Nick Zitzmann w

stringWithFormat

2008-10-20 Thread Ron Green
stringWithFormat: returns an NSString that is autoreleased. I know this because I read it in Hillegasses book. But since this does not seem to be covered in the documentation, if I had not read it in a book, how would I discover that the NSString was autoreleased? _

Re: what do you use to make icons and similar?

2008-10-20 Thread Peter N Lewis
I need a make a few icons and other graphics for my app, simple stuff like a small yellow triangle with an invisible background. I'm totally and completely graphically challenged which never helps. I can't find a simple (preferably free!) drawing program which will let me make stuff like this.

Re: Pointing in the right direction for an XCode 3 pref pane.

2008-10-20 Thread Adam Penny
Hi Nick, Yes, I've tried that and it gave me the little '+' symbol in green, which is always a good sign, but it proceed to do nothing. Here's my header file, just in case that's where the problem lies: #import @interface WopolPref : NSPreferencePane { IBOutlet NSTextField *broadc

[ANN] InputMethodKit backporting component for OS X 10.4 Tiger

2008-10-20 Thread Lukhnos D. Liu
Hi All, InputMethodKit Backporting Component, or IMK-Tiger for short, helps input method developers backport their IMK-based input method apps to OS X 10.4 Tiger. It is what we use to backport the latest OpenVanilla, a popular input method toolset in Taiwan, to 10.4. You can find the project at:

Superscript attribute with CATextLayer

2008-10-20 Thread Stephan Michels
Hi, I have the problem if I use super/subscript within an attributed string, then it doesn't seems to work with CATextLayer, and I don't know why. I tried NSSuperscriptAttributeName and NSBaselineOffsetAttributeName string = [[NSMutableAttributedString alloc] init]; [string beginEditing]; [