Re: problem with [NSImage drawAtPoint:fromRect:operation:fraction:]

2008-10-23 Thread Ken Ferry
On Wed, Oct 22, 2008 at 7:54 PM, Kenny Leung <[EMAIL PROTECTED]> wrote: > Hi All. > > I just want to check with the populous to make sure I have not gone stupid > or insane. The documentation for [NSImage > drawAtPoint:fromRect:operation:fraction:] states: > > "The image content is drawn at its cu

Re: CGPoint wrapper?

2008-10-23 Thread Ken Ferry
On Wed, Oct 22, 2008 at 9:09 PM, Graff <[EMAIL PROTECTED]> wrote: > On Oct 22, 2008, at 5:49 PM, DKJ wrote: > > Is there some straightforward way of wrapping a CGPoint so I can put >> it in an NSArray? I don't want to use a C array because I want to have >> fast enumeration available. Or should I

Using NSDocument with NSViewControllers

2008-10-23 Thread Paul Thomas
Before I set off down the road to frustrating deadendsville, has anyone any experience with trying to coerce AppKit's document architecture into a single window interface - i.e. using tabviews in stead of separate windows? A sneaky look at a couple of apps shows that people have usually r

Re: Single Bit editable Image Mask (and other strangeness)

2008-10-23 Thread Ken Ferry
On Wed, Oct 22, 2008 at 10:25 AM, Development <[EMAIL PROTECTED]>wrote: > Good day! > > I am working on pixel based drawing tool, and could use some hint on how to > handle selection areas. > > In the program, each document has a couple different Bitmap context (24 bit > RGP space CGBitmapContext

[SOLVED] Autocomplete from an array of dictionaries

2008-10-23 Thread Jason Wiggins
Note to self: RTFM! I was trying: NSArray *matchingNames = [[namesArray objectForKey:@"description"] filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF beginswith[cd] %@", substring]]; which doesn't work What I wanted was: NSArray *matchingNames = [[namesArray valueForKe

Re: Memory Leaks in CocoaEcho Sample

2008-10-23 Thread Marco Masser
Then the bug is somewhere in your changes. The only thing you should do is remove the retain calls. If you also remove the release calls, you will still have the memory leaks. Here's what openStreams should look like: - (void)openStreams { [inputStream setDelegate:self]; [outputStream

Re: commitEditing

2008-10-23 Thread Mike Abdullah
Try using the asynchronous version: commitEditingWithDelegate:didCommitSelector:contextInfo: It should display an alert with the error. On 22 Oct 2008, at 23:15, Chris Idou wrote: I'm calling commitEditing on a NSObjectController, and its returning NO, for no apparent or obvious reason.

Re: Memory Leaks in CocoaEcho Sample

2008-10-23 Thread Ken Ferry
Hi Marco, > Still, my question remains: Is there a rule of thumb for the memory > management of object returned by reference? NSError and NSGradient > autorelease their objects, NSNetService does not. Because the docs don't say > anything about this (with the exception of the Error Handling Progra

CocoaHeads chapter Bonn (Germany) Kickoff TODAY

2008-10-23 Thread Stefan Wolfrum
Hi, just a short notice for the Germans living here in the Bonn/Cologne area: the CocoaHeads Bonn chapter is meeting for the first time today (23.10.). For details see www.cocoaheads.org or mail me. Cheers, Stefan. - Von meinem iPhone 3G gesendet. :-) __

Re: CGPoint wrapper?

2008-10-23 Thread Jonathan Dann
If you're targeting Leopard then you can use the NS_BUILD_32_LIKE_64 flag and use NSRect/Point/Size and CGRect/Point/Size interchangeably without the cast or the inline conversion functions. Here's a how-to http://theocacao.com/document.page/552 Jonathan http://espresso-served-here.com On 2

Re: Using Core Animation to animate view properties?

2008-10-23 Thread Jonathan Dann
Hi Jim, I've been having major problems with working with non-layer-baked views to coordinate the animation of their positions. Some of the caveats I've come across (note that I haven't used -setWantsLayer: on any of the views as it's unnecessary for animating the frame of an NSView with

NSMutableDictionary won't accept my NSString as Value (NEWBIE)

2008-10-23 Thread Sebastian Pape
Hi, This might be pretty easy for most of you. I've been trying to find out how to solve that for the last one and a half hours and it just doesn't work. Basically this part of the application scans data from a buffer, taking the first element found as "a Value" and the second element found as "a

Re: NSMutableDictionary won't accept my NSString as Value (NEWBIE)

2008-10-23 Thread Jonathan del Strother
On Thu, Oct 23, 2008 at 12:34 PM, Sebastian Pape <[EMAIL PROTECTED]> wrote: > But my NSMutableDictionary won't accept my NSString, because it > requires setValue:(id)value and I just have my NSString. 'id' is just a generic type - anything that accepts id will accept NSString, NSObject, NSData, et

Autocomplete from an array of dictionaries

2008-10-23 Thread Jason Wiggins
Hi, I'm working on an autocompletion system such as with mail To: Cc: fields etc. I have an array of dictionaries and I want the autocomplete to match to the key "description" This code below works great for an array of strings: NSArray *matchingNames = [namesArray filteredArrayUsingPredica

Re: Persistent Connection to Web Server in cocoa, emulating AJAX

2008-10-23 Thread Jason Stephenson
Jack Carbaugh wrote: What is the best way to emulate, with cocoa, an AJAX persistent connection to a web server. There is no persistent connection to a web server. HTTP does not preserve state between discrete requests. This is why cookies were invented and session variables stored on the ser

Re: When does Cocoa fall apart? (Run loops)

2008-10-23 Thread I. Savant
On Wed, Oct 22, 2008 at 6:37 PM, Chris Idou <[EMAIL PROTECTED]> wrote: > > I think bindings don't merely avoid glue code, it also provides a separation > of concerns. Agreed. There are a number of benefits but, as with all technologies, those benefits don't always outweigh the detractors. It so

Re: Persistent Connection to Web Server in cocoa, emulating AJAX

2008-10-23 Thread Jack Carbaugh
the process is as follows ... a request/command is sent to a URL which processes the request. The result is then sent out of a "responder" at another URL. So what i'm wanting to do, i suppose, is to continually poll the "responder" URL and process it's results. On Oct 23, 2008, at Thu-10 /

Re: CGPoint wrapper?

2008-10-23 Thread Graff
On Oct 23, 2008, at 3:06 AM, Ken Ferry wrote: On Wed, Oct 22, 2008 at 9:09 PM, Graff <[EMAIL PROTECTED]> wrote: NSPoint and CGPoint are structs that are essentially the same. You can convert between them with a simple cast: NSPoint point = *(NSPoint *)&myCGPoint; http://developer.apple.

Re: WebView: Open new windows in default browser

2008-10-23 Thread Benjamin Dobson
On 23 Oct 2008, at 01:09:07, <[EMAIL PROTECTED]> <[EMAIL PROTECTED] > wrote: I've been trying to get a WebView to open in the user's default browser. In fact, I've succeeded, but it's rather clunky, and I'm wondering if there's a better way. Why not simply add "target=_'blank'" to your URLs

Re: Persistent Connection to Web Server in cocoa, emulating AJAX

2008-10-23 Thread Jason Stephenson
Jack Carbaugh wrote: the process is as follows ... a request/command is sent to a URL which processes the request. The result is then sent out of a "responder" at another URL. So what i'm wanting to do, i suppose, is to continually poll the "responder" URL and process it's results. NSURLReq

Re: Controls disappearing from window during resize

2008-10-23 Thread I. Savant
On Thu, Oct 23, 2008 at 11:17 AM, Eric Gorr <[EMAIL PROTECTED]> wrote: > This strange behavior is easy to reproduce using just the Cocoa Simulator. This isn't a bug. It's doing exactly what you told it to. You told it (in addition to sticking to the top-left corner) to keep its distance from the

Controls disappearing from window during resize

2008-10-23 Thread Eric Gorr
This strange behavior is easy to reproduce using just the Cocoa Simulator. You can grab an example .xib from: http://ericgorr.net/MyDocument.xib.zip Load this .xib into interface builder and run the simulator. Once the window appears, resize the window to the smallest height you can and th

Re: Controls disappearing from window during resize

2008-10-23 Thread Andy Lee
On Oct 23, 2008, at 11:17 AM, Eric Gorr wrote: Once the window appears, resize the window to the smallest height you can and then resize back to the original height. What you will see happen is the 'Label' disappear. You have the text field set to grow and shrink in proportion to its super

Re: Controls disappearing from window during resize

2008-10-23 Thread Andy Lee
On Oct 23, 2008, at 11:24 AM, I. Savant wrote: Widen the label so its original position spans its entire superview (drag its right side to the right side of its superview). This is fine if you don't have another view to the right of the label, but if you had, say, an input text field next to

Hud window controls

2008-10-23 Thread Sandro Noel
Greetings. I am trying to design a HUD window, but the controls (buttons, edit boxes) don't fit color wise, is there a property i should set to have them look like the hud window? thank you. Sandro ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Controls disappearing from window during resize

2008-10-23 Thread Andy Lee
On Oct 23, 2008, at 11:35 AM, Andy Lee wrote: The reason the label disappears is that when you make the window small, the text field's width scales to zero. When you expand the window again, IB scales the width accordingly (as you specified) -- except now it's scaling zero, which always ret

Re: Using NSDocument with NSViewControllers

2008-10-23 Thread Ross Carter
On Oct 23, 2008, at 3:07 AM, Paul Thomas wrote: Before I set off down the road to frustrating deadendsville, has anyone any experience with trying to coerce AppKit's document architecture into a single window interface - i.e. using tabviews in stead of separate windows? A sneaky look at

Re: Hud window controls

2008-10-23 Thread I. Savant
On Thu, Oct 23, 2008 at 11:52 AM, Sandro Noel <[EMAIL PROTECTED]> wrote: > I am trying to design a HUD window, but the controls (buttons, edit boxes) > don't fit color wise, is there a property i should set > to have them look like the hud window? There are no properties available to control th

BonjourSample from Hillegass (Advanced Mac OS X Programming)

2008-10-23 Thread Jens Beuckenhauer
Hello, I just tried out the Bonjour sample (chapter 19) from the Hillegass/ Dalrymple Book "Advanced Mac OS X Programming". I have some problems with it. First of all, the original project can be found here: Chapter 19, Bonjour In the line: sendPort = [[NSSocketPort alloc]

Re: WebView: Open new windows in default browser

2008-10-23 Thread Kevin Gessner
On Oct 23, 2008, at 11:16 AM, Benjamin Dobson wrote: On 23 Oct 2008, at 01:09:07, <[EMAIL PROTECTED]> <[EMAIL PROTECTED] > wrote: I've been trying to get a WebView to open in the user's default browser. In fact, I've succeeded, but it's rather clunky, and I'm wondering if there's a better w

Re: Controls disappearing from window during resize

2008-10-23 Thread Eric Gorr
On Oct 23, 2008, at 11:35 AM, Andy Lee wrote: On Oct 23, 2008, at 11:17 AM, Eric Gorr wrote: Once the window appears, resize the window to the smallest height you can and then resize back to the original height. What you will see happen is the 'Label' disappear. You have the text field se

Re: CGPoint wrapper?

2008-10-23 Thread Sean McBride
On 10/23/08 12:06 AM, Ken Ferry said: >The function is actually implemented a bit better than the cast above, in >that the function does not violate strict aliasing[1]. And gcc will warn you if you ask it: --- #import int main(void) { CGPoint myCGPoint = {0.0, 0.0}; NSP

Re: Unregistered weak referrer

2008-10-23 Thread Ross Carter
On Oct 22, 2008, at 9:54 PM, Bill Bumgarner wrote: On Oct 22, 2008, at 4:48 PM, Ross Carter wrote: Yes, GC is enabled. I get the message when I remove a subview from a NSScrollView's documentView. The removed subview contains 3 NSTextViews, 2 of which have their own layoutManager and text

Re: Unregistered weak referrer

2008-10-23 Thread Sean McBride
On 10/23/08 12:35 PM, Ross Carter said: >I'll look for a memory stomper, but I confess I'm not sure exactly >what I should be looking for. First, you would try running your app with Guard Malloc. There are other debug settings that can help, see:

NSPredicate predicateWithFormat:

2008-10-23 Thread chaitanya pandit
Hi list, I have an array controller that manages certain entities, each of the entity has an attribute "Name" now i want to search for entities with names from a given array, Say i have an array (namesArray) with contents "Tom, Matt, Joe" now what i do is, i create a predicate which will loo

NSPredicate predicateWithFormat:

2008-10-23 Thread chaitanya pandit
Hi list, I have an array controller that manages certain entities, each of the entity has an attribute "Name" now i want to search for entities with names from a given array, Say i have an array (namesArray) with contents "Tom, Matt, Joe" now what i do is, i create a predicate which will loo

Re: BonjourSample from Hillegass (Advanced Mac OS X Programming)

2008-10-23 Thread Jens Beuckenhauer
Hello again, my first answer was too quick... If I put the 0x06 (I found it in the header file for INET_TCP) in the code, it works. But how can I include the header? I do not get it to work for a more cleaner approch... I tried #import and #import I get: No such file or directory.

Re: Problems when putting a window between desktop and desktop icons

2008-10-23 Thread Matt Neuburg
On Tue, 21 Oct 2008 20:43:00 +0200, "Markus Amalthea Magnuson" <[EMAIL PROTECTED]> said: >Hello, > >I am trying to put a window above the desktop but below the desktop >icons. I have achieved this by using the following code (in my own >subclass of NSWindow): > >[self setLevel:kCGDesktopIconWindowL

Re: BonjourSample from Hillegass (Advanced Mac OS X Programming)

2008-10-23 Thread Gary L. Wade
Use IPPROTO_TCP instead, which is in the Unix headers. >>> > >Hello again, > >my first answer was too quick... > >If I put the 0x06 (I found it in the header file for INET_TCP) in the >code, it works. But how can I include the header? I do not get it to >work for a more cleaner approch... > >I

Re: BonjourSample from Hillegass (Advanced Mac OS X Programming)

2008-10-23 Thread I. Savant
On Thu, Oct 23, 2008 at 12:16 PM, Jens Beuckenhauer <[EMAIL PROTECTED]> wrote: > the "INET_TCP" isn't recognized on my 10.5 system. What do I have to put > there? I searched the documentation and many, many Webpages for the right > header file, only finding the sentence, "it is related to the syst

[Announce] Cocoa Barcodes is now open source and available on Google Code

2008-10-23 Thread Jeff LaMarche
I just finished checking in the source code for Barcode Generator, a Cocoa program I wrote a few years ago into Google Code as an open source project (BSD Licensed). It contains a fairly easy-to-use set of classes for generating 2D barcodes. http://code.google.com/p/cocoabarcodes/ Project

Re: Controls disappearing from window during resize

2008-10-23 Thread I. Savant
On Thu, Oct 23, 2008 at 11:48 AM, Andy Lee <[EMAIL PROTECTED]> wrote: > On Oct 23, 2008, at 11:24 AM, I. Savant wrote: >> >> Widen the label so its original position spans its entire superview >> (drag its right side to the right side of its superview). > > This is fine if you don't have another v

Re: LSUIElement application and coming to the front

2008-10-23 Thread Matt Neuburg
On Wed, 22 Oct 2008 11:47:01 -0700, Nick Beadman <[EMAIL PROTECTED]> said: >I am working on an application which is a floating palette that only >appears when another application is frontmost. I have set LSUIElement >in the Info.plist but when the palette comes to the front my >application becomes

Re: Controls disappearing from window during resize

2008-10-23 Thread Eric Gorr
I've updated the .xib at: http://ericgorr.net/MyDocument.xib.zip Run this through the simulator. Shrink the window to it's smallest height and either keep the width the same or feel free to make the window wider. Grow the window again to the height it was before. The 'Label' text will be g

Re: Controls disappearing from window during resize

2008-10-23 Thread Andy Lee
On Oct 23, 2008, at 12:30 PM, Eric Gorr wrote: On Oct 23, 2008, at 11:35 AM, Andy Lee wrote: You have the text field set to grow and shrink in proportion to its superview. In the Size inspector, note the red double-ended horizontal arrow inside the box. In the parlance of struts and sprin

Re: Problems when putting a window between desktop and desktop icons

2008-10-23 Thread Markus Amalthea Magnuson
On Thu, Oct 23, 2008 at 19:26, Matt Neuburg <[EMAIL PROTECTED]> wrote: >>Hello, >> >>I am trying to put a window above the desktop but below the desktop >>icons. I have achieved this by using the following code (in my own >>subclass of NSWindow): >> >>[self setLevel:kCGDesktopIconWindowLevel - 1];

Re: NSPredicate predicateWithFormat:

2008-10-23 Thread Keary Suska
On Oct 23, 2008, at 11:05 AM, chaitanya pandit wrote: NSArray *namesArray = [NSArray arrayWithObjects:@"Tom" , @"Matt" , @"Joe", nil]; NSPredicate *predicate = [NSPredicate predicateWithFormat: @"Name IN %@", namesArray]; NSMutableArray *foundNames = [[arrayController arrangedObjects]fi

enumerating the NSApplication instances?

2008-10-23 Thread Bill Janssen
Hi. I'm trying to write a simple Cocoa program to enumerate the windows on the screen, across all the apps. I can see how to use NSWorkspace.launchedApplications() to enumerate the apps, but I don't see how to go from those dictionaries to an instance of NSApplication, so that I can enumerate the

Re: Controls disappearing from window during resize

2008-10-23 Thread Andy Lee
On Oct 23, 2008, at 1:44 PM, Eric Gorr wrote: I've updated the .xib at: http://ericgorr.net/MyDocument.xib.zip Run this through the simulator. Shrink the window to it's smallest height and either keep the width the same or feel free to make the window wider. Grow the window again to the he

NSInputStream Not Reading All Data

2008-10-23 Thread Thaddeus Cooper
Hi All. I have an NSInputStream that I've set up on the run loop to read data from a socket. It's mostly working except that when I am sending it a large amount of data (say 30k), the last chunk of data never shows up. I have tried reading 1 byte, 10 bytes and 1024 bytes in the handleStre

Re: Controls disappearing from window during resize

2008-10-23 Thread Eric Gorr
On Oct 23, 2008, at 1:46 PM, Andy Lee wrote: On Oct 23, 2008, at 12:30 PM, Eric Gorr wrote: On Oct 23, 2008, at 11:35 AM, Andy Lee wrote: You have the text field set to grow and shrink in proportion to its superview. In the Size inspector, note the red double-ended horizontal arrow inside

Re: enumerating the NSApplication instances?

2008-10-23 Thread Charles Steinman
--- On Thu, 10/23/08, Bill Janssen <[EMAIL PROTECTED]> wrote: > Hi. I'm trying to write a simple Cocoa program to > enumerate the > windows on the screen, across all the apps. I can see how > to use > NSWorkspace.launchedApplications() to enumerate the apps, > but I don't > see how to go from th

Re: Controls disappearing from window during resize

2008-10-23 Thread Benjamin Dobson
Any particular reason you want to scale to zero? Because if not, why not just give the window a minimum size? I see the problem. It seems like a bug. But allowing the custom view to scale into negative dimensions just seems... wrong. ___ Cocoa-dev

Re: CGPoint wrapper?

2008-10-23 Thread DKJ
On 23 Oct, 2008, at 11:26, Finlay Dobbie wrote: I'm surprised nobody else has picked up on this - how is enumerating an NSArray going to be faster than enumerating a C array? I was referring to this: for( TheClass *obj in TheArray ) {} as fast enumeration.

Re: Controls disappearing from window during resize

2008-10-23 Thread Eric Gorr
I just entered a bug report: rdar//6314988 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Upda

Re: Controls disappearing from window during resize

2008-10-23 Thread Andy Lee
On Oct 23, 2008, at 2:41 PM, Eric Gorr wrote: I have an NSPanel and need to implement some window shading functionality - i.e. the content area is hidden and only the title bar remains. Unfortunately, this means that the height of the content area does become zero. I see. Same principle a

Re: NSPredicate predicateWithFormat:

2008-10-23 Thread chaitanya pandit
Well i could not find any explicit explicit alloc/init method for predicate, I am using Instruments to check for memory leaks, and it shows a memory leak with the array. On 23-Oct-08, at 11:33 PM, Keary Suska wrote: On Oct 23, 2008, at 11:05 AM, chaitanya pandit wrote: NSArray *namesArra

Re: CGPoint wrapper?

2008-10-23 Thread Sherm Pendley
On Thu, Oct 23, 2008 at 2:49 PM, DKJ <[EMAIL PROTECTED]> wrote: > On 23 Oct, 2008, at 11:26, Finlay Dobbie wrote: > >> I'm surprised nobody else has picked up on this - how is enumerating >> an NSArray going to be faster than enumerating a C array? >> > > I was referring to this: > >for( T

Re: WebView: Open new windows in default browser

2008-10-23 Thread Nathan Kinsinger
On Oct 22, 2008, at 11:37 AM, Benjamin Dobson wrote: My main WebView's method for opening windows is controlled via UIDelegate. These requests are passed on to a second WebView, which intercepts all requests via policyDelegate. It then passes them on to the default browser with the openURL:

Re: enumerating the NSApplication instances?

2008-10-23 Thread Bill Janssen
Charles Steinman <[EMAIL PROTECTED]> wrote: > You can't get NSApplication instances for other applications. Even as root? Bill ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Debugging preference pane

2008-10-23 Thread Adam Penny
Hi there, Apparently I need to add System Preferences as an executable to my xcode project in order to debug my build. Can anyone tell me how to do this in XCode 3 please? I'll be debugging from ~/Library/ PreferencePanes/ Thanks, Adam ___ Coco

Re: CGPoint wrapper?

2008-10-23 Thread Kyle Sluder
On Thu, Oct 23, 2008 at 3:12 PM, Sherm Pendley <[EMAIL PROTECTED]> wrote: > That's faster (and simpler) to *write*, but it performs no better than > enumerating a C array. It is, in fact, implemented by sending > -countByEnumeratingWithState:objects:count: to the array, then enumerating > over the

Re: Debugging preference pane

2008-10-23 Thread Nick Zitzmann
On Oct 23, 2008, at 1:38 PM, Adam Penny wrote: Apparently I need to add System Preferences as an executable to my xcode project in order to debug my build. Can anyone tell me how to do this in XCode 3 please? I'll be debugging from ~/Library/ PreferencePanes/ This is more of a question f

Re: enumerating the NSApplication instances?

2008-10-23 Thread Nick Zitzmann
On Oct 23, 2008, at 1:30 PM, Bill Janssen wrote: You can't get NSApplication instances for other applications. Even as root? Not unless the application is specifically vending the objects through DO. Mac OS X isn't Windows XP, where every application can access the forms/controllers of

Re: enumerating the NSApplication instances?

2008-10-23 Thread Sherm Pendley
On Thu, Oct 23, 2008 at 3:30 PM, Bill Janssen <[EMAIL PROTECTED]> wrote: > Charles Steinman <[EMAIL PROTECTED]> wrote: > > > You can't get NSApplication instances for other applications. > > Even as root? Don't run a GUI app as root - it's a horrible, huge, gaping security hole to do so. Beside

Re: /Library/Logs vs. user/Library/Logs

2008-10-23 Thread Chris Markle
Thanks guys. Good advice. Here's my summary of what you guys said: 1. Document to read: Low-Level File Management Programming Topics: Locating Directories on the System (http://developer.apple.com/documentation/Cocoa/Conceptual/LowLevelFileMgmt/Tasks/LocatingDirectories.html) 2. Putting logs into

main window confusion

2008-10-23 Thread James Walker
I have a primary window and a secondary floating panel. When the panel is first shown (using orderFront:), its title bar looks sort of dimmed, I guess that means it's not key or main. If I then click the panel title bar, the primary window sends NSWindowDidResignMainNotification and gets a di

Re: Debugging preference pane

2008-10-23 Thread Adam Penny
Thank you for that Nick, I now at least know my error message, although I am struggling to figure out what's wrong. And sorry about the wrong list, I'll bear that in mind in future. This is the my console message when the panel hangs: System Preferences[372:10b] [ valueForUndefinedKey:]: th

Re: Debugging preference pane

2008-10-23 Thread Nick Zitzmann
On Oct 23, 2008, at 2:36 PM, Adam Penny wrote: This is the my console message when the panel hangs: System Preferences[372:10b] [ valueForUndefinedKey:]: this class is not key value coding-compliant for the key host. That means something's trying to access the key "host", and the ADPPr

Re: Debugging preference pane

2008-10-23 Thread Adam Penny
Nope, I've triple checked the bindings and they're fine, but I do have two table views in two different tab views in my prefpane window, could that be causing some issues with their respective array controllers getting mixed up? Adam ADPServer has the keys name mac ADPPrinter has the keys

Re: Debugging preference pane

2008-10-23 Thread glenn andreas
On Oct 23, 2008, at 4:10 PM, Adam Penny wrote: Nope, I've triple checked the bindings and they're fine, but I do have two table views in two different tab views in my prefpane window, could that be causing some issues with their respective array controllers getting mixed up? Adam ADPSer

RE: NSInputStream Not Reading All Data

2008-10-23 Thread Gary L. Wade
I use different APIs, but I just read until I get a 0 or -1 back for the length. >Hi All. > >I have an NSInputStream that I've set up on the run loop to read data >from a socket. It's mostly working except that when I am sending it a >large amount of data (say 30k), the last chunk of data neve

Getting Carbon EventRef from cocoa NSEvent

2008-10-23 Thread Rangaswamy C T
Hi All, For some requirement in my product, I have embedded my Carbon window inside Cocoa window using addChildWindow method. For getting my carbon window UI (keyboard and mouse) events working, I had to watch cocoa events for NSWindow of Carbon window and then redispatch carbon eventRef's to

RE: Getting Carbon EventRef from cocoa NSEvent

2008-10-23 Thread Rangaswamy C T
Oops, sorry got it. Thanks -Original Message- From: Jesper Storm Bache Sent: Friday, October 24, 2008 3:14 AM To: Rangaswamy C T; cocoa-dev@lists.apple.com; [EMAIL PROTECTED] Subject: RE: Getting Carbon EventRef from cocoa NSEvent If you look in NSEvent.h you will see : #if MAC_OS_X_VE

Re: LSUIElement application and coming to the front

2008-10-23 Thread Nick Beadman
Matt, On Oct 23, 2008, at 10:40 am, Matt Neuburg wrote: I know this isn't quite the answer you want, but one approach is to give up on LSUIElement and just have a normal app. Your app can watch what app is frontmost and show and hide itself accordingly, and can intrude its palette so that

Re: Getting Carbon EventRef from cocoa NSEvent

2008-10-23 Thread Bill Cheeseman
on 2008-10-23 5:42 PM, Rangaswamy C T at [EMAIL PROTECTED] wrote: > But the above NSEvent method eventRef is crashing (at 3) on Tiger. But on > Leopard it works fine. > > Am I doing anything wrong here? According to the NSEvent documentation, the -eventRef method was introduced in Leopard (Mac

Re: Hud window controls

2008-10-23 Thread Kiel Gillard
This framework looks pretty good too Kiel On 24/10/2008, at 3:06 AM, I. Savant wrote: On Thu, Oct 23, 2008 at 11:52 AM, Sandro Noel <[EMAIL PROTECTED]> wrote: I am trying to design a HUD window, but the controls (buttons, edit boxes)

Re: enumerating the NSApplication instances?

2008-10-23 Thread Charles Steinman
--- On Thu, 10/23/08, Bill Janssen <[EMAIL PROTECTED]> wrote: > Charles Steinman <[EMAIL PROTECTED]> wrote: > > > You can't get NSApplication instances for other > applications. > > Even as root? It has nothing to do with user permissions. There is no API for getting NSApplication instances fo

Re: /Library/Logs vs. user/Library/Logs

2008-10-23 Thread Jason Coco
On Oct 23, 2008, at 16:27 , Chris Markle wrote: Thanks guys. Good advice. Here's my summary of what you guys said: 1. Document to read: Low-Level File Management Programming Topics: Locating Directories on the System (http://developer.apple.com/documentation/Cocoa/Conceptual/LowLevelFileMgmt/T

Re: /Library/Logs vs. user/Library/Logs

2008-10-23 Thread Chris Markle
Jason, > Why not use ASL for logging? It's worked really well for me. I also have > an Obj-C class you can use that wraps ASL if you want. Right now our app runs (for better or for worse) on Windows and OS X with lots of common code between the two. I think ASL might work in the future as we beco

Re: Debugging preference pane

2008-10-23 Thread Adam Penny
Oh good grief, thank you very much. Right that problems fixed, but now I have this error when the pane first loads. Sorry, to keep asking what I imagine are pretty basic questions. I've been trying to get clues online, but to no avail. This is my error message: 2008-10-24 00:30:44.604 Syste

Re: Mouse Coalescing

2008-10-23 Thread Ian was here
That seems to work well. I set a counter that decrements every time the mouseDragged: method is called. When the counter reaches zero, it draws the bezier path (as well as all the other objects in the view). Thanks. --- On Sun, 10/19/08, Michael Ash <[EMAIL PROTECTED]> wrote: > From: Michael

Re: BonjourSample from Hillegass (Advanced Mac OS X Programming)

2008-10-23 Thread Roland King
and how do you do that? There's no gui doodad for adding random directories that I could find and googling threw up mdimport but says that's a one-time indexing and won't be updated. I'd love to get some of that stuff in spotlight. On Oct 24, 2008, at 12:30 AM, I. Savant wrote: On Thu, O

Re: NSInputStream Not Reading All Data

2008-10-23 Thread Roland King
are you sure the data is being sent? What's on the other end sending it, is it buffering data and not sending the last 216 bytes? On Oct 24, 2008, at 2:37 AM, Thaddeus Cooper wrote: Hi All. I have an NSInputStream that I've set up on the run loop to read data from a socket. It's mostly wo

Re: BonjourSample from Hillegass (Advanced Mac OS X Programming)

2008-10-23 Thread I. Savant
On Oct 23, 2008, at 6:52 PM, Roland King wrote: and how do you do that? There's no gui doodad for adding random directories that I could find and googling threw up mdimport but says that's a one-time indexing and won't be updated. I'd love to get some of that stuff in spotlight. In my p

NSData and NSImage

2008-10-23 Thread Andy Bell
Hi, I have an NSData buffer with valid JPEG data which I can save to disk using writeToFile: and view the image easily. When I come to create an NSImage object from the same data I get an object returned back from initWithData: but the size property has dumb values. What does this mean? Is this

MVC

2008-10-23 Thread Max Radermacher
Hello: I'm a n00b to cocoa and have heard a lot about MVC (Model View Controller). I don't fully understand it and was wondering if someone could point me in the direction of some good resources. Thanks. digits ___ Cocoa-dev mailing list (Cocoa-d

[NSOpenPanel] How to disable folder selection but still access their contents?

2008-10-23 Thread Iceberg-Dev
Solution not found in the cocoabuilder archive. Problem: I have a list of files and folders. I can add items to this list through a standard NSOpenPanel dialog. When a folder is already in the list, I want to prevent the user from selecting it from the NSOpenPanel dialog. I can do

RE: Getting Carbon EventRef from cocoa NSEvent

2008-10-23 Thread Jesper Storm Bache
If you look in NSEvent.h you will see : #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 /* -eventRef and +eventWithEventRef: are valid for all events */ /* -eventRef returns an EventRef corresponding to the NSEvent. The EventRef is retained by the NSEvent, so will be valid as long as

Re: MVC

2008-10-23 Thread Nick Zitzmann
On Oct 23, 2008, at 2:09 PM, Max Radermacher wrote: I'm a n00b to cocoa and have heard a lot about MVC (Model View Controller). I don't fully understand it and was wondering if someone could point me in the direction of some good resources. Thanks.

Re: NSInputStream Not Reading All Data [SOLVED]

2008-10-23 Thread Thaddeus Cooper
Thanks to all who responded. It turns out the issue was the bytesRead count not being properly updated. The data was actually there... Thaddeus O. Cooper ([EMAIL PROTECTED]) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: NSData and NSImage

2008-10-23 Thread David Duncan
On Oct 23, 2008, at 11:30 AM, Andy Bell wrote: I have an NSData buffer with valid JPEG data which I can save to disk using writeToFile: and view the image easily. When I come to create an NSImage object from the same data I get an object returned back from initWithData: but the size proper

Re: [NSOpenPanel] How to disable folder selection but still access their contents?

2008-10-23 Thread Corbin Dunn
On Oct 23, 2008, at 1:38 PM, Iceberg-Dev wrote: Solution not found in the cocoabuilder archive. Problem: I have a list of files and folders. I can add items to this list through a standard NSOpenPanel dialog. When a folder is already in the list, I want to prevent the user from s

Re: enumerating the NSApplication instances?

2008-10-23 Thread Andrew Farmer
On 23 Oct 08, at 14:55, Charles Steinman wrote: --- On Thu, 10/23/08, Bill Janssen <[EMAIL PROTECTED]> wrote: Charles Steinman <[EMAIL PROTECTED]> wrote: You can't get NSApplication instances for other applications. Even as root? It has nothing to do with user permissions. There is no API f

Re: Hud window controls

2008-10-23 Thread Sandro Noel
Thank you pretty cool stuff Sandro On 23-Oct-08, at 5:52 PM, Kiel Gillard wrote: This framework looks pretty good too Kiel On 24/10/2008, at 3:06 AM, I. Savant wrote: On Thu, Oct 23, 2008 at 11:52 AM, Sandro Noel <[EMAIL PROTECTED

Re: Debugging preference pane

2008-10-23 Thread Adam Penny
Hi Nick, hi Glen, Just a quick note to say that I've finally cracked the problem and thank you both very much for your help. For that last bit, I was binding my array to the filter predicate (no idea what it is)of the array controller where I should have been binding to the content array.

Re: [MVC Design] Model Controller Rationale?

2008-10-23 Thread John Velman
On Fri, Oct 17, 2008 at 03:47:04PM -0400, Kyle Sluder wrote: > On Fri, Oct 17, 2008 at 5:28 AM, Oleg Krupnov <[EMAIL PROTECTED]> wrote: > > Is there any benefit in introducing a model controller, as another > > layer of indirection between the model and the view controller? Or > > should all busin

Re: MVC

2008-10-23 Thread Sherm Pendley
On Thu, Oct 23, 2008 at 4:09 PM, Max Radermacher < [EMAIL PROTECTED]> wrote: > > I'm a n00b to cocoa and have heard a lot about MVC (Model View Controller). > I don't fully understand it and was wondering if someone could point me in > the direction of some good resources. Thanks. < http://devel

Re: Problems when putting a window between desktop and desktop icons

2008-10-23 Thread Andreas Mayer
Am 23.10.2008 um 19:48 Uhr schrieb Markus Amalthea Magnuson: Any other suggestions are welcome. I did not see any reply to Charles' suggestion: Am 21.10.2008 um 23:09 Uhr schrieb Charles Steinman: Does [window setIgnoresMouseEvents:YES] work? In case that does *not* work, you may need to

Re: /Library/Logs vs. user/Library/Logs

2008-10-23 Thread Jason Coco
On Oct 23, 2008, at 18:27 , Chris Markle wrote: Jason, Why not use ASL for logging? It's worked really well for me. I also have an Obj-C class you can use that wraps ASL if you want. Right now our app runs (for better or for worse) on Windows and OS X with lots of common code between the

  1   2   >