Re: Toll-free bridge type at runtime

2009-04-03 Thread Ryan Joseph
On Apr 3, 2009, at 12:47 PM, Bill Bumgarner wrote: On Apr 2, 2009, at 8:40 PM, Ryan Joseph wrote: // We must use the "Handle" which is the Objective-C object because dragTypes is a NSArray wrapper and passing a Pascal object to Objective-C runtime WILL cause errors dragTypes := NSArray.ar

Stop the form from refresh again

2009-04-03 Thread developers mac
Hi there, I am developing an application for iphone. I am moving from a.xib to b.xib & fetching a value & return back to a.xib. By the mean time all values entered in the textfields of the a.xib files getting cleared (I am building the whole page on the viewdidload method). I want stop this.

Re: Stop the form from refresh again

2009-04-03 Thread Alexander Spohr
Am 03.04.2009 um 10:22 schrieb developers mac: (I am building the whole page on the viewdidload method). If you build the page fill in the values... And please people, stop posting anonymously! Give your mail accounts a name or at least sign your messages. I don’t like to answer people w

Dragging around an NSImageView

2009-04-03 Thread Aaron Scott
Hi, I'm trying to figure out how to be able to drag an NSImageView around. The NSImageView has been added as a subview to another NSImageView. Basically, I'm trying to drag a grey box around over the top of a picture. I can programmatically move it around but I can't seem to find the righ

Re: Bindings and MenuItems

2009-04-03 Thread Alexander Spohr
Am 03.04.2009 um 06:49 schrieb Ben Lachman: No. That was what my original message outlined. Say you have a table view selected and hit cmd-p. NSView has a default implementation of print: so it will print the table view. In my case and in many others what you really want to print is th

Create a folder as a package/bundle ...

2009-04-03 Thread Mic Pringle
Hi, How would one go about creating a folder that would appear to the finder as a bundle/package ? In the app I'm working on, I need to implement this as the save function generates more than one file, and is sort of a 'project' so could have associated resources etc but I would like to use a cus

Re: Stop the form from refresh again

2009-04-03 Thread I. Savant
On Apr 3, 2009, at 6:12 AM, Alexander Spohr wrote: I don’t like to answer people whose name is „developers mac“ or „Developer“. Then don't. It's everybody's right to post under whatever name they wish just as it's your right not to answer. -- I.S.

Re: Create a folder as a package/bundle ...

2009-04-03 Thread I. Savant
On Apr 3, 2009, at 6:25 AM, Mic Pringle wrote: How would one go about creating a folder that would appear to the finder as a bundle/package ? Have you searched the archives? The documentation? Google, perhaps? While no longer a *frequently* asked question, it's been asked countless times

Re: Create a folder as a package/bundle ...

2009-04-03 Thread Mic Pringle
Hi, I did do some searching but it came up with nothing relevant. Perhaps I was searching in the wrong place ? Thanks for pointing out the example on Cocoa dev. However, it does not show what I need. You see, in the code that gets the file attributes to set on the folder, it uses this call .. NS

Re: Create a folder as a package/bundle ...

2009-04-03 Thread I. Savant
On Apr 3, 2009, at 7:06 AM, Mic Pringle wrote: I did do some searching but it came up with nothing relevant. Perhaps I was searching in the wrong place ? Google finds everything you need with the terms you provided (when including the word "Cocoa" to narrow the scope), if you take the time

Re: Best Strategy to Control iTunes

2009-04-03 Thread has
On Apr 1, 2009, at 8:15 PM, Ammar Ibrahim wrote: I'm afraid I'm new and don't quite understand, do you recommend I use appscript? I'm biased, of course, but yeah, it's probably the best choice. It's more powerful and reliable than Scripting Bridge, can be used in background threads so wo

Dismissing the iPhone keyboard

2009-04-03 Thread Development
How do I dismiss the keyboard from a UITextView when the cursor is moved out? ___ 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-admins(at)li

Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-04-03 Thread James Montgomerie
On 2 Apr 2009, at 22:33, WT wrote: 25 was just a test. The actual app has 2 interlocking 7x7 grids, so the number of image views is actually 98. I should explain that this animated laying out of image views happens only once and, from that point on, the image views all remain in the same p

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Dave DeLong
Have the UITextfield resignFirstResponder. The keyboard goes away when an editable element loses first responder status. Dave On Apr 3, 2009, at 6:49 AM, Development wrote: How do I dismiss the keyboard from a UITextView when the cursor is moved out? __

Re: Automatic code generation for C++/Objective C bridge

2009-04-03 Thread Scott Ribe
I don't see the point. I work extensively with Objective-C++ and I don't think I've ever seen a single situation where wrapping C++ objects in Objective-C wrappers would have been a good approach. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Development
I'm using - (void)textFieldDidEndEditing:(UITextField *)textField { [textField resignFirstResponder]; } and the matching method for the textview I have set the delegate in IB and yet the note is never sent. I can't figure out what I'm doing wrong. On Apr 3, 2009, at 6:24 AM, Dave De

hung in read$UNIX2003

2009-04-03 Thread Michael Domino
Hi all, I have a task prepared and launched with the code below, and when it returns (in this situation that status code returned from terminationStatus is 0), it hangs in availableData, never to return. The stack at this point is very deep because of a recursive function (see the stack t

Inserting text in UITextView without scrolling animation

2009-04-03 Thread Ignacio Enriquez
Hi I hope this is the right place for this question. I am trying to implement a customized Keyboard using UIView, UIButtons, and UITextViewDelegate methods for getting the actual location of the cursor inside of a UITextView object. Everything goes great until the input text becomes so big that it

Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-04-03 Thread WT
Presuming that this is full-size, It is uncommon to have views that are so small (the balls must be, what, 4X4 pixels or something?), I'd say. No, no, the smallest ball is 13x13 pixels and the whole picture is nearly 320 pixels on each side. I had to shrink the picture to such a small siz

Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-04-03 Thread glenn andreas
I do have a custom UIView for the grid, but it doesn't do much for now, since I'm currently using the UIImageView instances to do the heavy lifting. You are aware that you can pass an array of UIImages to a UIView and it will animate them at whatever speed you tell it, right? It's not

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Eric E. Dolecki
You have that method hooked to the UITextField's DidEndOnExit? E. On Fri, Apr 3, 2009 at 9:30 AM, Development wrote: > I'm using > > - (void)textFieldDidEndEditing:(UITextField *)textField > { > >[textField resignFirstResponder]; > } > > and the matching method for the textview > > I have

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Brian Slick
Do you have: @interface YourViewController : UIViewController ^ ...in your header file? Oh, just glanced at my own code, and I'm using this when the text field gets created: [textField addTarget:self action:@selector(tex

[Q] using a custom formatter via IB

2009-04-03 Thread Jon C. Munson II
Namaste! I've got a custom formatter for limiting text input to a certain-length string. I did this because the default delayed message of " is too long" isn't exactly a good way to keep our users from shooting themselves in the foot (though I AM glad it is there). Also, writing validation metho

Re: [Q] using a custom formatter via IB

2009-04-03 Thread I. Savant
On Fri, Apr 3, 2009 at 10:43 AM, Jon C. Munson II wrote: > To create this formatter for use in IB, should I go the route of a plug-in? Yes. If you want to be able to set this at design time, you should create an IB plugin containing this formatter. > Is it possible to simply instantiate the o

Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-04-03 Thread WT
I do have a custom UIView for the grid, but it doesn't do much for now, since I'm currently using the UIImageView instances to do the heavy lifting. You are aware that you can pass an array of UIImages to a UIView and it will animate them at whatever speed you tell it, right? It's not

RE: [Q] using a custom formatter via IB

2009-04-03 Thread Jon C. Munson II
> > On Fri, Apr 3, 2009 at 10:43 AM, Jon C. Munson II wrote: > > To create this formatter for use in IB, should I go the route of a plug- > in? > > Yes. If you want to be able to set this at design time, you should > create an IB plugin containing this formatter. > [Jon C. Munson II] OK, that

Re: Dragging around an NSImageView

2009-04-03 Thread Randall Meadows
On Apr 3, 2009, at 4:14 AM, Aaron Scott wrote: I'm trying to figure out how to be able to drag an NSImageView around. The NSImageView has been added as a subview to another NSImageView. Basically, I'm trying to drag a grey box around over the top of a picture. I can programmatically move

Re: Create a folder as a package/bundle ...

2009-04-03 Thread Sean McBride
On 4/3/09 11:25 AM, Mic Pringle said: >How would one go about creating a folder that would appear to the >finder as a bundle/package ? One thing you should do is set the bundle bit of your folder. You can use the MoreFilesX sample code, and call: FSChangeFinderFlags (&theFsRef, true, kHasBund

Re: Toll-free bridge type at runtime

2009-04-03 Thread Michael Ash
On Fri, Apr 3, 2009 at 2:08 AM, Marcel Weiher wrote: >> What I am saying above >> is that it is possible to distinguish between a custom NSArray >> subclass and a subclass provided by the system. These are not the same >> thing. > > How are they not the same thing?  If you say "NSArray", what do y

Re: Create a folder as a package/bundle ...

2009-04-03 Thread I. Savant
On Fri, Apr 3, 2009 at 12:00 PM, Sean McBride wrote: > One thing you should do is set the bundle bit of your folder.  You can > use the MoreFilesX sample code, and call: > >  FSChangeFinderFlags (&theFsRef, true, kHasBundle); I don't think this will work on its own, but I could be wrong. Can y

Re: hung in read$UNIX2003

2009-04-03 Thread Michael Ash
On Fri, Apr 3, 2009 at 9:36 AM, Michael Domino wrote: > Hi all, > > I have a task prepared and launched with the code below, and when it returns > (in this situation that status code returned from terminationStatus is 0), > it hangs in availableData, never to return. The stack at this point is ver

Re: Create a folder as a package/bundle ...

2009-04-03 Thread Sean McBride
On 4/3/09 12:07 PM, I. Savant said: >> One thing you should do is set the bundle bit of your folder.  You can >> use the MoreFilesX sample code, and call: >> >>  FSChangeFinderFlags (&theFsRef, true, kHasBundle); > > I don't think this will work on its own, but I could be wrong. Can >you verify t

Re: Create a folder as a package/bundle ...

2009-04-03 Thread I. Savant
On Fri, Apr 3, 2009 at 12:11 PM, Sean McBride wrote: > On 4/3/09 12:07 PM, I. Savant said: > >>> One thing you should do is set the bundle bit of your folder.  You can >>> use the MoreFilesX sample code, and call: >>> >>>  FSChangeFinderFlags (&theFsRef, true, kHasBundle); >> >>  I don't think thi

Re: Toll-free bridge type at runtime

2009-04-03 Thread Marcel Weiher
On Apr 3, 2009, at 9:06 , Michael Ash wrote: Of *course* I mean NSArray itself. What did you *think* I meant? Whenever I say NSArray I mean, hello, NSArray. That's what I thought, thanks for clarifying! I was getting worried there for a bit... And it is *not* pointless. Every instance o

IB Plugin help

2009-04-03 Thread Jon C. Munson II
Namaste! OK, I've read through the IB plug-in programming guide. That document essentially, as an example, discusses a highly simplistic NSButton derivative that doesn't have any code behind it. So, I'm a bit stuck. The object I'd like to make a plug-in of is an NSFormatter subclass. Is there

Re: Linking the "document edited" flag to the Undo menu item state

2009-04-03 Thread Ashley Clark
On Apr 2, 2009, at 10:57 PM, Huibert Aalbers wrote: Hi everyone, I am writing an application that offers support for Undo/Redo. Everything works fine, except for a small detail that bothers me. Since I set the document edited flag manually, using the [theWindow setDocumentEdited:YES] inst

Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-04-03 Thread glenn andreas
On Apr 3, 2009, at 10:15 AM, WT wrote: I do have a custom UIView for the grid, but it doesn't do much for now, since I'm currently using the UIImageView instances to do the heavy lifting. You are aware that you can pass an array of UIImages to a UIView and it will animate them at whate

Re: Toll-free bridge type at runtime

2009-04-03 Thread Bill Bumgarner
On Apr 3, 2009, at 12:22 AM, Ryan Joseph wrote: The Pascal compiler I'm using would need some extra runtime support (like telling me if a pointer is an object) to accomplish what you are talking about, but yes that is the way it should work. I think the Ruby and Python bridges made changes t

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Development
Thanks for the responses I see now that i had not hooked the end on exit method. On Apr 3, 2009, at 5:49 AM, Development wrote: How do I dismiss the keyboard from a UITextView when the cursor is moved out? ___ Cocoa-dev mailing list (Cocoa-dev@l

Re: Create a folder as a package/bundle ...

2009-04-03 Thread Sean McBride
On 4/3/09 12:15 PM, I. Savant said: > Yes, I agree this helps keep the file looking correct when >LaunchServices can't find the matching application (since the >application itself declares the type and declares it as being a >bundle/package), but my point is that I don't believe this on its own >

Re: Create a folder as a package/bundle ...

2009-04-03 Thread I. Savant
On Fri, Apr 3, 2009 at 2:13 PM, Sean McBride wrote: > It's sufficient.  Try this: > > $ cd ~ > $ mkdir package > $ SetFile -a B package Well I'll be damned. :-) This would've been *really* handy to know a few years ago when I built an application using a package-based documents. So it appea

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Bertil Holmberg
I think you are using this in the wrong order; "This method [textFieldDidEndEditing:] is called after the text field resigns its first responder status." How do you move the cursor outside the text field? Dave Mark handles this in his excellent book by using an invisible background view th

Re: hung in read$UNIX2003

2009-04-03 Thread Ken Thomases
On Apr 3, 2009, at 11:10 AM, Michael Ash wrote: On Fri, Apr 3, 2009 at 9:36 AM, Michael Domino wrote: I have a task prepared and launched with the code below, and when it returns (in this situation that status code returned from terminationStatus is 0), it hangs in availableData, never to

RE: IB Plugin help

2009-04-03 Thread Jon C. Munson II
Namaste! I've muddled along as far as I can go and I need further assistance. Here's what I've done so far: 1. Created a plug-in project. 2. Edited the class description file to contain two entries, my plug-in class and the superclass of NSFormatter (I was able to find and looked at the same f

Best Practice for reading a string with NSScanner

2009-04-03 Thread Gustavo Pizano
Hello, this is another post form a previous one that I was able to solve, but this one has to be more with a efficient method to achieve the following goal. I have a text file, which contains bunch of lines like this ones : (sorry about the identation) apphelp.dll5.1.26

Re: Toll-free bridge type at runtime

2009-04-03 Thread Michael Ash
On Fri, Apr 3, 2009 at 12:15 PM, Marcel Weiher wrote: > > On Apr 3, 2009, at 9:06 , Michael Ash wrote: > > Of *course* I mean NSArray itself. What did you *think* I meant? > Whenever I say NSArray I mean, hello, NSArray. > > That's what I thought, thanks for clarifying!  I was getting worried ther

Re: Linking the "document edited" flag to the Undo menu item state

2009-04-03 Thread Huibert Aalbers
Ashley, Thanks for your advice. I think you are right, I have implemented Graham's recommendation but even though undo/redo works fine, as you mention, there seems to be no effect on the window's dirty state. Regards, Huibert On 03/04/2009, at 10:22 a.m., Ashley Clark wrote: On Apr 2,

best practice for dealing with saving/loading preferences.

2009-04-03 Thread Memo Akten
I have an iphone app that runs at 60fps. I have all of my settings (about 10-15) stored in an NSMutableDictionary. When changes are made from the UI, the relevant NSNumber in the dictionary is updated. My update loop (which runs at 60fps) reads the settings directly from the dictionary (onc

Re: user access privileges to plist in /library/preferences

2009-04-03 Thread Memo Akten
On 1 Apr 2009, at 21:55, Greg Guerin wrote: Do you understand the Posix permissions and ownership concepts, as applied to files and dirs? If not, you need to learn those. Do you understand the Posix 'umask' concept and its default value? Again, you should learn that. Finally, you will n

Reading cab into object

2009-04-03 Thread Mark Bateman
Hi I have a csv file I want to use as a source for a searchable list The csv has 16 fields. I have managed to read the csv line by line into an array I'm having difficulty figuring out how to load an instance of an object with the single line of the array and initialising each of the obje

Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-04-03 Thread David Duncan
On Apr 2, 2009, at 8:11 PM, WT wrote: 25 was just a test. The actual app has 2 interlocking 7x7 grids, so the number of image views is actually 98. I should explain that this animated laying out of image views happens only once and, from that point on, the image views all remain in the same

NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Memo Akten
I was wondering if there is much difference between: NSString* kMyKey = @"aKey"; // and then throughout the application: [myDictionary setObject:xxx forKey:kMyKey]; [myDictionary objectForKey: kMyKey]; vs #define MYKEY @"aKey" // and then throughout the application: [myDictionary setObject:

Re: Best Practice for reading a string with NSScanner

2009-04-03 Thread Quincey Morris
On Apr 3, 2009, at 12:08, Gustavo Pizano wrote: I have a text file, which contains bunch of lines like this ones : (sorry about the identation) apphelp.dll5.1.2600.5512 Application Compatibility Client Library appmgmts.dll 5.1.2600.5512

Re: Bindings and MenuItems

2009-04-03 Thread Ben Lachman
On Apr 3, 2009, at 6:14 AM, Alexander Spohr wrote: Am 03.04.2009 um 06:49 schrieb Ben Lachman: No. That was what my original message outlined. Say you have a table view selected and hit cmd-p. NSView has a default implementation of print: so it will print the table view. In my case an

Re: user access privileges to plist in /library/preferences

2009-04-03 Thread Greg Guerin
Memo Akten wrote: I'm using -[NSDictionary writeToFile:atomically:] so I guess this isn't an option. But seeing as this file will not exist unless it was created by my app, and neither will the containing folder which I will create with full permissions, any file created in this folder wi

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Nate Weaver
IIRC they're optimized to point to the same memory location (I wasn't sure, so I tested and confirmed). I usually do: NSString * const kConstantNameHere = @"foo"; That's what I've seen in Apple headers (with an extern at the beginning and no assignment in said headers, of course). On Apr

Re: NSDate with Format?

2009-04-03 Thread Pierce Freeman
-- NSDateFormatter is your friend. =) You use it like this: NSDateFormatter * f = [[NSDateFormatter alloc] init]; [f setDateFormat:@"-mm-dd"]; NSLog([f stringFromDate:aDate]); [f release]; There's also a really handy "dateFromString" method that will parse a string according to the format s

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Quincey Morris
On Apr 3, 2009, at 15:15, Nate Weaver wrote: IIRC they're optimized to point to the same memory location (I wasn't sure, so I tested and confirmed). I usually do: NSString * const kConstantNameHere = @"foo"; That's what I've seen in Apple headers (with an extern at the beginning and no as

Re: Non-pageable app

2009-04-03 Thread Rich Collyer
My primary interest is to ensure that the content of an NSSecureTextField and any times I extract the string from it, the memory is not paged out, or cached. +++ Rich Collyer - Senior Software Engineer +++ On Apr 2, 2009, at 4:19 PM, Dave Carrigan wrot

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Memo Akten
Thanks for the replies guys. I do prefer the #define method simply because it's less maintenance (only add to one header, instead of header + .m) Cheers, Memo. On 3 Apr 2009, at 23:44, Quincey Morris wrote: On Apr 3, 2009, at 15:15, Nate Weaver wrote: IIRC they're optimized to point to

Re: Dragging around an NSImageView

2009-04-03 Thread BJ Homer
On Fri, Apr 3, 2009 at 9:54 AM, Randall Meadows wrote: > On Apr 3, 2009, at 4:14 AM, Aaron Scott wrote: > > I'm trying to figure out how to be able to drag an NSImageView around. The >> NSImageView has been added as a subview to another NSImageView. >> >> Basically, I'm trying to drag a grey box

Re: Non-pageable app

2009-04-03 Thread Clark Cox
On Fri, Apr 3, 2009 at 3:57 PM, Rich Collyer wrote: > My primary interest is to ensure that the content of an NSSecureTextField > and any times I extract the string from it, the memory is not paged out, or > cached. Then turn on "Use Secure Virtual Memory" in the Security Pane in System Preferenc

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Nate Weaver
I prefer the other for that exact reason since I don't have to have the actual definition in my headers, some of which (for notifications, e.g.) are used in a number of places. From the Apple docs: "In general, don’t use the #define preprocessor command to create constants. For integer cons

RE:IB Plugin help

2009-04-03 Thread jmunson
Namaste! Still plugging away at this... I found one mistake where I didn't change the IBInspector class of File's Owner in the Inspector.xib to "my" Inspector subclass. Doing that gave me an entry in the bottom box of the library, but no object in the middle pane... How do I fix that? A

Re: IB Plugin help

2009-04-03 Thread Ricky Sharp
On Apr 3, 2009, at 6:43 PM, jmun...@his.com wrote: I found one mistake where I didn't change the IBInspector class of File's Owner in the Inspector.xib to "my" Inspector subclass. Doing that gave me an entry in the bottom box of the library, but no object in the middle pane... How do I f

Re: IB Plugin help

2009-04-03 Thread jmunson
Namaste! Thank you, that was/is a big help. I also found BGHUDAppKit which was/is also invaluable help. Between those two good examples I think I got my plug-in working (using it live is what remains to be seen). I have one more question: How does one replace the blue cube object icon th

Error: mutating method sent to immutable object

2009-04-03 Thread Priscila J . V .
Hello, I'm trying to do this: int p; NSMutableArray * arregloNumeros = [[NSMutableArray alloc] init]; NSString * fileContents = [NSString stringWithContentsOfFile:@"lineasFinal.txt"]; NSEnumerator * lineFileEnumerator = [[fileContents componentsSeparatedByString:@"|"] obje

Re: IB Plugin help

2009-04-03 Thread jmunson
OK, now I have one more question. I'd like to "install" and use my plug-in. However, when accessing IB's preferences->Plug-ins and attempting to add the plug-in I get: 1) when simply adding the ibplugin an error that states the file is missing necessary resources and to reinstall the bund

Dragging anything out of a WebView into other Cocoa controls

2009-04-03 Thread Steven Degutis
Hello, I have been trying to figure out some way of dragging an image, text, link, anything really, out of a WebView, and into another Cocoa control, such as NSTextField, NSTableView, or NSImageView. Dragging these things out of my WebView and into other applications works fine, for example draggin

Re: Error: mutating method sent to immutable object

2009-04-03 Thread Graham Cox
On 04/04/2009, at 12:27 PM, Priscila J.V. wrote: Hello, I'm trying to do this: int p; NSMutableArray* arregloNumeros = [[NSMutableArray alloc] init]; NSString* fileContents = [NSString stringWithContentsOfFile:@"lineasFinal.txt"]; NSEnumerator* lineFileEnumerator = [[fileConten

Very interesting ordering caveat with NSArray arrayWithObjects:

2009-04-03 Thread Eric Hermanson
Some (or most) people might be aware of this caveat, but I was not, so I'll share it. Consider this code: NSArray *array = [NSArray arrayWithObjects:[MyCounterClass newObject], [MyCounterClass newObject], nil]; where [MyCounterClass newObject] is a static method that returns a new au

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Steve Taylor
textFieldDidEndEditing is only triggered once first responder has been resigned by the field. try something like - (BOOL)textFieldShouldReturn:(UITextField *)theTextField { if (theTextField == textField) { [textField resignFirstResponder]; } return YES; } where textField i

creating related objects

2009-04-03 Thread David Scheidt
I have an NSPersistantDocument application. In one one of my sheets to create an object, I need to have a checkbox that, if checked, will bring up the creation sheet for a related object. I can't figure out how to do this. I rather expect that I'm missing something simple, but I don't kn

Re: Example of collapsible disclosure view

2009-04-03 Thread James Huddleston
This might be helpful too: http://www.cocoarocket.com/articles/disclosureTriangles.html -James On Apr 2, 2009, at 9:57 AM, Robert Mullen wrote: I am working on a view and window that needs to collapse/expand with a disclosure triangle and cause the Window containing it to resize as well a

Re: Automatic code generation for C++/Objective C bridge

2009-04-03 Thread Ashish Sharma
I think there are "many" situations where this approach is used/ could be useful, for example, when you have your UI in cocoa and you want to communicate with the C++ objects. Ofcourse you can mix obj-c and c++ in a trivial way but that means your application sees both obj-c and C++ types. A classi

Screen recorder

2009-04-03 Thread Michaelian Ennis
I need a screen recorder to make some tutorials for using an application. The only real requirement is that there be a three button mouse transparency showing the button presses. This needs to support the display of chording ( multiple mouse buttons pressed at that same time ). The nature of t

WebKit: Javascript - Cocoa bridge not working

2009-04-03 Thread Marcel Hansemann
In my app, I have a WebView with JavaScript in it that occasionally needs to call externally defined Obj-C functions. According to documentation, this should be simple by conforming to the WebScripting protocol, but I just can't get it to work. I set up the bridge object like this: [[webVi

Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2009-04-03 Thread David Hoerl
[for the archives - old thread] This is a brute force mechanism to save the expanded NSOutlineView items prior to changing a Managed Object context and then restoring them after the modification. - (id)expandedState { NSMutableArray *state = [NSMutableArray array]; NSInteger count = [

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Andrew Farmer
On 03 Apr 09, at 15:15, Nate Weaver wrote: IIRC they're optimized to point to the same memory location (I wasn't sure, so I tested and confirmed). They'll point to the same object in memory within a single file, but multiple modules linked together aren't guaranteed to share string constan

Re: Dragging anything out of a WebView into other Cocoa controls

2009-04-03 Thread Steven Degutis
[Solved] Apparently I was using the wrong data source method to validate drops, which explains why this was not working with my NSOutlineView. Thanks for all the fish. - Anonymous On Fri, Apr 3, 2009 at 8:48 PM, Steven Degutis wrote: > Hello, > I have been trying to figure out some way of draggi

Re: How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-04-03 Thread WT
Thank you, Glenn and David. In a perfect world, the application would be designed in a way that completely abstracts how the animations are going to be implemented but, alas, I'm not that experienced yet, so I am still trying to ascertain what the best approach to go with is, so I won't hav

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Dave Keck
> As for read-only address space, does the const declaration not take care of > that? (Serious question.) I just tested whether it's possible to write at the address of an NSString declared with either: NSString *const HelloString = @"ABC123"; #define GoodbyeString @"XYZ345" (If you're intereste

Re: Screen recorder

2009-04-03 Thread Dave Keck
LMGTFY... http://shinywhitebox.com/ http://www.telestream.net/screen-flow/overview.htm http://www.macvcr.com/ http://www.ambrosiasw.com/utilities/snapzprox/ Personally, I've used ScreenFlow and it worked well. David ___ Cocoa-dev mailing list (Cocoa-d

Re: hung in read$UNIX2003

2009-04-03 Thread Michael Ash
On Fri, Apr 3, 2009 at 2:42 PM, Ken Thomases wrote: > On Apr 3, 2009, at 11:10 AM, Michael Ash wrote: > >> On Fri, Apr 3, 2009 at 9:36 AM, Michael Domino >> wrote: >> >>> I have a task prepared and launched with the code below, and when it >>> returns >>> (in this situation that status code retur

Re: Very interesting ordering caveat with NSArray arrayWithObjects:

2009-04-03 Thread Michael Ash
On Fri, Apr 3, 2009 at 8:30 PM, Eric Hermanson wrote: > Some (or most) people might be aware of this caveat, but I was not, so I'll > share it. > > Consider this code: > >    NSArray *array = [NSArray arrayWithObjects:[MyCounterClass newObject], > [MyCounterClass newObject], nil]; > > where [MyCou

Error: mutating method sent to immutable object

2009-04-03 Thread Priscila J . V .
Hello, I'm trying to do this: int p; NSMutableArray * arregloNumeros = [[NSMutableArray alloc] init]; NSString * fileContents = [NSString stringWithContentsOfFile:@"lineasFinal.txt"]; NSEnumerator * lineFileEnumerator = [[fileContents componentsSeparatedByString:@

Re: Screen recorder

2009-04-03 Thread Conrad Taylor
Hi, I would recommend Screen Flow to capture what you're doing on the computer and Mouse Posé to display your keyboard commands. Good luck, -Conrad Sent from my iPhone On Apr 3, 2009, at 7:15 PM, Michaelian Ennis wrote: I need a screen recorder to make some tutorials for using an appli

Where is "Accessibility Reference for Assistive Applications"?

2009-04-03 Thread m
In the "See Also" section of an old Accessibility doc is listed one named "Accessibility Reference for Assistive Applications", which uniquely (and frustratingly) is not linked to the actual document. Neither a Spotlight search of my machine, an Xcode Help search, or Google search seem to b

RE: Error: mutating method sent to immutable object

2009-04-03 Thread Priscila J . V .
Hello Graham, thanks a lot. > > On 04/04/2009, at 12:27 PM, Priscila J.V. wrote: > >> >> Hello, >> I'm trying to do this: > > int p; > NSMutableArray* arregloNumeros = [[NSMutableArray alloc] init]; > NSString* fileContents = [NSString > stringWithContentsOfFile:@"lineasF

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-03 Thread Quincey Morris
On Apr 3, 2009, at 19:32, Dave Keck wrote: As for read-only address space, does the const declaration not take care of that? (Serious question.) I just tested whether it's possible to write at the address of an NSString declared with either: NSString *const HelloString = @"ABC123"; #define

Re: creating related objects

2009-04-03 Thread Quincey Morris
On Apr 3, 2009, at 09:49, David Scheidt wrote: I have an NSPersistantDocument application. In one one of my sheets to create an object, I need to have a checkbox that, if checked, will bring up the creation sheet for a related object. I can't figure out how to do this. I rather expect th