Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Graham Cox
On 08/04/2009, at 1:34 PM, Daqi Pei wrote: Hi everyone. I'm new to Objective-C but I've been working with C++ for years. I'm trying to understand how the selector mechanism works. So far it seems to me that SEL is simply a wrapper for 'const char*', Obj-C compiler maintains a table of all

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Graham Cox
On 08/04/2009, at 4:08 PM, Graham Cox wrote: Anyone knows why? Thanks Incidentally, this document tells you all you need to know (and can know) about the runtime: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Introduction/Introduction.html#/

Re: Fully transparent window opaque to mouse?

2009-04-08 Thread Dave Keck
If you've exhausted all other options, you might try taking a screenshot and drawing that into the full-screen window. This should function the same as a transparent mouse-event-grabbing window, as you described. On Tue, Apr 7, 2009 at 10:24 AM, Chris G cgreb...@gmail.com wrote: Hello all, Is

How to find whether the file directory is a valid Mac OS X App?

2009-04-08 Thread Arun
Hi All How to find whether the file / directory is a valid Mac OS X App? Thanks Arun KA ___ 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

Re: Fully transparent window opaque to mouse?

2009-04-08 Thread Kyle Sluder
Maybe you should look into using a Quartz event tap instead? --Kyle Sluder ___ 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

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Mark Ritchie
On 7-Apr-09, at 11:34 PM, Daqi Pei wrote: [myObj performSelector: (SEL)someMethod]; Oh, don't do that! ;-) If you know the selector at compile time, you should use @selector() for compile time checking. Otherwise you should use the sel_getName() function to do the lookup at runtime. You

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Sherm Pendley
On Wed, Apr 8, 2009 at 3:17 AM, Mark Ritchie mark.ritc...@mac.com wrote: You can not simply cast a C string to SEL. is from: http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/ObjCRuntimeRef.pdf Note that while it's be convenient to cast SEL to char *, especially when

Re: How to find whether the file directory is a valid Mac OS X App?

2009-04-08 Thread Jean-Daniel Dupas
Le 8 avr. 09 à 08:58, Arun a écrit : Hi All How to find whether the file / directory is a valid Mac OS X App? You can use LSCopyItemInfoForURL() and check for the kLSItemInfoIsApplication flags. ___ Cocoa-dev mailing list

initializer for NSTextView subclass not being invoked on Nib instantiation

2009-04-08 Thread Stuart Malin
I have a Nib with a single custom NSView subclass. That view has some controls in it, including an instance of an NSTextView (that is also subclassed). When the Nib is instantiated, the -awakeFromNib method of the MyTextView class is invoked, but neither -initWithFrame: nor -

Re: initializer for NSTextView subclass not being invoked on Nib instantiation

2009-04-08 Thread Jonathan Hess
Hey Stuart - This link should cover your questions: http://developer.apple.com/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html#//apple_ref/doc/uid/1051i-CH4-SW19 You're using awakeFromNib for its intended purpose. Good Luck - Jon Hess On Apr 8, 2009, at 1:15 AM,

Re: initializer for NSTextView subclass not being invoked on Nib instantiation

2009-04-08 Thread Kyle Sluder
On Wed, Apr 8, 2009 at 4:15 AM, Stuart Malin stu...@zhameesha.com wrote: Googling this issue has led me to discover that, for NSTextView, -initWithCoder gets called instead. Yes, indeed. I've never run into this before -- that is, my subclassed NSView objects have their -initWithFrame:

Re: initializer for NSTextView subclass not being invoked on Nib instantiation

2009-04-08 Thread Stuart Malin
Sure does cover it - quite specifically. Thanks for the reference -- lots of good material there that I need to absorb. On Apr 7, 2009, at 10:24 PM, Jonathan Hess wrote: Hey Stuart - This link should cover your questions:

Re: initializer for NSTextView subclass not being invoked on Nib instantiation

2009-04-08 Thread Stuart Malin
Great explanation, Kyle. Thanks for taking the effort to provide one so thorough. On Apr 7, 2009, at 10:28 PM, Kyle Sluder wrote: On Wed, Apr 8, 2009 at 4:15 AM, Stuart Malin stu...@zhameesha.com wrote: Googling this issue has led me to discover that, for NSTextView, -initWithCoder gets

Re: order of NSToolbarItems in toolbar

2009-04-08 Thread Kyle Sluder
On Wed, Apr 8, 2009 at 5:12 AM, Tilo Villwock tilovillw...@gmx.de wrote: Ok but i'm writing an audio player, where the toolbar items shouldn't be rearranged by the user as there is no real use for that. Furthermore i was talking about the way the items are set up initially, no matter how they

Re: order of NSToolbarItems in toolbar

2009-04-08 Thread Tilo Villwock
Got it. The toolbar delegate methods return an array. The order in there determine the order in the toolbar later on. Thanks anyways. Tilo ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Creating a Remote database connection.

2009-04-08 Thread rethish
Hi, I have to access data from a MS Access database and also need to update it. The MS Access database is located in a remote MS Access server which is in windows platform. How can I establish a connection with this remote server? If I have to use ODBC , how can it be used? when googled we can¹t

Re: order of NSToolbarItems in toolbar

2009-04-08 Thread Graham Cox
On 08/04/2009, at 7:12 PM, Tilo Villwock wrote: Ok but i'm writing an audio player, where the toolbar items shouldn't be rearranged by the user as there is no real use for that. Furthermore i was talking about the way the items are set up initially, no matter how they could be rearranged

Re: Need localization-proof method of transporting dates.

2009-04-08 Thread Graham Cox
On 08/04/2009, at 2:45 PM, Graham Cox wrote: Thanks for all your help - just remains to be seen now if certain users can now open my app! ;) It occurs to me that there is another potential problem that I've overlooked. System locale affects sorting, right? At least the comment in the

Re: order of NSToolbarItems in toolbar

2009-04-08 Thread Tilo Villwock
Am 08.04.2009 um 11:27 schrieb Graham Cox: On 08/04/2009, at 7:12 PM, Tilo Villwock wrote: Ok but i'm writing an audio player, where the toolbar items shouldn't be rearranged by the user as there is no real use for that. Furthermore i was talking about the way the items are set up

Re: order of NSToolbarItems in toolbar

2009-04-08 Thread Kyle Sluder
On Wed, Apr 8, 2009 at 5:27 AM, Graham Cox graham@bigpond.com wrote: The initial order as laid out in IB sets the initial order by the way. I found the way this works within IB a little bit odd at first, but once you spend a little time with it it starts to make some sense. As long as

Re: Need localization-proof method of transporting dates.

2009-04-08 Thread Ricky Sharp
You can always specify the specific locale to use in a custom sorting method. Sent from my iPhone On Apr 8, 2009, at 6:46 AM, Graham Cox graham@bigpond.com wrote: On 08/04/2009, at 2:45 PM, Graham Cox wrote: Thanks for all your help - just remains to be seen now if certain users can

Fwd: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
Sorry. Sent the original to another list Begin forwarded message: From: Daniel Luis dos Santos daniel.d...@gmail.com Date: April 8, 2009 1:02:18 PM GMT+01:00 To: Graham Cox graham@bigpond.com Cc: list Xcode-users xcode-us...@lists.apple.com Subject: Re: Storing bundle loaded main class

Re: order of NSToolbarItems in toolbar

2009-04-08 Thread Kyle Sluder
On Wed, Apr 8, 2009 at 5:36 AM, Tilo Villwock tilovillw...@gmx.de wrote: You're right, that would be an option. I'm on a 10.4 system here, is laying out your items in IB a feature new in 10.5? Because i don't see how to do this here in IB. Yes, it is. This is probably where much of the

Re: order of NSToolbarItems in toolbar

2009-04-08 Thread Tilo Villwock
Am 08.04.2009 um 02:39 schrieb Keary Suska: On Apr 7, 2009, at 6:18 PM, Tilo Villwock wrote: Hi, is there a way to manipulate the order NSToolbarItems are added to a toolbar, when the application is starting. I have implemented the delegate methods to provide the items, and which items

(no subject)

2009-04-08 Thread Tilo Villwock
Does anyone know, whether there is a way to make a circular NSSlider not endless, so that it stops at a certain value? Thanks Tilo ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Graham Cox
On 08/04/2009, at 10:33 PM, Daniel Luis dos Santos wrote: if ((nil != saID) ([[saID class] isSubclassOfClass: [NSData class]])) { //[_instances addObject: aDriverInstance]; When I uncomment the addObject line above, later in the code NSFileManager throws a

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Daqi Pei
Thanks for all your answers. I was doing that basically trying to understand how the runtime works. Guess I've got what I need. Thanks again! On Wed, Apr 8, 2009 at 3:21 PM, Sherm Pendley sherm.pend...@gmail.comwrote: On Wed, Apr 8, 2009 at 3:17 AM, Mark Ritchie mark.ritc...@mac.com wrote:

[MEETING] Toronto Area Cocoa WebObjects Developer Group - April 14

2009-04-08 Thread Karl Moskowski
The next meeting of tacow/Toronto CocoaHeads will be held on Tuesday, April 14 at 6:30 PM at Ryerson University. Up-to-date info and directions are available at http://groups.google.com/group/tacow and http://tacow.org/. Karl Moskowski kolpa...@voodooergonomics.com Voodoo Ergonomics

Programatically creating NSMenu?

2009-04-08 Thread Daqi Pei
I've been trying to create a Cocoa GUI application without IB. Everything works fine except for the NSMenu. After digging over the internet I found a solution from ' http://lapcatsoftware.com/blog/2007/06', by using some undocumented methods and member variables. I succeeded in creating the

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Julien Jalon
64bit runtime selectors are not char* as far as I know. In general, you should use NSSelectorFromString/NSStringFromSelector the more low-level objc functions. On Wed, Apr 8, 2009 at 9:21 AM, Sherm Pendley sherm.pend...@gmail.comwrote: On Wed, Apr 8, 2009 at 3:17 AM, Mark Ritchie

Re: circular NSSlider not endless

2009-04-08 Thread Benjamin Dobson
On 8 Apr 2009, at 13:48:43, Tilo Villwock wrote: Does anyone know, whether there is a way to make a circular NSSlider not endless, so that it stops at a certain value? Thanks Tilo That depends what you mean. If you mean it should act like a physical volume control, where the slider

NSTask Quitting Processes ...

2009-04-08 Thread Mic Pringle
Hi, If I launch a process using NSTask, in this case a lightweight webserver, will that process terminate when I close my application, if the process is still alive ? When I currently launch the server from the terminal, it only quits when I hit ctrl + c. Thanks -Mic

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Jean-Daniel Dupas
A good way to understand the runtime is to read the sources: http://www.opensource.apple.com/darwinsource/10.5.6/objc4-371.2/ Le 8 avr. 09 à 15:07, Daqi Pei a écrit : Thanks for all your answers. I was doing that basically trying to understand how the runtime works. Guess I've got what I

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Jean-Daniel Dupas
I remember I read that somewhere in an Apple document, but I don't managed to find where, and I don't find any proof of that in the sources. Le 8 avr. 09 à 15:26, Julien Jalon a écrit : 64bit runtime selectors are not char* as far as I know. In general, you should use

Re: Programatically creating NSMenu?

2009-04-08 Thread Keary Suska
On Apr 8, 2009, at 7:13 AM, Daqi Pei wrote: I've been trying to create a Cocoa GUI application without IB. Everything works fine except for the NSMenu. After digging over the internet I found a solution from ' http://lapcatsoftware.com/blog/2007/06', by using some undocumented methods and

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Steve Christensen
If your _instances variable is initialized using either [NSMutableArray array] or [NSMutableArray arrayWithCapacity:...], it will be autoreleased and become invalid. You can fix that by doing something like [NSMutableArray array] retain] or using [NSMutableArray alloc]

Re: Need localization-proof method of transporting dates.

2009-04-08 Thread Michael Ash
On Wed, Apr 8, 2009 at 7:46 AM, Graham Cox graham@bigpond.com wrote: On 08/04/2009, at 2:45 PM, Graham Cox wrote: Thanks for all your help - just remains to be seen now if certain users can now open my app! ;) It occurs to me that there is another potential problem that I've

Re: NSTask Quitting Processes ...

2009-04-08 Thread Michael Ash
On Wed, Apr 8, 2009 at 9:33 AM, Mic Pringle micprin...@gmail.com wrote: Hi, If I launch a process using NSTask, in this case a lightweight webserver, will that process terminate when I close my application, if the process is still alive ? When I currently launch the server from the

Re: Cocoa-dev Digest, Vol 6, Issue 545

2009-04-08 Thread Tilo Villwock
On 8 Apr 2009, at 13:48:43, Tilo Villwock wrote: Does anyone know, whether there is a way to make a circular NSSlider not endless, so that it stops at a certain value? Thanks Tilo That depends what you mean. If you mean it should act like a physical volume control, where the slider only

Re: Fully transparent window opaque to mouse?

2009-04-08 Thread Michael Ash
On Tue, Apr 7, 2009 at 4:24 PM, Chris G cgreb...@gmail.com wrote: Hello all, Is there a way to create a full screen window which has an alpha value of 0 (fully transparent) but which is opaque to mouse events? I have thus far found that setting the window alpha below 0.06 or so causes mouse

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Michael Ash
On Tue, Apr 7, 2009 at 11:34 PM, Daqi Pei dairykni...@gmail.com wrote: Hi everyone. I'm new to Objective-C but I've been working with C++ for years. I'm trying to understand how the selector mechanism works. So far it seems to me that SEL is simply a wrapper for 'const char*', Obj-C compiler

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
Since I am using an auto release pool that is created before anything else, those initializers create auto released objects that will only be released at the end of the code execution. They will be valid until the program terminates On Apr 8, 2009, at 3:01 PM, Steve Christensen wrote:

Setting Min, MAx and range of characters for NSTextField

2009-04-08 Thread development2
I hope someone can help me. I need to set a Min and Max length for an NSTextField. I also need to only allow certain characters that the user can enter. How can this be accomplished? Do I have to use an NSFormatter? If so are there any examples that someone can point me to? Thanks in

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread glenn andreas
On Apr 8, 2009, at 9:34 AM, Daniel Luis dos Santos wrote: Since I am using an auto release pool that is created before anything else, those initializers create auto released objects that will only be released at the end of the code execution. They will be valid until the program

Re: Programatically creating NSMenu?

2009-04-08 Thread DairyKnight
Sorry but I don't really see the connection between that page and my question? On Wed, Apr 8, 2009 at 9:44 PM, Keary Suska cocoa-...@esoteritech.comwrote: On Apr 8, 2009, at 7:13 AM, Daqi Pei wrote: I've been trying to create a Cocoa GUI application without IB. Everything works fine except

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
If its outer and the code is done right, it should be disposed of when the code within it is no longer needed On Apr 8, 2009, at 3:46 PM, glenn andreas wrote: On Apr 8, 2009, at 9:34 AM, Daniel Luis dos Santos wrote: Since I am using an auto release pool that is created before anything

Re: Floating window on top of everything

2009-04-08 Thread Matt Neuburg
On Tue, 7 Apr 2009 12:37:05 -0400, Walker Argendeli heckler0...@bellsouth.net said: I am making a simple application that consists of a small HUD window that needs to float above another application. How do I make it so that A. it floats above everything, and B. when I switch to another

Re: Does waitUntilExit really mean that?

2009-04-08 Thread Ken Thomases
On Apr 7, 2009, at 10:44 AM, Michael Domino wrote: Thanks very much for the reply. You're welcome. I have two methods to handle the notifications for the error and output pipes (see below). Since we are supposed to be reading to EOF, do I really need to call

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Bill Bumgarner
On Apr 8, 2009, at 7:55 AM, Daniel Luis dos Santos wrote: If its outer and the code is done right, it should be disposed of when the code within it is no longer needed That still isn't correct according to the Cocoa memory management guidelines. Thus, the general conclusion will be that

Re: Creating a Remote database connection.

2009-04-08 Thread Nick Zitzmann
On Apr 8, 2009, at 3:05 AM, rethish wrote: I have to access data from a MS Access database and also need to update it. The MS Access database is located in a remote MS Access server which is in windows platform. How can I establish a connection with this remote server? You'll have to

Re: Programatically creating NSMenu?

2009-04-08 Thread Keary Suska
On Apr 8, 2009, at 8:53 AM, DairyKnight wrote: Sorry but I don't really see the connection between that page and my question? Sorry, probably answers the wrong question. Anyway, what is the difference between an apps with an Application.app directory structure and apps with static Nibs?

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
I just discovered that if I don't load the code through a bundle and link it directly to the executable the error goes away. From the bundle loading code I posted at the beginning of this thread, am I doing anything wrong ? On Apr 8, 2009, at 4:34 PM, Bill Bumgarner wrote: On Apr 8,

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Bill Bumgarner
On Apr 8, 2009, at 8:48 AM, Daniel Luis dos Santos wrote: I just discovered that if I don't load the code through a bundle and link it directly to the executable the error goes away. From the bundle loading code I posted at the beginning of this thread, am I doing anything wrong ? Doesn't

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Daniel Luis dos Santos
I expect a file manager and it tells me that it does not respond to fileExistsAtPath On Apr 8, 2009, at 5:05 PM, Bill Bumgarner wrote: On Apr 8, 2009, at 8:48 AM, Daniel Luis dos Santos wrote: I just discovered that if I don't load the code through a bundle and link it directly to the

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Kyle Sluder
On Wed, Apr 8, 2009 at 12:13 PM, Daniel Luis dos Santos daniel.d...@gmail.com wrote: I expect a file manager and it tells me that it does not respond to fileExistsAtPath Until you fix your memory management bug, the behavior of your program is undefined. --Kyle Sluder

Re: Programatically creating NSMenu?

2009-04-08 Thread Kyle Sluder
On Wed, Apr 8, 2009 at 9:13 AM, Daqi Pei dairykni...@gmail.com wrote: Again I'm doing this only to understand how the system works. Did I miss something or it's just the way the framework was designed? This happens when the runtime can't find the main nib as specified in the Info.plist -- or,

Re: Programatically creating NSMenu?

2009-04-08 Thread m
On Apr 8, 2009, at 6:13 AM, Daqi Pei wrote: I've been trying to create a Cocoa GUI application without IB. snip Again I'm doing this only to understand how the system works. Did I miss something or it's just the way the framework was designed? You missed something and that's the way

Re: Simple printing hangs

2009-04-08 Thread James Walker
I. Savant wrote: On Apr 7, 2009, at 8:33 PM, James Walker wrote: I want to print some text that will almost surely fit on one page. I thought I could just set up a window without making it visible, and print the content view of the window, with code like this: How about running it in the

noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
I have a tab bar and it's driven by FirstViewController. I have a second view with it's own xib. I can have buttons there call into a buttonPress method I have in the FirstViewController. I am able to get the sender tag easily. NSLog(@id: %d, [sender tag] ); However in the second xib I have a

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Bill Bumgarner
On Apr 8, 2009, at 9:13 AM, Daniel Luis dos Santos wrote: I expect a file manager and it tells me that it does not respond to fileExistsAtPath I'm terribly confused, then. Set a breakpoint on objc_exception_throw and post the backtrace at the point that the exception is thrown. b.bum

Re: noob: Question about senders and views

2009-04-08 Thread Craig Williams
On Apr 8, 2009, at 11:08 AM, Eric E. Dolecki wrote: I have a tab bar and it's driven by FirstViewController. I have a second view with it's own xib. I can have buttons there call into a buttonPress method I have in the FirstViewController. I am able to get the sender tag easily.

Re: Programatically creating NSMenu?

2009-04-08 Thread Jeff Johnson
Hi Daqi. Could you post your code or project? I haven't noticed any problems myself. Please note that the latest (Leopard-only) solution is here: http://lapcatsoftware.com/blog/2008/10/20/working-without-a-nib-part-7-the-empire-strikes-back/ -Jeff On Apr 8, 2009, at 8:13 AM, Daqi Pei

Re: Simple printing hangs

2009-04-08 Thread Raleigh Ledet
Yes, this is a known problem with Cocoa printing from a Carbon application. We hope to have a fix in a future version of the OS. -raleigh On Apr 8, 2009, at 10:05 AM, James Walker wrote: I. Savant wrote: On Apr 7, 2009, at 8:33 PM, James Walker wrote: I want to print some text that will

Re: Programatically creating NSMenu?

2009-04-08 Thread DairyKnight
If you build the project with XCode, it would automatically create the bundle structure for you and it would work. Without the bundle directory, the main menu won't show correctly (e.g. cp your executable to ~/). The solution seems to be creating a bundle directory structure and run

Re: Simple printing hangs

2009-04-08 Thread I. Savant
On Wed, Apr 8, 2009 at 1:40 PM, Raleigh Ledet le...@apple.com wrote: Yes, this is a known problem with Cocoa printing from a Carbon application. We hope to have a fix in a future version of the OS. Anything to do with infinite loops? :-D -- I.S.

Re: Simple printing hangs

2009-04-08 Thread James Walker
Raleigh Ledet wrote: Yes, this is a known problem with Cocoa printing from a Carbon application. We hope to have a fix in a future version of the OS. D'Oh! I take it there's no known workaround, other than using Carbon printing. Thanks for letting me know. -- James W. Walker,

Re: noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
How can I make FirstViewController aware of the method in the second class? I tried import and still got a warning. FirstViewController.m #import FirstViewController.h #import SecondViewController.h -(IBAction)buttonDown:(id)sender { NSLog(@id: %d, [sender tag] ); [SecondViewController

Re: noob: Question about senders and views

2009-04-08 Thread I. Savant
On Wed, Apr 8, 2009 at 1:58 PM, Eric E. Dolecki edole...@gmail.com wrote: How can I make FirstViewController aware of the method in the second class? I tried import and still got a warning. ... [SecondViewController populateTextFieldWithString:@hey there]; ... As soon as I call that method the

Re: Programatically creating NSMenu?

2009-04-08 Thread Jeff Johnson
It does seem to require an .app bundle, yes. I can successfully run it from Terminal rather than Finder, though, as long as the executable is in a bundle. -Jeff On Apr 8, 2009, at 12:46 PM, DairyKnight wrote: If you build the project with XCode, it would automatically create the bundle

Re: finder file size

2009-04-08 Thread Sean McBride
On 4/7/09 9:04 PM, Jo Phils said: As for not using Carbon I suppose there's no reason I can't use it. I was just thinking with Finder going away from Carbon and since I'm just learning Cocoa I was trying to avoid it if I could. But if it's the best way I can use it... Carbon is an overloaded

Cocoaheads Lake Forest (92630) meeting 4/8/2009 (tonight!) at 7 pm on Online courses for Mac and iPhone development

2009-04-08 Thread Scott Ellsworth
The general announcement last week did not include the topic Meeting tonight! CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at our usual location, Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630

Re: noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
I have the method being called now in SecondViewController, but suddenly my UILabel there is (null). ?? // Called from the FirstViewController -(void)populateTextFieldWithString:(id)string { [commandText2 setText:string]; NSLog(@populateTextFieldWithString: %@, %@, string, commandText2 ); //

Re: noob: Question about senders and views

2009-04-08 Thread I. Savant
On Wed, Apr 8, 2009 at 3:00 PM, Eric E. Dolecki edole...@gmail.com wrote: I have the method being called now in SecondViewController, but suddenly my UILabel there is (null). ?? ... A scope issue? No, a research issue. Steps to remedy: 1 - Read. The. Documentation. I was kind enough to

Re: Fully transparent window opaque to mouse?

2009-04-08 Thread Chris G
Thanks for the suggestions, I ended up using NSWindow::setIgnoreMouseEvents:NO . On Wed, Apr 8, 2009 at 3:02 AM, Kyle Sluder kyle.slu...@gmail.com wrote: Maybe you should look into using a Quartz event tap instead? --Kyle Sluder ___ Cocoa-dev

IKImageBrowserView crash

2009-04-08 Thread Ashley Clark
I'm using an IKImageBrowserView to show sets of PDF documents in my program and am occasionally seeing crashes during IKImageWrapper finalize calls. The crash log shows absolutely none of my code at all. This typically happens when someone is adding a document to the image browser's

Re: finder file size

2009-04-08 Thread Benjamin Dobson
On 8 Apr 2009, at 19:40:35, Sean McBride wrote: On 4/7/09 9:04 PM, Jo Phils said: As for not using Carbon I suppose there's no reason I can't use it. I was just thinking with Finder going away from Carbon and since I'm just learning Cocoa I was trying to avoid it if I could. But if

Re: noob: Question about senders and views

2009-04-08 Thread Brian Slick
I won't claim to have the concepts down, but I'll try to answer to the best of my understanding. Hopefully someone else will correct any mistakes that I make. FirstViewController and SecondViewController don't know anything about each other, because one did not create the other. So in

Re: Creating an ordered list for combo-box content from a Core Data entity attribute

2009-04-08 Thread I. Savant
On Wed, Apr 8, 2009 at 4:05 PM, Jon C. Munson II jmun...@his.com wrote: I have a combo-box whose content needs to be the aggregated values of the attribute it is bound to.  Ideally, I'd like this sorted. Binding content/content values to @distinctUnionOfObjets.attribute yields an unordered

Re: Creating an ordered list for combo-box content from a Core Data entity attribute

2009-04-08 Thread I. Savant
So, I've created a relevant method to fetch load an ordered list. ...  What kind of attribute is it? It should be as easy as setting the desired sort descriptors (see NSSortDescriptor and associated companion guide(s)) on the array controller that's providing your list. Sorry, I realize

Re: Does waitUntilExit really mean that?

2009-04-08 Thread Michael Domino
Ken, After all the discussion and hours of fun trying the various code permutations, this is the only thing that works reliably for me: [task launch]; NSData* outData; NSString* messageOutput = [[NSString new]

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Marcel Weiher
On Apr 7, 2009, at 20:34 , Daqi Pei wrote: Hi everyone. I'm new to Objective-C but I've been working with C++ for years. I'm trying to understand how the selector mechanism works. I think the best reference for that would be Brad Cox's original book on Objective-C. In short: selectors

Sqlite3

2009-04-08 Thread fawad shafi
Dear All, i m working on sqlite3 database, problem is this that, when i insert data in database from simulator, n after this when i go to sqlite3 terminal. the data is not available there. more strange is that after inserting data from simulator, when i try to access the records, i can

NSURLConnection crashes with EXC_BAD_ADDRESS -- can't find why...

2009-04-08 Thread David Paeme
Hi all, I'm writing an application that accesses a http server via NSURLConnection's sendSynchronousRequest method, and it keeps crashing on me with an EXC_BAD_ADDRESS signal, without ever reaching the server. Here's sample code (very similar to what's in aaron hillegass' book):

Re: Difference between SEL and const char* when sending a message?

2009-04-08 Thread Marcel Weiher
On Apr 8, 2009, at 7:27 , Michael Ash wrote: The runtime relies on this property for all kinds of things. By passing in a naked C string, you're bypassing the uniquing mechanism, and could easily end up with a string which has the same *contents* but is not at the same address. This could

Re: Beachball on Lengthy Task

2009-04-08 Thread Marcel Weiher
On Apr 5, 2009, at 14:59 , Andrew Farmer wrote: On 05 Apr 09, at 08:17, Michael Ash wrote: On Sun, Apr 5, 2009 at 9:33 AM, Kirk Kerekes kkere...@cox.net wrote: [Use a separate process instead of a separate thread] I recommend avoiding this if possible. Processes are a somewhat scarce

Re: noob: Question about senders and views

2009-04-08 Thread Eric E. Dolecki
Sounds like I architected this poorly. My views will all import a model class and then I can call methods in that class to do things. Anything within my views I'll just handle there. I'll have to check out the singleton. Thanks! On Wed, Apr 8, 2009 at 4:37 PM, Brian Slick briansl...@mac.com

Re: NSURLConnection crashes with EXC_BAD_ADDRESS -- can't find why...

2009-04-08 Thread Greg Parker
On Apr 8, 2009, at 5:55 AM, David Paeme wrote: I'm writing an application that accesses a http server via NSURLConnection's sendSynchronousRequest method, and it keeps crashing on me with an EXC_BAD_ADDRESS signal, without ever reaching the server. This is the stack trace: #0

how to load an NSMenu out of a nib?

2009-04-08 Thread Rua Haszard Morris
I'm baffled, this seems fundamental, I can't see how it's done! I have a Menu in a nib file, which I need to use in a few places in code. So I want to do something like NSMenu* myMenu = [NSMenu menuFromNib:@MyNibFile name:@MyUsefulMenu]; Is this possible - how can this be done? I have

RE: Creating an ordered list for combo-box content from a Core Data entity attribute

2009-04-08 Thread Jon C. Munson II
Namaste! Thank you for the replies. I originally attempted to get this going through an array controller but failed, so I figured it couldn't be done that way and went to a routine to do it. However, your previous reply sparked something and I got the array controller partially working. It now

Re: Creating an ordered list for combo-box content from a Core Data entity attribute

2009-04-08 Thread I. Savant
On Apr 8, 2009, at 6:24 PM, Jon C. Munson II wrote: However, your previous reply sparked something and I got the array controller partially working. It now returns the list, albeit unordered. The contentArray (can't use contentSet in this case) is bound to the master array controller's

RE: Creating an ordered list for combo-box content from a Core Data entity attribute

2009-04-08 Thread Jon C. Munson II
Namaste! OK, for the sake of the discussion: 1. I have an entity called Item. 2. Item has many attributes, the one of interest is Color. It is a string attribute. 3. Assume acItem, an array controller is bound to Item. 4. Assume acItemColors is bound to Item (but not editable), and has

Re: how to load an NSMenu out of a nib?

2009-04-08 Thread Peter Ammon
On Apr 8, 2009, at 2:47 PM, Rua Haszard Morris wrote: I'm baffled, this seems fundamental, I can't see how it's done! I have a Menu in a nib file, which I need to use in a few places in code. So I want to do something like NSMenu* myMenu = [NSMenu menuFromNib:@MyNibFile

Re: how to load an NSMenu out of a nib?

2009-04-08 Thread Uli Kusterer
On 09.04.2009, at 01:55, Rua Haszard Morris wrote: still, I was expecting a line or two of code, not to have to make an instance variable for things I want out of the nib! I'm still shocked there's no standard way to do this... I think you're taking the wrong approach, conceptually.

Re: how to load an NSMenu out of a nib?

2009-04-08 Thread Rua Haszard Morris
Making a class with an outlet, and passing an instance of that class as the nib's owner, is one way. You can also use the NSNibTopLevelObjects key as described at the bottom of

Re: Programatically creating NSMenu?

2009-04-08 Thread Uli Kusterer
On 08.04.2009, at 15:13, Daqi Pei wrote: Again I'm doing this only to understand how the system works. Did I miss something or it's just the way the framework was designed? It's how Cocoa was designed. In general, you don't need this level of detailed knowledge. For practical uses,

Re: noob: Question about senders and views

2009-04-08 Thread Graham Cox
On 09/04/2009, at 7:32 AM, Eric E. Dolecki wrote: My views will all import a model class and then I can call methods in that class to do things Others pointed you to conceptual documentation about MVC (Model-View- Controller). Read it. The whole point of it is that you do NOT allow

Re: how to load an NSMenu out of a nib?

2009-04-08 Thread Stuart Malin
On Apr 8, 2009, at 2:10 PM, Peter Ammon wrote: On Apr 8, 2009, at 2:47 PM, Rua Haszard Morris wrote: I'm baffled, this seems fundamental, I can't see how it's done! I have a Menu in a nib file, which I need to use in a few places in code. So I want to do something like NSMenu* myMenu =

Transparent NSButtonCell highlight

2009-04-08 Thread Benjamin Dobson
Hi, I'm building a transparent interface, and I'm stuck at NSButtonCell. An NSGradient with transparency is drawn in the cell. It overrides - isOpaque to return NO. The gradient is drawn nicely from drawWithFrame:, but if it's called from -highlight:withFrame:inView:, the gradient is

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Graham Cox
On 09/04/2009, at 2:13 AM, Daniel Luis dos Santos wrote: I expect a file manager and it tells me that it does not respond to fileExistsAtPath No you don't. According to your original post, you are complaining that calling - addObject on _instances throws this error. So does _instances

Re: finder file size

2009-04-08 Thread Gerriet M. Denkmann
On 9 Apr 2009, at 02:03, Sean McBride s...@rogue-research.com wrote: On 4/7/09 9:04 PM, Jo Phils said: As for not using Carbon I suppose there's no reason I can't use it. I was just thinking with Finder going away from Carbon and since I'm just learning Cocoa I was trying to avoid it if

  1   2   >