Which language to get started with cocoa development?

2008-12-31 Thread Achim Domma
Hi, I develop software for a living and want to get started with cocoa development just for fun. I'm good at python, C, C++ and C# and have some Ruby knowledge. Now I'm asking myself, which language I should use to get started with cocoa development: - ObjC looks interesing, but would be

Need Xcode/Cocoa template for screensaver & interactive OpenGL app

2008-12-31 Thread Greg Edwards
Hi folks, I'm looking for an Xcode/Cocoa template that can build a screensaver, and also a normal interactive OpenGL app with the same gfx, in a bordered window or full-screen, with keystroke and gui control. This is for OpenGL and shader experimentation, to run only on Mac OS X 10.4/5. I've got t

Problem adding an entity to a to-many relationship

2008-12-31 Thread Keith Lander
I am trying to get my head round Core Data and Bindings. I have created a simple core data model consisting of two entities called Course and Student. There is a to-many relationship from Course to Student. I have created a view with one table for Courses and another for students. There is

Enable repeated Keyboard Event when key stays down

2008-12-31 Thread Simon Vanesse
Hello, I am currently improving the Wiiji source code (Wiiji is a open source software that allows the use of a wiimote as a Joystick + keyboard input on a mac). I have checked everywhere in the forums / google and haven't found a solution to have the keyboard repeat a keystroke when a key

Re: iTunes Scripting Bridge examples?

2008-12-31 Thread Charles Steinman
On Mon, Dec 29, 2008 at 9:15 PM, 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. Should be something like: iTunesApplication *iTunes = [SBApplica

Re: NSOutlineView

2008-12-31 Thread Mahaboob
When I¹m calling this method from toolbar in the main window, first the outlineView shows the value ³0x0² then it call another method, that queries the database retrieves all the data needed, and then control goes to [OutlineView reloadData]; .then also outlineView shows the value ³0x0². Then it f

Re: Automatically filling an app with test data

2008-12-31 Thread Kyle Sluder
On Wed, Dec 31, 2008 at 5:01 AM, Matteo Manferdini wrote: > I've finally come to the end of my app and now I need to test it with > data. The test with some data generated manually goes weel, but now I > have to fill the app with lots of data, to see how it behaves. Is > there a common approach to

Re: iTunes Scripting Bridge examples?

2008-12-31 Thread Scott Anguish
heh, no. This is a personal project I'm messing with. Nothing work related. On 30-Dec-08, at 1:41 PM, Kyle Sluder wrote: 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 t

Re: NSOutlineView

2008-12-31 Thread Mahaboob
Data is stored in a database and I¹m retrieving it by using QuickLite database. On 12/31/08 6:31 PM, "Timothy Larkin" wrote: > Where are the data coming from? A core data store? Or do you load them > explicitly? > > > -- > > > Timothy Larkin > > > Abstract Tools > > > Caroline, NY >

Re: NSSplitView

2008-12-31 Thread Sherm Pendley
On Dec 31, 2008, at 9:07 PM, Benjamin Dobson wrote: On 31 Dec 2008, at 22:53:46, David Blanton wrote: In Xcode 2.4.1 , debug view, all in one, the stack and vars are split, and below is source and there is one control point that moves the vert and horiz splitters Some Apple magic perhaps?

Re: mydoc.myext/QuickLook/Preview.html and full screen

2008-12-31 Thread Julien Jalon
On Wed, Dec 31, 2008 at 10:37 PM, Gerd Knops wrote: > > On Dec 31, 2008, at 1:22 PM, Gerd Knops wrote: > > I am looking to add QuickLook functionality to a fairly complex document. >> A static html file, using some javascript to interact with the document >> contents would be ideal for a number o

Re: NSSplitView

2008-12-31 Thread Benjamin Dobson
On 31 Dec 2008, at 22:53:46, David Blanton wrote: In Xcode 2.4.1 , debug view, all in one, the stack and vars are split, and below is source and there is one control point that moves the vert and horiz splitters Some Apple magic perhaps? I think posting a screenshot on the web would help

Re: Initial Prefs Setting Of Checkbox?

2008-12-31 Thread Graham Cox
On 1 Jan 2009, at 6:59 am, Chunk 1978 wrote: ok i get that... however, what if a developer intends to leave all checkboxes in preferences unchecked as the initial defaults, and there are only checkboxes or radio buttons, no colors, no numbers, etc... is it considered bad practice to not registe

Re: Display sleep vs. enterFullScreenMode

2008-12-31 Thread Sean McBride
Shayne Wissler (wiss...@gmail.com) on 2008-12-31 3:11 PM said: >I have an application that uses NSView's >enterFullScreenMode/exitFullScreenModeWithOptions in order to toggle >between fullscreen and normal display mode. Evidently, the default >behavior while in full screen mode is to disable OSX's

Re: Initial Prefs Setting Of Checkbox?

2008-12-31 Thread Matt Neuburg
On Wed, 31 Dec 2008 14:59:13 -0500, "Chunk 1978" said: >ok i get that... however, what if a developer intends to leave all >checkboxes in preferences unchecked as the initial defaults, and there >are only checkboxes or radio buttons, no colors, no numbers, etc... is >it considered bad practice to

Re: NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Richard Ashwell
Sweet Sweet!!! Magic!!! the : NSError *error; MyDocument *newDoc = [[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay: YES error: &error]; was the key, thank you so much Quincey!!! This both instantiates and lets me controll what is created!

agc error for object ... Deallocating a non-block

2008-12-31 Thread Michael Link
When I see an error on the console that looks like this: Test(22389,0xb0103000) malloc: *** free() called with 0x1f29ba00 with refcount 0 Test(22389,0xb0103000) malloc: *** auto malloc[22389]: agc error for object 0x1f29ba00: Deallocating a non-block What exactly does 'Deallocating a non-bl

Re: NSSplitView

2008-12-31 Thread David Blanton
In Xcode 2.4.1 , debug view, all in one, the stack and vars are split, and below is source and there is one control point that moves the vert and horiz splitters Some Apple magic perhaps? On Dec 31, 2008, at 3:49 PM, Brandon Walkin wrote: If you're looking at the same split view as I am (ma

Re: NSSplitView

2008-12-31 Thread Brandon Walkin
If you're looking at the same split view as I am (main window), it appears that they're just using a horizontal split view as the right subview in a vertical split view. There doesn't seem to be a resize handle that adjusts both directions. On 31-Dec-08, at 5:22 PM, David Blanton wrote: Ho

Re: NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Brandon Walkin
If you're looking at the same split view as I am (main window), it appears that they're just using a horizontal split view as the right subview in a vertical split view. There doesn't seem to be a resize handle that adjusts both directions. On 31-Dec-08, at 5:27 PM, Quincey Morris wrote:

NSSplitView

2008-12-31 Thread David Blanton
How does one make a connected horiz-vert split view like in Xcode, you know, one control point to size in both directions? HNY cocoa heads! David Blanton ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Quincey Morris
On Dec 31, 2008, at 13:49, Richard Ashwell wrote: 1) I am/was creating my document class "programatically" like: (Note Typed in email, and in my project MyDocument is actually named something else) MyDocument *newDoc = [[MyDocument alloc] init]; [newDoc importData:data]; Not so good. Wh

Re: NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Richard Ashwell
More details: Ok I, I think I have a lot to learn before I can call [NSDocumentController openUntitledDocumentAndDisplay:error], in the mean time I pulled out the extra call to makeWindowControllers and traced, When the document gets create via the New menu item the makeWindowControllers

Re: NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Richard Ashwell
Quincy thanks for your reply, ok I was going to start sending you tons of little snipits from my code, and I had the whole email, typed but decided to reread your comments carefully. In a nutshell: 1) I am/was creating my document class "programatically" like: (Note Typed in email, and i

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Quincey Morris
On Dec 31, 2008, at 12:11, Markus Spoettl wrote: On Dec 31, 2008, at 11:29 AM, Quincey Morris wrote: It's rather surprising that NSDocument's save-as-copy-and-move strategy that works so well for single files backfires so heavily in my case. ... -- You need periodic housekeeping to detect o

Re: mydoc.myext/QuickLook/Preview.html and full screen

2008-12-31 Thread Gerd Knops
On Dec 31, 2008, at 1:22 PM, Gerd Knops wrote: I am looking to add QuickLook functionality to a fairly complex document. A static html file, using some javascript to interact with the document contents would be ideal for a number of reasons. So I experimented by adding a QuickLook/Preview.

Re: NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Richard Ashwell
Ok some more details: I removed the subclassing of NSTextView entirely just to eliminate that as any sort of source for the problem so now: In my document nib I have a regular NSTextView, bound via IBOutlet to a variable in the document class. However still the NSTextView only responds t

Re: NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Quincey Morris
On Dec 31, 2008, at 11:58, Richard Ashwell wrote: 4) The next task was based on a selection in the database table, I wanted to programatically open a document and pre populate it from the data. It's not clear what you mean by "programmatically open a document". Are you invoking the same a

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Markus Spoettl
On Dec 31, 2008, at 11:29 AM, Quincey Morris wrote: It's rather surprising that NSDocument's save-as-copy-and-move strategy that works so well for single files backfires so heavily in my case. Well, to be accurate, it's not a NSDocument issue, it's a problem with updating in place more tha

Display sleep vs. enterFullScreenMode

2008-12-31 Thread Shayne Wissler
Hello, I have an application that uses NSView's enterFullScreenMode/exitFullScreenModeWithOptions in order to toggle between fullscreen and normal display mode. Evidently, the default behavior while in full screen mode is to disable OSX's display sleep timer. How can I re-enable it? I do not want

Re: Initial Prefs Setting Of Checkbox?

2008-12-31 Thread Chunk 1978
ok i get that... however, what if a developer intends to leave all checkboxes in preferences unchecked as the initial defaults, and there are only checkboxes or radio buttons, no colors, no numbers, etc... is it considered bad practice to not register these defaults if they are bound? or is it bet

NSPersistent Document but probably a Bindings Noobie Cry for Help

2008-12-31 Thread Richard Ashwell
Ok, First this is cry for help. Second I suck at the cocoa dev thing so I anticipate that I won't even describe this very well, please forgive my lack of skill in Cocoa Dev, but here goes: I have built a relatively complex application, but have dug a whole I can't fix or dig out of. I b

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Quincey Morris
On Dec 31, 2008, at 10:12, Markus Spoettl wrote: It's rather surprising that NSDocument's save-as-copy-and-move strategy that works so well for single files backfires so heavily in my case. Well, to be accurate, it's not a NSDocument issue, it's a problem with updating in place more than

mydoc.myext/QuickLook/Preview.html and full screen

2008-12-31 Thread Gerd Knops
I am looking to add QuickLook functionality to a fairly complex document. A static html file, using some javascript to interact with the document contents would be ideal for a number of reasons. So I experimented by adding a QuickLook/Preview.html file to my document bundle. That works fi

Re: modal sheet with validation logic

2008-12-31 Thread Nathan Kinsinger
On Dec 30, 2008, at 11:09 AM, Ronnie B wrote: 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. I'd say this is completely usual. Two things I am try

Re: modifier key query

2008-12-31 Thread Sean McBride
Ricky Sharp (rsh...@mac.com) on 2008-12-31 1:21 PM said: >>> Is there a way to know if a modifier key (shift, ctrl, option, cmd, >>> etc) is pressed? Obviously, there's this: >>> NSUInteger modifierFlags = [theEvent modifierFlags]; >>> >>> but what if you need to know this information independent

Re: modifier key query

2008-12-31 Thread Ricky Sharp
On Dec 31, 2008, at 11:36 AM, Sean McBride wrote: Wesley Smith (wesley.h...@gmail.com) on 2008-12-26 3:04 AM said: Is there a way to know if a modifier key (shift, ctrl, option, cmd, etc) is pressed? Obviously, there's this: NSUInteger modifierFlags = [theEvent modifierFlags]; but what if y

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Markus Spoettl
On Dec 31, 2008, at 4:46 AM, Quincey Morris wrote: I don't see how trying to do this in - writeToURL:ofType:forSaveOperation:originalContentsURL:error: is ever going to work. If you are given (basically) an old and new package location, then you're forced to copy everything: -- Trying to

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Kyle Sluder
On Wed, Dec 31, 2008 at 1:08 PM, Markus Spoettl wrote: > That would not help a lot because I'd have to copy the unchanged parts or > the old package into the new package. The whole idea was not to re-write > data that hasn't changed. I wasn't thinking completely straight last night... you'll want

Re: Reversing a String

2008-12-31 Thread Ricky Sharp
On Dec 31, 2008, at 10:52 AM, Michael Ash wrote: The key is the usage of -rangeOfComposedCharacterSequenceAtIndex:. Without calling this method or doing the equivalent to what it does, your code will suffer the problems I described above. I tested that code with the string @"abcdéf𝄞g" (that's

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Markus Spoettl
On Dec 31, 2008, at 1:32 AM, Kyle Sluder wrote: On Wed, Dec 31, 2008 at 4:16 AM, Markus Spoettl wrote: No I have not, but I have a feeling that it wouldn't be suitable. The data I store contains (when the document is big) millions of double values (amongst other things) spread across hundre

Re: Making an object release itself?

2008-12-31 Thread Jean-Daniel Dupas
Le 31 déc. 08 à 18:28, Matt Neuburg a écrit : On Wed, 31 Dec 2008 14:28:44 +1100, Jacob Rhoden > said: I'm thinking PostReader class could have a static function that initialises a new PostReader object, tells it to start the work, and then do a [self release] after it has called the callback

Re: modifier key query

2008-12-31 Thread Sean McBride
Wesley Smith (wesley.h...@gmail.com) on 2008-12-26 3:04 AM said: >Is there a way to know if a modifier key (shift, ctrl, option, cmd, >etc) is pressed? Obviously, there's this: >NSUInteger modifierFlags = [theEvent modifierFlags]; > >but what if you need to know this information independent of an

Re: Initial Prefs Setting Of Checkbox?

2008-12-31 Thread Matt Neuburg
On Tue, 30 Dec 2008 23:25:03 -0500, "Chunk 1978" said: >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) be

Re: Making an object release itself?

2008-12-31 Thread Matt Neuburg
On Wed, 31 Dec 2008 14:28:44 +1100, Jacob Rhoden said: >I'm thinking PostReader class could have a static function that >initialises a new PostReader object, tells it to start the work, and >then do a [self release] after it has called the callback function >'postsRead'; There is certainly nothin

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

2008-12-31 Thread Michael Ash
On Tue, Dec 30, 2008 at 8:18 PM, Steve Cronin wrote: > Michael; > > OK to really perhaps beat the poor horse, is the following kosher? > > (NSDictionary *) prefDictionary { >return [(NSDictionary *)CFPreferencesCopyMultiple(NULL, appBundleID, > kCFPreferencesCurrentUser, kCFPreference

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

2008-12-31 Thread Sean McBride
Steve Cronin (steve_cro...@mac.com) on 2008-12-28 8:41 PM said: >I have an application which will have an optional helper NSStatusItem. >The statusItem is a stand-alone application which can be installed as >a LoginItem. > >I want this status item to be able to read the preferences file from >the

Re: Pull Down Toolbar Item

2008-12-31 Thread Sean McBride
Carmen Cerino Jr. (ccerin...@gmail.com) on 2008-12-29 10:00 AM said: >I would like to create a pull down toolbar item similar to what Xcode >has for a few of its toolbar items. BTW, the HIG talks about these a little:

NSTextField Content Sensitive Menu

2008-12-31 Thread John Nairn
I added a menu to an NSTextField and it works when first clicked, but when the field is the first responder, the Field Editor takes over with its own menu (as I should have guessed). My plan was 1. Insert custom field editor 2. Overide menuForEvent, capture the default menu, append my comma

Re: Reversing a String

2008-12-31 Thread Michael Ash
On Wed, Dec 31, 2008 at 11:29 AM, Dave DeLong wrote: > Ironic... This question came up in a job interview I had a couple weeks ago. > The following NSString category will work to reverse a string, and in my > limited tests, it works with accents, mathematical symbols, and Korean > characters: > >

Re: Reversing a String

2008-12-31 Thread Dave DeLong
Looks like the attachment didn't come along. It's up here: http://davedelong.com/stuff/stringreverse.png Dave On Dec 31, 2008, at 9:29 AM, Dave DeLong wrote: Ironic... This question came up in a job interview I had a couple weeks ago. The following NSString category will work to reverse a

Re: Reversing a String

2008-12-31 Thread Dave DeLong
Ironic... This question came up in a job interview I had a couple weeks ago. The following NSString category will work to reverse a string, and in my limited tests, it works with accents, mathematical symbols, and Korean characters: - (NSString *) stringByReversingSelf { NSMutableS

Re: Reversing a String (Gabe Shahbazian)

2008-12-31 Thread Michael Ash
On Wed, Dec 31, 2008 at 4:28 AM, Peter Hudson wrote: > I have been using the following for a while across a number of languages > without problems. > > > NSString *s = @"Hello"; > unsigned int length = [s length]; > unsigned int index = length - 1; > > NSMutableArray *ma = [NSMutableArray array

Re: NSColorWell with NSTextView-------need help

2008-12-31 Thread Ross Carter
The problem is ,when we select a range of text from the nstextview and click the nscolorwell (background instance) the text color also is changed .(ie the text color and background color become same ) Search the archives for NSTextView and changeColor. You probably want to override changeC

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Quincey Morris
On Dec 31, 2008, at 01:32, Kyle Sluder wrote: For safe save operations, AppKit writes the data to a temporary file on the same volume, and then swaps the old file with the new, which is an atomic operation. If it can't do that, it will rename the original file and write the new one with the old

Re: Odd EXEC_BAD_ACCESS after executing URLRequest

2008-12-31 Thread marc hoffman
Jacob, Are you sure you are not accidentally triggering two 'send message' calls concurrently. One of the most common causes of this problem is that your second request is over-writing the variables of an already in progress request. Check that done is not set to yes when you call your '

AW: AW: NSColorWell shows no color

2008-12-31 Thread tobias assmann
Hello, I had a look in my nib file again and checked the following things: no bindings are enabled awake from nib is being called (can`t use debugger cause it is no app, but a gui of a audio unit, but printf told me) I have exactly four instances of color well in my view And here is the cause o

Automatically filling an app with test data

2008-12-31 Thread Matteo Manferdini
Hi everyone. I've finally come to the end of my app and now I need to test it with data. The test with some data generated manually goes weel, but now I have to fill the app with lots of data, to see how it behaves. Is there a common approach to doing this? I came across the Cocoa scripting guide,

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Kyle Sluder
By the way, this means that you can't just write out a diff to the existing file on disk. You must replace the entire file inside your document package. This is what I had thought you would originally want to do; you are still performing wholesale writes, but not of the entire document, just the

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Kyle Sluder
On Wed, Dec 31, 2008 at 4:16 AM, Markus Spoettl wrote: > No I have not, but I have a feeling that it wouldn't be suitable. The data I > store contains (when the document is big) millions of double values (amongst > other things) spread across hundreds of thousands of objects. If the > performance

Reversing a String (Gabe Shahbazian)

2008-12-31 Thread Peter Hudson
I have been using the following for a while across a number of languages without problems. NSString *s = @"Hello"; unsigned int length = [s length]; unsigned int index = length - 1; NSMutableArray *ma = [NSMutableArray array]; while( index < UINT_MAX ) { NSRange rn

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Markus Spoettl
On Dec 31, 2008, at 12:57 AM, Kyle Sluder wrote: On Wed, Dec 31, 2008 at 3:51 AM, Markus Spoettl wrote: My app stores a lot of data in a document, potentially hundreds of megabytes. The problem with using single files and NSKeyedArchiver is that one has to write everything, even if only a tin

NSColorWell with NSTextView-------need help

2008-12-31 Thread rethish
Hi all, In my application I use two instance of nscolorwell, one for foreground color (which is a default one) and second one for setting the background color. For setting the background color I used the code: [textview setBackgroundColor:[colorwel color]]; This works upto some extend,the backg

Re: Storing NSDocument data in packages/bundles

2008-12-31 Thread Kyle Sluder
On Wed, Dec 31, 2008 at 3:51 AM, Markus Spoettl wrote: > My app stores a lot of data in a document, potentially hundreds of > megabytes. The problem with using single files and NSKeyedArchiver is that > one has to write everything, even if only a tiny part of the structure > changed. My data is cl

Re: Reversing a String

2008-12-31 Thread Martin Wierschin
Unfortunately, this is not correct; -[NSString characterAtIndex:] returns a unichar, which is not a char. In addition, it will give odd results for composed characters. Depending on what you want, you might be able to use rangeOfComposedCharacterAtIndex:. I'd also use NSMutableString inst

Storing NSDocument data in packages/bundles

2008-12-31 Thread Markus Spoettl
Hello List, I'm thinking of switching from a single-file based document file storage to a package document with various files in it, I have a little problem with that though: My app stores a lot of data in a document, potentially hundreds of megabytes. The problem with using single file