Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Kyle Sluder
On Fri, Sep 26, 2008 at 12:07 AM, Michael Ash <[EMAIL PROTECTED]> wrote: > Wandering slightly, but this makes me wonder, why does this flag > exist? I can't think of a single reasonable use case for it, and it > seems to cause no end to trouble to people who have somehow enabled it > without knowin

Re: What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 4:07 PM, Karan, Cem (Civ, ARL/CISD) <[EMAIL PROTECTED]> wrote: > I've got a class that acts like a super-lightweight server within my program. > It listens for incoming packets of information, decodes them, and then tells > the rest of my code that something changed. So

Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 4:25 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Thu, Sep 25, 2008 at 4:17 PM, Daniel Child <[EMAIL PROTECTED]> wrote: >> If I press the button in question once, the window dutifully comes up. If I >> close the window and press the button a second time, I get EXC_BAD_ACC

Re: Use other key than "tab" to cycle through text fields

2008-09-25 Thread Ken Thomases
On Sep 25, 2008, at 9:18 PM, Graham Cox wrote: On 26 Sep 2008, at 10:24 am, Gerd Knops wrote: I would like to use a key other than "tab" to advance to the next text field, so that users can use a numeric keypad to enter something like "11-22-33" and have 11, 22 and 33 end up in different

Re: Autostart item in user profile.

2008-09-25 Thread Ken Thomases
On Sep 25, 2008, at 6:58 PM, Gregory Weston wrote: Sandro Noel wrote: I would like my application to have the option to auto-start itself when the user log's in but I cant seem to find information on how to do it in the documentation. I'm probably not looking for the right keywords, could s

Re: Use other key than "tab" to cycle through text fields

2008-09-25 Thread Graham Cox
On 26 Sep 2008, at 10:24 am, Gerd Knops wrote: I would like to use a key other than "tab" to advance to the next text field, so that users can use a numeric keypad to enter something like "11-22-33" and have 11, 22 and 33 end up in different text fields. I'd suggest not using a differen

Re: Bindings Question

2008-09-25 Thread Eric Lee
Sorry for the late response...computer froze Anyways, yeah, I have a NSArrayController, and I binded the table view to it, which let me actually add something. How do you bind a button to an action? Just control-drag? On Sep 25, 2008, at 7:39 PM, Chris Idou wrote: Normally you would have

Collections can be simple Attributes in Core Data

2008-09-25 Thread Jerry Krinock
When I first looked at Core Data, I saw that there was no such attribute type as "Array" or "Set", and concluded that collections must be modelled as relationships. This would be overkill in many cases, for example, in a Person type of application if you wanted to list the names of each Pe

Re: popup button wierdness

2008-09-25 Thread Graham Cox
On 26 Sep 2008, at 10:08 am, Chris Idou wrote: I've got a NSPopupButton with a menu (A "gear" action menu), that has 7 items in it and working fine. But now if I click on the button in IB and remove one of the menu items by pressing Delete, then I rebuild and run the app, the whole po

Re: Bindings Question

2008-09-25 Thread Chris Idou
Normally you would have the table controlled by a NSArrayController. You would bind the button to an action method which would take the value from the text field and pass it to addObject: method of the array controller. --- On Thu, 9/25/08, Eric Lee <[EMAIL PROTECTED]> wrote: > From: Eric Lee

Bindings Question

2008-09-25 Thread Eric Lee
I have an app that I'm making for practice that has a tableview, and a text field (and many other things, but the ones that are the problem are these two) I just successfully changed my app to use bindings. However, whenever I pressed a button before, something would be added into a NSMut

Use other key than "tab" to cycle through text fields

2008-09-25 Thread Gerd Knops
I would like to use a key other than "tab" to advance to the next text field, so that users can use a numeric keypad to enter something like "11-22-33" and have 11, 22 and 33 end up in different text fields. Is there an elegant way to do that, preferably cocoa binding compatible? Thanks Ger

popup button wierdness

2008-09-25 Thread Chris Idou
I've got a NSPopupButton with a menu (A "gear" action menu), that has 7 items in it and working fine. But now if I click on the button in IB and remove one of the menu items by pressing Delete, then I rebuild and run the app, the whole popup button menu is frozen and doesn't work. If I undo t

Re: Autostart item in user profile.

2008-09-25 Thread Gregory Weston
Sandro Noel wrote: I would like my application to have the option to auto-start itself when the user log's in but I cant seem to find information on how to do it in the documentation. I'm probably not looking for the right keywords, could someone point me in the right direction ? I believe

Re: What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Cem
I've got a class that acts like a super-lightweight server within my program. It listens for incoming packets of information, decodes them, and then tells the rest of my code that something changed. So far, this sounds like a job for NSNotificationCenter, except that I'm getting the packe

Re: Adding external library in cocoa app

2008-09-25 Thread Nick Zitzmann
On Sep 25, 2008, at 4:19 PM, Sherm Pendley wrote: Or, if it's a project that uses autoconf, just './configure --disable-dynamic' - why waste time building dynamic libraries if you're just going to delete them? Because some autoconf projects (such as liboil) depend on getting a list of s

Re: Autostart item in user profile.

2008-09-25 Thread Jason Coco
On Sep 25, 2008, at 16:48 , Sandro Noel wrote: Gretings. I would like my application to have the option to auto-start itself when the user log's in but I cant seem to find information on how to do it in the documentation. I'm probably not looking for the right keywords, could someone point

Re: Adding external library in cocoa app

2008-09-25 Thread Sherm Pendley
On Thu, Sep 25, 2008 at 5:19 PM, Scott Ribe <[EMAIL PROTECTED]>wrote: > Or, for libs you're building yourself that are not part of the standard > system install, delete the dynamic libs ;-) Or, if it's a project that uses autoconf, just './configure --disable-dynamic' - why waste time building d

Re: Adding external library in cocoa app

2008-09-25 Thread Scott Ribe
>> The linker does link in static libraries, but it prefers dynamic >> libraries over static ones, and will always link to a dynamic library >> if one exists with the same name as the desired static one. Since >> there's no way to change this behavior, the only workaround is to add >> an absolute p

Re: Adding external library in cocoa app

2008-09-25 Thread Scott Ribe
> The linker does link in static libraries, but it prefers dynamic > libraries over static ones, and will always link to a dynamic library > if one exists with the same name as the desired static one. Since > there's no way to change this behavior, the only workaround is to add > an absolute path t

Re: Autostart item in user profile.

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 4:48 PM, Sandro Noel <[EMAIL PROTECTED]> wrote: > I would like my application to have the option to auto-start itself when the > user log's in > but I cant seem to find information on how to do it in the documentation. > I'm probably not looking for the right keywords, coul

Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Daniel Child
THANK YOU! That solved it for all of the windows. On Sep 25, 2008, at 4:25 PM, Kyle Sluder wrote: On Thu, Sep 25, 2008 at 4:17 PM, Daniel Child <[EMAIL PROTECTED]> wrote: If I press the button in question once, the window dutifully comes up. If I close the window and press the button a secon

Autostart item in user profile.

2008-09-25 Thread Sandro Noel
Gretings. I would like my application to have the option to auto-start itself when the user log's in but I cant seem to find information on how to do it in the documentation. I'm probably not looking for the right keywords, could someone point me in the right direction ? thank you ! Sandr

[MEET] LA CocoaHeads meeting tonight 7:30pm

2008-09-25 Thread Rob Ross
Hey LA CocoaHeads. Tonight we continue our study group meeting for the Aaron Hillegass book "Cocoa Programming for Mac OS X, 3rd Edition". http://search.barnesandnoble.com/Cocoa-Programming-for-Mac-OS-X/Aaron-Hillegass/e/9780321503619/?itm=1 We'll be covering chapters 7-9. Please jot down an

Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Kyle Sluder
On Thu, Sep 25, 2008 at 4:17 PM, Daniel Child <[EMAIL PROTECTED]> wrote: > If I press the button in question once, the window dutifully comes up. If I > close the window and press the button a second time, I get EXC_BAD_ACCESS. > Debugging, I found that both self and mLTableListingsWindow still exi

showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Daniel Child
Hi, I'm stumped. I have a button in a master window tied to a method that simply shows another window. The method is as simple as they come. - (IBAction) showMLTableListings: (id) sender { [mLTableListingsWindow makeKeyAndOrderFront: self]; } where mLTableListingsWindow is simply the

Re: What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Jason Coco
On Sep 25, 2008, at 16:07 , Karan, Cem (Civ, ARL/CISD) wrote: I've got a class that acts like a super-lightweight server within my program. It listens for incoming packets of information, decodes them, and then tells the rest of my code that something changed. So far, this sounds like a

What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Karan, Cem (Civ, ARL/CISD)
I've got a class that acts like a super-lightweight server within my program. It listens for incoming packets of information, decodes them, and then tells the rest of my code that something changed. So far, this sounds like a job for NSNotificationCenter, except that I'm getting the packets by

Re: Interface Building help with "box" labels

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 3:11 PM, Dale Jensen <[EMAIL PROTECTED]> wrote: > Sorry if there is an Interface Builder specific list, I couldn't find one on > the lists page. Technically, I think this belongs in the xcode-users list, since it's part of Xcode Tools. However ... ;-) > Any ideas, short

Interface Building help with "box" labels

2008-09-25 Thread Dale Jensen
Sorry if there is an Interface Builder specific list, I couldn't find one on the lists page. I have a window with five boxes which are used to separate UI elements on the window. Three of these five have their labels displayed in bold font, two do not, and nothing I've tried doing with the

Re: Horizontal SplitView Resize Question

2008-09-25 Thread chaitanya pandit
I'm not sure but you can try limiting the min and max coordinate using: - (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate: (CGFloat)proposedMax ofSubviewAt:(NSInteger)offset - (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate: (CGFloat)proposedMin ofSubviewAt:(NSInt

Causing systemUIServer to update the User Menu for Fast User Switching.

2008-09-25 Thread Ken Andrews
I¹ve got an app that creates users via dscl. The users get created and themselves are set up fine. The problem I have is that the list of users in the fast user switching menu does not get updated. Using the login screen works fine. The user is there just not in the fast user switch pull down. I

Re: Saving an annotated PDF to a flat image

2008-09-25 Thread John Calhoun
On Sep 25, 2008, at 3:24 AM, Danny Greg wrote: Just to up the anti, what do I need to do to save the annotations to a proper PDF, (ie keeping all its text, link properties etc). I tried to save off the page's data representation but no matter what I do it never contains any annotations! Agai

Re: Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 1:29 PM, Danny Greg <[EMAIL PROTECTED]> wrote: > "[<_NSFaultingMutableSet 0x14b8e830> > addObserver:forKeyPath:options:context:] is not supported. Key path: title" > > That is all I get, that and no filtering happens on the UI. You mentioned you were creating your predic

Re: Image processing in Cocoa

2008-09-25 Thread David Duncan
On Sep 25, 2008, at 3:52 AM, Christian Giordano wrote: I think I found what to do. I need to create a bitmap context from the bitmap and drawing there. It makes sense that everything drawn is handled by contexts of course, I'm just a bit concerned about performances. Internally NSImage will b

Re: Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread Danny Greg
"But this fails every time." Any more information than that? :-) How does it fail? Do you receive any message in the run log or does the search turn up empty? Sure, It prints out a bindings error: "[<_NSFaultingMutableSet 0x14b8e830> addObserver:forKeyPath:options:context:] is not supp

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Dave Carrigan
On Sep 25, 2008, at 9:24 AM, Oleg Krupnov wrote: -performSelector:onThread:withObject:waitUntilDone: rules. Unless you need to target pre-Leopard. If you need to do that, you should use -performSelectorOnMainThread. If you want to message a run loop that isn't on the main thread, then you

Re: Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 12:06 PM, Danny Greg <[EMAIL PROTECTED]> wrote: > Tag has an attribute of "title" so I tried a straight forward predicate such > as ANY tags.title like [search string] (where "tags" is the relationship on > the Snap entity). But this fails every time. "But this fails ev

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Oleg Krupnov
Wow, it worked! -performSelector:onThread:withObject:waitUntilDone: rules. I don't know how I overlooked this method. Many thanks. :) On Thu, Sep 25, 2008 at 7:12 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > On Sep 25, 2008, at 10:53 AM, Oleg Krupnov wrote: > >> I actually have tried this. My

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Jean-Daniel Dupas
Le 25 sept. 08 à 17:53, Oleg Krupnov a écrit : I actually have tried this. My code looks like this (is it correct?): @implementation Worker - (void)threadMain:(id)data { runLoop = [NSRunLoop currentRunLoop]; [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; while(true) {

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Ken Thomases
On Sep 25, 2008, at 10:53 AM, Oleg Krupnov wrote: I actually have tried this. My code looks like this (is it correct?): @implementation Worker - (void)threadMain:(id)data { runLoop = [NSRunLoop currentRunLoop]; [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; while(true) {

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Dave Dribin
On Sep 25, 2008, at 10:53 AM, Oleg Krupnov wrote: Then from the main thread I send: [[worker runLoop] performSelector:@selector(processRequest:) target:worker argument:request order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]]; You cannot do this. NSRunLoop is not thread safe and t

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 11:53 AM, Oleg Krupnov <[EMAIL PROTECTED]> wrote: > I actually have tried this. My code looks like this (is it correct?): > > @implementation Worker > > - (void)threadMain:(id)data > { > runLoop = [NSRunLoop currentRunLoop]; > [runLoop addPort:[NSMachPort port] forMode:NSD

Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread Danny Greg
Hi list, In my data model 2 of my enities are "Snap" and "Tag" and they have a many-to-many relationship between them. My UI is controlled by an NSArrayController bound to the Snap entity, I have a search field that sets the filter predicate of this NSArrayController (through code not bin

Re: What does @loader_path refer to when loading ibplugins from a linked-in framework?

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 11:18 AM, Dalzhim Dalzhim <[EMAIL PROTECTED]> wrote: > Hello Michael, > > I would have also thought that @loader_path would be the same thing no > matter how I load my ibplugin into interface builder and maybe it is in fact > the case, although this is the only thing that I

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Oleg Krupnov
I actually have tried this. My code looks like this (is it correct?): @implementation Worker - (void)threadMain:(id)data { runLoop = [NSRunLoop currentRunLoop]; [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; while(true) { [runLoop run]; } } - (void)processReq

Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Ken Thomases
On Sep 25, 2008, at 10:30 AM, Oleg Krupnov wrote: I want to create a secondary thread with its run loop running (sleeping) until a performSelector is sent to it. Then it wakes up, performs the selector, and go to sleep again. I imagine it to be something like this: - (void)threadMain:(id)data {

How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Oleg Krupnov
I want to create a secondary thread with its run loop running (sleeping) until a performSelector is sent to it. Then it wakes up, performs the selector, and go to sleep again. I imagine it to be something like this: - (void)threadMain:(id)data { while(true) { [[NSRunLoop currentRun

Re: What does @loader_path refer to when loading ibplugins from a linked-in framework?

2008-09-25 Thread Dalzhim Dalzhim
Hello Michael, I would have also thought that @loader_path would be the same thing no matter how I load my ibplugin into interface builder and maybe it is in fact the case, although this is the only thing that I haven't successfully investigated that I can think of up to now in order to solve my p

Re: NSMutableData and thread safety

2008-09-25 Thread Ken Thomases
On Sep 25, 2008, at 8:50 AM, Roman Kishchenko wrote: It is said in the documentation that NSMutableData is not thread- safe. So, its access needs to be synchronized, at least, when multiple contending threads are using the object of this class. However, is synchronization necessary when NSMu

NSMutableData and thread safety

2008-09-25 Thread Roman Kishchenko
Hi, It is said in the documentation that NSMutableData is not thread-safe. So, its access needs to be synchronized, at least, when multiple contending threads are using the object of this class. However, is synchronization necessary when NSMutableData is used by multiple threads NOT concurrently, i

[MEET] Aachen CocoaHeads TODAY (September 25, 2008)

2008-09-25 Thread Stefan Hafeneger
Hi everyone, Aachen CocoaHeads is today (September 25, 2008) at 7PM. Talk: Kai Brüning, "Plug-ins for Interface Builder 3" Please visit http://www.cocoaheads.de/ for location information. See you there! Stefan smime.p7s Description: S/MIME cryptographic signature ___

Re: Image processing in Cocoa

2008-09-25 Thread Christian Giordano
I think I found what to do. I need to create a bitmap context from the bitmap and drawing there. It makes sense that everything drawn is handled by contexts of course, I'm just a bit concerned about performances. Thanks, chr On Thu, Sep 25, 2008 at 7:35 AM, Christian Giordano <[EMAIL PROTECTED]>

NSURLDownload resumeData example

2008-09-25 Thread Andrew Zahra
Can anyone point me to an example of how to resume a download with NSURLDOwnload? I have had no luck getting the resume data from it. thanks, Andrew ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator co

Re: Saving an annotated PDF to a flat image

2008-09-25 Thread Danny Greg
Get the size of said page (-[PDFPage boundsForBox:]) and create an NSImage of this size (-[[NSImage alloc] initWithSize:]). Lock the image (-[NSImage lockFocus]) and then call PDFPage;s draw method (- [PDFPage drawWithBox:]). Unlock focus on the NSImage and you;re done. Worked like a charm. J

Horizontal SplitView Resize Question

2008-09-25 Thread Steve Cronin
Folks; I have a horizontal split bar inside of a resizable view -the parent view grows both horizontally and vertically. The standard behavior for horizontal split views appears to be that the the bottom view is grown or shrunk. (In my testing this is true regardless of the resize attributes