@class causing grief

2008-03-18 Thread Scott Squires
I'm starting to go in circles at this point. I know I've got a number of interconnecting files. Since I was getting errors I replaced the #import as much as possible with @class defines I'm still getting the following error: error: syntax error before 'AT_NAME' token This indicates @class my

CoreData code working on Tiger - not on Leopard

2008-03-18 Thread Steve Cronin
Folks; I am now testing a Tiger application on Leopard and learning the new Leopard way at the same time. I admit I have a lot of Leoparding to do! I use Core Data (SQLite) pretty extensively on Tiger - life is good. I take the project and run it without any changes to the model or the cod

Re: @class causing grief

2008-03-18 Thread Ron Fleckner
On 18/03/2008, at 6:32 PM, Scott Squires wrote: I'm starting to go in circles at this point. I know I've got a number of interconnecting files. Since I was getting errors I replaced the #import as much as possible with @class defines I'm still getting the following error: error: syntax err

Re: CoreData code working on Tiger - not on Leopard

2008-03-18 Thread Quincey Morris
On Mar 18, 2008, at 00:33, Steve Cronin wrote: On Leopard in the 'processPendingChanges' invocation I get the following: 0 0x900ef0f4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ #1 0x93d680fb in objc_exception_throw #2 0x9649a2a5 in - [NSManagedObjectContext(_NSInternalChangeP

Setting Web Proxy programmatically

2008-03-18 Thread parag vibhute
Hi all, My requirement is to set Web Proxy & Secure Web proxy which appears in Network pane of System Preferences. I want to achieve this programmatically. Is this possible? Which framework should I use? Thanks, Palav -- There are many things in your life that will catch your eye but only a

Re: @class causing grief

2008-03-18 Thread Quincey Morris
On Mar 18, 2008, at 00:32, Scott Squires wrote: I'm still getting the following error: error: syntax error before 'AT_NAME' token This indicates @class myClass; in the following examples. Most of these work fine but if I end up swapping #import instead then other areas break the compiler.

Re: Setting Web Proxy programmatically

2008-03-18 Thread Cocoa Developer
Hi Palav, Yes it is possible. You need to use SystemConfiguration framework. You can get all proxy information except authentication. So don't try to get proxy information from network pane. Its useless. If you want to use network pane in system preference then use CFSocket. (Best option) CFSocke

NSAppleScript returning wrong error info

2008-03-18 Thread Vinay Prabhu
I am trying to create a NSAppleScript object using a applescript file. The code is as follows, NSDictionary* errorInfo; NSAppleScript *script = [[NSAppleScriptalloc] initWithContentsOfURL: scriptURL error: &errorInfo]; As per the documentation, on return 'errorInfo' should point to a dictio

Re: NSAppleScript returning wrong error info

2008-03-18 Thread Jean-Daniel Dupas
Le 18 mars 08 à 10:47, Vinay Prabhu a écrit : I am trying to create a NSAppleScript object using a applescript file. The code is as follows, NSDictionary* errorInfo; NSAppleScript *script = [[NSAppleScriptalloc] initWithContentsOfURL: scriptURL error: &errorInfo]; As per the documentation,

Re: NSAppleScript returning wrong error info

2008-03-18 Thread Vinay Prabhu
Thanks for the help. Initializing the error to nil did the trick. -Vinay On Mar 18, 2008, at 3:50 PM, Jean-Daniel Dupas wrote: Le 18 mars 08 à 10:47, Vinay Prabhu a écrit : I am trying to create a NSAppleScript object using a applescript file. The code is as follows, NSDictionary* errorI

Re: Setting Web Proxy programmatically

2008-03-18 Thread parag vibhute
My requirement is to set proxy via selecting "Using a PAC file" in Configure proxy drop-down button of Network pane of system preferences. I have to achieve this programmatically. How to do this? Thanks, Palav On Tue, Mar 18, 2008 at 2:39 PM, Cocoa Developer <[EMAIL PROTECTED]> wrote: > > Hi Pa

Re: Setting Web Proxy programmatically

2008-03-18 Thread Jean-Daniel Dupas
As already said by Basavaraj, all proxy settings are accessible using the "SystemConfiguration" Framework. Le 18 mars 08 à 13:37, parag vibhute a écrit : My requirement is to set proxy via selecting "Using a PAC file" in Configure proxy drop-down button of Network pane of system preference

Re: NSTreeController & NSOutlineView bindings w/ Core Data

2008-03-18 Thread Steven Huey
Ian, Check out http://tinyurl.com/2txz6o , it's the section of the "Core Data Programming Guide" titled "Managed Object Accessor Methods", it shows what methods you need to implement for working with multi-value relationships. Also take a look at the methods generated by selecting your "s

Re: Prevent application activation after dragging items to the Dock icon?

2008-03-18 Thread Peter Maurer
[applicationShouldHandleReopen:hasVisibleWindows:] means "clicked on its icon in the Dock". I.e the actions that are used to launch an app with no documents. It does not apply to opening documents, even if the Dock is involved. Indeed. And I think this one is more about "What happens when

Re: Setting Web Proxy programmatically

2008-03-18 Thread parag vibhute
Thank for reply. As you said, they are accessible but are they writable? Through search, I think they are only readable or for getting notification. But my requirement is to change it. Thanks, Palav On Tue, Mar 18, 2008 at 6:29 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > As already said

Re: Confused about CFRunLoop

2008-03-18 Thread Brian Greenstone
Yay, I knew there was a way to do this, and I finally figured it out! Ok, so I'm able to emulate the Carbon calls exactly how I wanted by doing this: Step 1: Create the CF Timer... CFRunLoopTimerRef timer = CFRunLoopTimerCreate(...); CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer,

Re: Setting Web Proxy programmatically

2008-03-18 Thread Jean-Daniel Dupas
have a look at the MoreSCF sample on ADC site (http://developer.apple.com/samplecode/MoreSCF/ ). There is a bunch of helper to retreive and change configuration. Le 18 mars 08 à 14:38, parag vibhute a écrit : Thank for reply. As you said, they are accessible but are they writable? Through

Re: @class causing grief

2008-03-18 Thread Scott Squires
Thanks for the feedback. Turns out 'error: syntax error before 'AT_NAME' token' was actually caused by a having a cut/paste accident where a word was placed at the very start of another file (before the standard block of disclaimers, etc) I just ahppened to scroll up and spot it in the far

Re: NSView enterFullScreenMode:withOptions: woes; window levels

2008-03-18 Thread Sean McBride
On 3/18/08 12:05 AM, Brian Christensen said: >> NSDictionary* options = [NSDictionary >> dictionaryWithObjectsAndKeys: >>[NSNumber numberWithInt:kCGNormalWindowLevel], >>NSFullScreenModeWindowLevel, nil]; >> [groupView enterFullScreenMode:[NSScreen mainScreen] >> withOptions:

Re: NSAppleScript returning wrong error info

2008-03-18 Thread Nir Soffer
On Mar 18, 2008, at 11:47, Vinay Prabhu wrote: I am trying to create a NSAppleScript object using a applescript file. The code is as follows, NSDictionary* errorInfo; NSAppleScript *script = [[NSAppleScriptalloc] initWithContentsOfURL: scriptURL error: &errorInfo]; As per the documentation

Re: NSMatrix

2008-03-18 Thread Jens Alfke
On 17 Mar '08, at 7:55 PM, Matthew Miller wrote: I am a complete and total new person to coca and I need to create a horizontal Matrix of cells to house icons of applicationp URLs from a table. I totally don't know how to do this. Start with something simpler, then. Take one of the many ex

NSTableViewnot reflecting data changes

2008-03-18 Thread Valentin Dan
Hi, I have a NSTableView for witch I implemented a custom DataSource class. When I create & set the dataSource for the first time, the NSTableView lists correctly the information; but when I change the data in the DataSource object the table view no longer updates to reflect the added dat

Re: NSTableViewnot reflecting data changes

2008-03-18 Thread Stéphane
Am Mar 18, 2008 um 4:14 PM schrieb Valentin Dan: Hi, I have a NSTableView for witch I implemented a custom DataSource class. When I create & set the dataSource for the first time, the NSTableView lists correctly the information; but when I change the data in the DataSource object t

RE: NSTableViewnot reflecting data changes

2008-03-18 Thread Valentin Dan
That was too easy; I'll try to come up with harder problems from now one :) All kidding aside ... it works (of course) Thanks ! ___ Valentin Dan, Software Developer Direct: +1 905 886 1833 ext.3047

Re: NSTableViewnot reflecting data changes

2008-03-18 Thread Keary Suska
on 3/18/08 9:14 AM, [EMAIL PROTECTED] purportedly said: > When I create & set the dataSource for the first time, the NSTableView lists > correctly the information; but when I change the data in the DataSource object > the table view no longer updates to reflect the added data. > > Can someone tel

Re: Setting Web Proxy programmatically

2008-03-18 Thread parag vibhute
Thanks for URL. I went through code & system configuation framework. There I found that you can set HTTP(HTTPS etc.) proxy and also PAC file URL (using kSCPropNetProxiesProxyAutoConfigURLString key) but I want to configure proxies using PAC file. When I analyzed network pane of system preferences

Re: @class causing grief

2008-03-18 Thread Jens Alfke
On 18 Mar '08, at 12:32 AM, Scott Squires wrote: I'm still getting the following error: error: syntax error before 'AT_NAME' token ... #import @class myClass; (1) Does "stdStuff.h" include the AppKit, Foundation or Cocoa framework headers? If not, then NSObject itself hasn't been declare

Re: Setting Web Proxy programmatically

2008-03-18 Thread Jean-Daniel Dupas
And the kSCPropNetProxiesProxyAutoConfigEnable key does not do that? Le 18 mars 08 à 16:50, parag vibhute a écrit : Thanks for URL. I went through code & system configuation framework. There I found that you can set HTTP(HTTPS etc.) proxy and also PAC file URL (using kSCPropNetProxiesProxyA

Re: reading data from a UDP port - questions

2008-03-18 Thread Rob Napier
Your NSLog() is giving unexpected results because you are using %s. This is a cstring (not NSString), which is null-terminated. What you probably mean is this (at least for testing purposes): NSLog (@"socketCallback (DMX event). >%@< %i bytes", msg, [msg length]); This will print the hex codes

Re: interface builder 3 question

2008-03-18 Thread Jack Repenning
On Mar 17, 2008, at 11:44 PM, [EMAIL PROTECTED] wrote: Starting with Interface Builder 3, it is suggested that you don't define your class in IB and have it generate the code. Instead you define it in XCode and IB will stay in sync with those changes. I've been getting a sense of surprise

NSTableView solution feedback and questions

2008-03-18 Thread Jay Martin
All, I'm new to Cocoa (surprise) and I'm now working on a little app, and I've come up with a solution to an issue and I'd like some feedback on that solution. Here's the problem description: I have an NSTableView, bound to an NSArrayController, which is bound to my custom object. So far

@class causing grief

2008-03-18 Thread Stuart Malin
Scott, I notice that I get the AT_NAME compiler error when I've forgotten or mistyped a semicolon _prior_ to the place where an @ symbol is used. For instance, in the following code: @class SomeClassA @class SomeClassB; @interface test : NSObject { SomeClassA *someC

Re: NSTableView solution feedback and questions

2008-03-18 Thread Jeff LaMarche
Jay: Well, I've never had this particular situation, but you could try registering for textDidBeginEditing) notification from the table view, then your code will have a way of knowing when the user is editing a table. If it's currently being edited when your timer method starts to do an u

Re: Python/Ruby for Cocoa (was: Simple question)

2008-03-18 Thread Scott Thompson
I completely agree - and I wrote CamelBones, the Cocoa/Perl bridge. It is, and always has been, my opinion that language bridges are not an adequate substitute for learning Cocoa's native language, Objective-C. What they are *great* for is giving additional options to a skilled programmer wh

XCode3 errors on startup

2008-03-18 Thread Steve Cronin
Folks; When I start XCode3 in Leopard I am seeing the following in Console.app. Any ideas on what is going on? Steve 3/18/08 8:27:39 AM Xcode[110] Xcode(110,0xb0103000) malloc: free_garbage: garbage ptr = 0x2963030, has non-zero refcount = 1 3/18/08 8:27:39 AM Xcode[110] Xcode(110,0xb0103000

Carbon Menu in Cocoa app

2008-03-18 Thread cai qin
Hi all, I've searched the list and googled this problem , but I still don't get the exact solution. I have a cocoa app developed in Tiger . Is it possible that Using a carbon menuRef to get App 's mainMenu? I have tried the MenuRef _NSGetCarbonMenu(NSMenu* aMenu); but my menuRef always gets 0x0. Is

Re: XCode3 errors on startup

2008-03-18 Thread Nick Zitzmann
On Mar 18, 2008, at 11:29 AM, Steve Cronin wrote: When I start XCode3 in Leopard I am seeing the following in Console.app. Any ideas on what is going on? 1. IANTM, but the xcode-users list is the place where Xcode discussion should go. 2. Are you actually having problems running Xcode?

Re: XCode3 errors on startup

2008-03-18 Thread j o a r
On Mar 18, 2008, at 10:29 AM, Steve Cronin wrote: When I start XCode3 in Leopard I am seeing the following in Console.app. Any ideas on what is going on? This question belongs, and has been answered, on Xcode-Users:

Re: CoreData code working on Tiger - not on Leopard

2008-03-18 Thread Steve Cronin
Folks; I have a little more data on this issue: After I have done any insert, if I subsequently call - processPendingChanges I get an error in CoreData. There are no pending messages in the log and no custom catch blocks (other than what is show below). The debugger halts on the @try comman

Re: Carbon Menu in Cocoa app

2008-03-18 Thread Nick Zitzmann
On Mar 18, 2008, at 11:32 AM, cai qin wrote: I have a cocoa app developed in Tiger . Is it possible that Using a carbon menuRef to get App 's mainMenu? I have tried the MenuRef _NSGetCarbonMenu(NSMenu* aMenu); but my menuRef always gets 0x0. Is this private API still available ? I don't

Re: NSTableView solution feedback and questions

2008-03-18 Thread Laurent Cerveau
On Mar 18, 2008, at 6:17 PM, Jay Martin <[EMAIL PROTECTED]> wrote: All, I'm new to Cocoa (surprise) and I'm now working on a little app, and I've come up with a solution to an issue and I'd like some feedback on that solution. Here's the problem description: I have an NSTableView, bound

Re: interface builder 3 question

2008-03-18 Thread Quincey Morris
On Mar 18, 2008, at 10:15, Jack Repenning wrote: I've been getting a sense of surprise over this, like it's not always working. Can anyone explain to me exactly when this synchronization happens? I feel it happens sometimes, and not others, and rather than be surprised I've gone back to

Re: XCode3 errors on startup

2008-03-18 Thread Jean-Daniel Dupas
Yes, Xcode love to tell you what it does, but it's not really important. All those warning are a side effect of garbage collection in software that use to leak nad should be ignored. Le 18 mars 08 à 18:29, Steve Cronin a écrit : Folks; When I start XCode3 in Leopard I am seeing the follow

Getting notifications when any file in a folder change

2008-03-18 Thread Mr. Gecko
Hello I am wondering how to get my program to notice when a file changes in a folder. For an example I have a bundle with files in it that gets opened with another program and I want my program to know when the other program saves and what file it saved in that bundle so that my program can

Re: @class causing grief

2008-03-18 Thread Quincey Morris
On Mar 18, 2008, at 10:18, Stuart Malin wrote: The compiler will report "parse error before 'AT_NAME' token for the line @class SomeClassB; yet the problem is on the _prior_ line -- the missing semicolon at the end -- and so the token "SomeClassA" ends up not being defined (which is why

Best way to execute a shell script from a cocoa application

2008-03-18 Thread Ryan Chapman
What is the best way to execute a shell script from a Cocoa application? I need to be able to specify arguments, like what execv() provides. -Ryan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Getting notifications when any file in a folder change

2008-03-18 Thread j o a r
On Mar 18, 2008, at 11:07 AM, Mr. Gecko wrote: Hello I am wondering how to get my program to notice when a file changes in a folder. See:

Re: Carbon Menu in Cocoa app

2008-03-18 Thread Daniel zeilMal
I have a custom view . And I have drew something on this view . I want to add a custom view to a menuItem . But this is not supported before Leopard .So I'm going to ask help to carbon. The main idea is that I get the menuRef from the [NSApp mainMenu] ,and then draw something on that specific menuI

Re: Best way to execute a shell script from a cocoa application

2008-03-18 Thread Jean-Daniel Dupas
Le 18 mars 08 à 19:14, Ryan Chapman a écrit : What is the best way to execute a shell script from a Cocoa application? I need to be able to specify arguments, like what execv() provides. -Ryan NSTask is able to launch an executable with arguments. ___

Re: NSTableView solution feedback and questions

2008-03-18 Thread Quincey Morris
On Mar 18, 2008, at 10:17, Jay Martin wrote: I have an NSTableView, bound to an NSArrayController, which is bound to my custom object. So far so good. I can change attributes, add, remove, all that good stuff. Now, my custom object can have one property changed programmatically by an NSTim

Re: Carbon Menu in Cocoa app

2008-03-18 Thread Kyle Sluder
On Tue, Mar 18, 2008 at 2:25 PM, Daniel zeilMal <[EMAIL PROTECTED]> wrote: > I have a custom view . And I have drew something on this view . I want to > add a custom view to a menuItem . But this is not supported before Leopard > .So Are you trying to use _NSGetCarbonMenu on Leopard? If so, jus

Re: NSTableView solution feedback and questions

2008-03-18 Thread Jay Martin
If your data model is updated but not the Table View simply calling setNeedsDisplay on the tv should be enough and less expensive (you can even simply call it for rects of cells to be updated) Laurent That's it! Using setNeedsDisplay (instead of reloadData) on the TableView while another

Re: Carbon Menu in Cocoa app

2008-03-18 Thread Daniel zeilMal
NO , I'm not going to use it on leopard . Cause in leopard , NSMenuItem support setting custom views using API setView:.What I want , just using it in Tiger . extern MenuRef _NSGetCarbonMenu( NSMenu *menu); @implementation MyController OSStatus PictureHandler( EventHandlerCallRef caller, Eve

Re: Getting notifications when any file in a folder change

2008-03-18 Thread Ryan Chapman
And here are a few implementations of FSEvents: Open source implemenation of how to subscribe to file system events http://greenearthcommons.org/rian/gfslogger/ Command line utility that shows file system events in real time http://www.kernelthread.com/software/fslogger/ GUI utility that show

Re: NSTableView solution feedback and questions

2008-03-18 Thread Keary Suska
on 3/18/08 11:17 AM, [EMAIL PROTECTED] purportedly said: > I have an NSTableView, bound to an NSArrayController, which is bound > to my custom object. So far so good. I can change attributes, add, > remove, all that good stuff. Now, my custom object can have one > property changed programmatically

Re: Confused about CFRunLoop

2008-03-18 Thread Hamish Allan
On Tue, Mar 18, 2008 at 1:41 PM, Brian Greenstone <[EMAIL PROTECTED]> wrote: > Now I just need to figure out the > CF equivalent of thos NSApplication calls and then I can be Obj-C > free ;) You're asking in the wrong place. Perhaps try http://lists.apple.com/mailman/listinfo/carbon-dev ? Ham

Re: interface builder 3 question

2008-03-18 Thread Jonathan Hess
Hey Jack - IB syncs with Xcode whenever a document comes to the foreground and there is an open project for that document. IB only syncs the files as the appear on disk, so if you have unsaved changes in an editor window, IB won't pick them up. IB also only pulls in the headers from the

Re: Modifying glyph storage in NSLayoutManager

2008-03-18 Thread Ross Carter
On Mar 17, 2008, at 11:19 PM, Martin Wierschin wrote: I have some text items whose glyphs cannot be determined until layout. The text string might contain a marker to draw the current page number, or to sequentially number paragraphs, etc. The glyphs can be determined only by the layout man

Re: interface builder 3 question

2008-03-18 Thread Jack Repenning
On Mar 18, 2008, at 1:06 PM, Jonathan Hess wrote: IB syncs with Xcode whenever a document comes to the foreground and there is an open project for that document. IB only syncs the files as the appear on disk, so if you have unsaved changes in an editor window, IB won't pick them up. IB als

NSTableView double click binding and clickedRow

2008-03-18 Thread Paul Thomas
I have an NSTableView (multiple selection, not editable) and I want to do something with the elements of the displayed list when the user double clicks. Even though the table has multiple selection, I only want to action the single element that the user double-clicked. If I set up a target/

NSTextField value binding (feeling like a newbie)

2008-03-18 Thread Jeff LaMarche
Working with IB3 to try and get my bearings again, and I know I'm doing something stupid here. I have an NSTextField inside an NSScrollView created in IB3. I have bound the value binding of the NSTextField to an NSString called feedback, exposed as an Objective-C 2.0 property,declared like

Re: NSTextField value binding (feeling like a newbie)

2008-03-18 Thread Jeff LaMarche
On Mar 18, 2008, at 5:33 PM, Jeff LaMarche wrote: . If I run my program, and make changes to the string (feedback), those are not reflected in the text field even though I can tell through the debugger that the string is changing. Just a clarification, if I populate the string with a starti

Re: Cocoa-dev Digest, Vol 5, Issue 430

2008-03-18 Thread James Hober
On Mar 18, 2008, at 11:36 AM, [EMAIL PROTECTED] wrote: On Mar 18, 2008, at 11:32 AM, cai qin wrote: I have a cocoa app developed in Tiger . Is it possible that Using a carbon menuRef to get App 's mainMenu? Why not just use public Carbon API? MenuRef carbonMenuBar = AcquireRootMenu(); ...

Re: NSTextField value binding (feeling like a newbie)

2008-03-18 Thread Quincey Morris
On Mar 18, 2008, at 14:33, Jeff LaMarche wrote: I have bound the value binding of the NSTextField to an NSString called feedback, Actually, you bind the text field to the property "feedback" of some object (File's Owner?). When you start using array properties, getting this terminology r

Re: Carbon Menu in Cocoa app

2008-03-18 Thread James Hober
On Mar 18, 2008, at 11:32 AM, cai qin wrote: I have a cocoa app developed in Tiger . Is it possible that Using a carbon menuRef to get App 's mainMenu? Why not just use public Carbon API? MenuRef carbonMenuBar = AcquireRootMenu(); ... error = ReleaseMenu(carbonMenuBar); //clean up and rememb

Re: Python/Ruby for Cocoa (was: Simple question)

2008-03-18 Thread Sherm Pendley
On Tue, Mar 18, 2008 at 1:02 PM, Scott Thompson <[EMAIL PROTECTED]> wrote: > > I completely agree - and I wrote CamelBones, the Cocoa/Perl bridge. > > It is, > > and always has been, my opinion that language bridges are not an > > adequate > > substitute for learning Cocoa's native language, Objec

Re: NSTextField value binding (feeling like a newbie)

2008-03-18 Thread Jeff LaMarche
Quincey - Thanks much. You pointed me in the right direction - I was doing this: [self.feedback appendString:string]; Thanks much for the help! On Mar 18, 2008, at 6:10 PM, Quincey Morris wrote: On Mar 18, 2008, at 14:33, Jeff LaMarche wrote: I have bound the value binding of the NSTextFie

Re: Cocoa-dev Digest, Vol 5, Issue 430

2008-03-18 Thread Daniel zeilMal
Thanks a lot , James.Actually , I don't want to use carbon . : ( Because I'm totally a newbie to carbon.But I have no choice to do that . I have a custom view which need to set into a menuItem . This is not supported in Tiger. And when I search the key word "Carbon Menu" in Google , there seems to

Leaks with savepanel

2008-03-18 Thread Mr. Gecko
I don't see where the leak is but there is a leak in this code. mainWindow.h #import @interface mainWindow : NSObject { } - (IBAction)button:(id)sender; @end mainWindow.m #import "mainWindow.h" @implementation mainWindow - (IBAction)button:(id)sender { NSSavePanel *panel = [NSSavePanel

Re: Equivalent to Carbon's TransitionWindow(); using genie when opening an NSWindow

2008-03-18 Thread John Stiles
TransitionWindow was never implemented well in OS X, as far as I know. Last I checked, it simply drew a few zoomrects using the look of the old OS 9 Finder. Not too impressive. It didn't do genie effects either. You might look into NSWindow's - (void)setFrame:(NSRect)windowFrame display:(BOOL)

PopupButton

2008-03-18 Thread Jay Martin
I have a NSPopupButton, bound Selected Tag to my array controller with the appropriate property. When a new object is created, the default value is appropriately selected out of the 2 menu items associated with the button (the value of the property is 0 or 1 as are the tags for the menu ite

Re: Equivalent to Carbon's TransitionWindow(); using genie when opening an NSWindow

2008-03-18 Thread Sean McBride
On 3/18/08 3:49 PM, John Stiles said: >TransitionWindow was never implemented well in OS X, as far as I know. >Last I checked, it simply drew a few zoomrects using the look of the old >OS 9 Finder. Not too impressive. It didn't do genie effects either. It must have been updated since you last loo

Re: Modifying glyph storage in NSLayoutManager SOLVED

2008-03-18 Thread Ross Carter
I found that I can call the NSLayoutManager methods for modifying glyph storage (replaceGlyphAtIndex:withGlyph:, insertGlyph:atGlyphIndex:characterIndex:, etc.) without errors if I place the code in an override of NSATSTypesetter - beginLineWithGlyphAtIndex: and inform the typesetter of any

Re: Cocoa-dev Digest, Vol 5, Issue 432

2008-03-18 Thread Jay Martin
I have an NSTableView, bound to an NSArrayController, which is bound to my custom object. So far so good. I can change attributes, add, remove, all that good stuff. Now, my custom object can have one property changed programmatically by an NSTimer. Of course, when the change happens, the object is

Re: Creating Custom Views in Interface Builder

2008-03-18 Thread Michael Fey
Sorry for the long delay in replaying, I wanted to make sure that what I was doing was going to work before I responded. It turns out that Jacob was the closest to the solution that I wanted (though I thank everyone for their suggestions). The one common theme in the suggestions involved

CGFloat in 10.4

2008-03-18 Thread bensyverson
Hey all, I have a few CIColor's that I need to query for their color components, but I'm running into errors. Here's what I'm trying to do: CGFloat *color; color = [ciColor components]; Xcode complains, saying CGFloat is undeclared. I think I'm including all the appropriate headers... What giv

Re: Best way to execute a shell script from a cocoa application

2008-03-18 Thread Mark Dawson
Look at the "TaskWrapper" sample code (http://developer.apple.com/samplecode/Moriarity/listing5.html). This not only launches a system command, but can update your UI for the IO feedback? Mark > > >What is the best way to execute a shell script from a Cocoa application? >I need to be able to

User Defaults Controller - IB

2008-03-18 Thread Jeremy
Hello, I am working on a 10.5 only application. Now I want to start adding and using preferences in my code. This is my first MAJOR application and the first one to use preferences. How can I use the new "User Defaults Controller" and assign variables to it? My book isn't very helpful bec

Re: Confused about CFRunLoop

2008-03-18 Thread Eric Schlegel
On Mar 18, 2008, at 6:41 AM, Brian Greenstone wrote: Works perfectly! It inserts my timer into the main run loop and processes everything as it should. Now I just need to figure out the CF equivalent of thos NSApplication calls and then I can be Obj- C free ;) If you want mouse and keyb

Re: Leaks with savepanel

2008-03-18 Thread Rob Napier
Is this your entire program? I've built it and don't see any leaks in Instruments over short runs (actually I noticed a 1-time leak of an NWNode object). Over a longer run, I wouldn't be shocked if you encounter a small number of leaks in Cocoa itself. You're showing a total of 200 leaked bytes her

Re: Modifying glyph storage in NSLayoutManager SOLVED

2008-03-18 Thread Douglas Davidson
On Mar 18, 2008, at 4:40 PM, Ross Carter wrote: I found that I can call the NSLayoutManager methods for modifying glyph storage (replaceGlyphAtIndex:withGlyph:, insertGlyph:atGlyphIndex:characterIndex:, etc.) without errors if I place the code in an override of NSATSTypesetter - beginLine

Re: Best Way To Lookup From a Huge Table

2008-03-18 Thread Scott Ribe
> 1) If I can load all the data into memory, using say a hash table, > then the initial load time will be somewhat significant but the > lookups will be near instantaneous. Really shouldn't be too hard to load the OP's 41,000 very short strings nearly instantaneously. > I had a situation where I

Re: CGFloat in 10.4

2008-03-18 Thread David Duncan
On Mar 18, 2008, at 5:11 PM, bensyverson wrote: I have a few CIColor's that I need to query for their color components, but I'm running into errors. Here's what I'm trying to do: CGFloat *color; color = [ciColor components]; Xcode complains, saying CGFloat is undeclared. I think I'm includin

Re: CGFloat in 10.4

2008-03-18 Thread bensyverson
Okay -- but how do I get CIColor components in 10.4? Both float* and double* throw a warning ("assignment from incompatible pointer type," and "assignment discards qualifiers from pointer target type," respectively) Thanks! - ben David Duncan wrote .. > > The Mac OS X 10.4 SDK doesn't have

Re: CGFloat in 10.4

2008-03-18 Thread David Duncan
On Mar 18, 2008, at 5:58 PM, bensyverson wrote: Okay -- but how do I get CIColor components in 10.4? Both float* and double* throw a warning ("assignment from incompatible pointer type," and "assignment discards qualifiers from pointer target type," respectively) If your targeting the 10.

Adding spaces to an NSString

2008-03-18 Thread J. Todd Slack
Hello All, I am a little stumped today, not sure why, but how would I add a space after every character in an NSString and produce a new NSString from it. So I have something like: (ignore the quotes, I just did it for containment sake..) ³/Users/slack/Music² And I want it to be: ³/ U s e r s

OT: Cocoa classes in Vancouver, Canada

2008-03-18 Thread Pavel Kapinos
The course "Programming with Cocoa frameworks on Mac OS X and for iPhone" starts on March 25 at 6:30pm. The course will cover: • Xcode and Interface Builder • Objective-C 2.0 • Controls and Views • Cocoa Bindings • Document-based apps • Core Data

Re: Adding spaces to an NSString

2008-03-18 Thread John Stiles
Have you looked at NSMutableString? The APIs are pretty basic here. I'd recommend working from right-to-left; you'll find it probably makes the logic simpler. J. Todd Slack wrote: Hello All, I am a little stumped today, not sure why, but how would I add a space after every character in an NSS

Re: Adding spaces to an NSString

2008-03-18 Thread J. Todd Slack
Hi John, Yes, I have, Are you thinking insertString:atIndex:? So at a basic level, can I get the string length, for loop through each character and after each use insertString to add a space? I am just looking for the most efficient way, sometimes I suffer from doing things multiple ways, trying

Re: OT: Cocoa classes in Vancouver, Canada

2008-03-18 Thread I. Savant
The course "Programming with Cocoa frameworks on Mac OS X and for iPhone" starts on March 25 at 6:30pm. I'm curious about your iPhone content. Do you cover the iPhone SDK or are you merely referring to the fact that learning XCode / IB / Objective-C 2.0 / Cocoa in general prepares you for

Re: CGFloat in 10.4

2008-03-18 Thread bensyverson
Awesome... thank you SO much! - bun David Duncan wrote .. > If your targeting the 10.4 SDK: > > const float * c = [myColor components]; > > If your targeting the 10.5 SDK: > > const CGFLoat * c = [myColor components]; > > Deployment target doesn't matter here. Just which SDK your targeting.

Re: Getting notifications when any file in a folder change

2008-03-18 Thread Scott Ribe
Best solution is FSEvents, which others pointed you to, *if* you can use 10.5. Otherwise, look at kqueue. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

DO problems

2008-03-18 Thread Alexander Cohen
Hi, i have a server and client communication through DO. Connections are all set up then the client send a message to the server with itself as the first argument. The server should then just reply right away to the client using the first argument as the proxy. Problem is, im getting the er

Re: OT: Cocoa classes in Vancouver, Canada

2008-03-18 Thread Pavel Kapinos
Hi, The answer is in the requirement to have ADC online membership and to download iPhone SDK, which will automatically promote you to iPhone developer too. Regards, Pavel Kapinos. On 18-Mar-08, at 5:53 PM, I. Savant wrote: The course "Programming with Cocoa frameworks on Mac OS X and for

Re: Adding spaces to an NSString

2008-03-18 Thread John Stiles
Unless you are doing this hundreds of thousands of times in a row, I doubt you will need to worry about efficiency. By the way, now that I'm thinking about this a little more, you might also consider making an NSAttributedString and setting the kern value for the string to be a large value (e

Re: OT: Cocoa classes in Vancouver, Canada

2008-03-18 Thread I. Savant
The answer is in the requirement to have ADC online membership and to download iPhone SDK, which will automatically promote you to iPhone developer too. That's not necessarily the case. Again, I'm not trying to be difficult, but you haven't addressed Apple's "permission". The typical i

Re: OT: Cocoa classes in Vancouver, Canada

2008-03-18 Thread Pavel Kapinos
Thank you very much for bringing this issue to me! I will definitely have to have a second look at the SDK licence. In the "worst" case scenario, yes - learning to program Cocoa on Mac OS X would be a good start for iPhone. Regards, Pavel Kapinos. On 18-Mar-08, at 7:08 PM, I. Savant wrote:

Re: Confused about CFRunLoop

2008-03-18 Thread Brian Greenstone
Actually, no. Not for games. For games we use the HID Manager for input which allows us to use more than just the keyboard and mouse. It allows for gamepads, steering wheels, tablets, etc, etc. The code doesn't even need to know where the input is coming from. The code can't tell the d

Re: Adding spaces to an NSString

2008-03-18 Thread Matt Long
You could get a char array from your initial NSString and then use stringByAppendingFormat:@"%c " on an NSString in a loop. Notice the space after the %c. -Matt J. Todd Slack wrote: Hi John, Yes, I have, Are you thinking insertString:atIndex:? So at a basic level, can I get the string

Re: [Solved]NSAppleScript returning wrong error info

2008-03-18 Thread Vinay Prabhu
Initializing the errorInfo to nil did the trick. When no error occurs, NSAppleScript will not touch the error dictionary. So I was trying to access the dictionary pointing to junk memory. Thanks for the help. -Vinay On Mar 18, 2008, at 7:44 PM, Nir Soffer wrote: On Mar 18, 2008, at 11:47, Vi

  1   2   >