Passing arrays via WSMethodInvocationInvoke() [WebServicesCore]

2009-10-23 Thread Dan Korn
I'm writing some Objective-C (actually Objective-C++) code to create a Cocoa framework to call into a Web Service (hosted in ASP.NET) using WSMethodInvocationInvoke(), based on the example from here: http://developer.apple.com/internet/webservices/webservicescoreandcfnetwork.html This works g

Re: Making NSView auto resize to fit contents of NSTextView

2009-10-23 Thread PCWiz
Tried this with my NSCollectionViewItem's view. I first subclassed NSCollectionViewItem and added this method: - (void)awakeFromNib { [(AutoResizingView* )[self view] setup]; } Basically just calls the "setup" method of the NSCollectionView's view. Then this is my setup method in the

Re: Make an NSButton send a message on right click

2009-10-23 Thread Andy Lee
On Oct 23, 2009, at 2:42 PM, Kyle Sluder wrote: On Fri, Oct 23, 2009 at 10:55 AM, Jens Alfke wrote: Yup. Subclass NSButton, override -mouseDown: and check whether the event uses the right button. If so, do your thing; otherwise, call the superclass method. This isn't going to work, becau

Re: 2 Questions about the project "With and Without bindings"

2009-10-23 Thread Michael de Haan
On Oct 23, 2009, at 5:47 PM, mmalc Crawford wrote: The bug is actually that, for some reason, the projects aren't marked as using garbage collection. They should be... Hmmm!! :-) None the less...they are **very** instructive and extremely helpful. Thank you for hosting them. __

Re: 2 Questions about the project "With and Without bindings"

2009-10-23 Thread mmalc Crawford
On Oct 23, 2009, at 5:27 pm, Ken Thomases wrote: > Indeed, there are no dealloc methods in the entire sample, which makes it > buggy. There should be one for the MyDocument and Bookmark classes. > The bug is actually that, for some reason, the projects aren't marked as using garbage collectio

Re: 2 Questions about the project "With and Without bindings"

2009-10-23 Thread Michael de Haan
Ken and Graham, Thank you both very much. I think all that reading is finally beginning to pay off. Your input is truly very helpful and much appreciated. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: 2 Questions about the project "With and Without bindings"

2009-10-23 Thread Ken Thomases
On Oct 23, 2009, at 4:19 PM, Michael de Haan wrote: When adding a bookmark, the bookmark object is initialized thus: - init { if (self = [super init]) { title = @"new title"; self.creationDate = [NSDate date]; } return self; } **property declarations for title and c

Re: Making NSView auto resize to fit contents of NSTextView

2009-10-23 Thread Graham Cox
On 24/10/2009, at 10:43 AM, PCWiz wrote: I basically need a way of getting the height of the text view needed to display all the text. Welcome to the wonderful world of the Cocoa text system! You need to go deeper into the text system and look at the NSLayoutManager object: - (NSRect)use

Re: 2 Questions about the project "With and Without bindings"

2009-10-23 Thread Graham Cox
On 24/10/2009, at 8:19 AM, Michael de Haan wrote: When adding a bookmark, the bookmark object is initialized thus: - init { if (self = [super init]) While not strictly wrong, the above is not good style. If you enable more warnings, this will be flagged as "possible unwanted assignment

WebView in a layer view hierarchy - not working on Snow Leopard

2009-10-23 Thread Luke Evans
I have an app that plain stopped working between Leopard and Snow Leopard. This app relies on placing a WebView component in a Core Animation layer view hierarchy (i.e. "Needs Core Animation Layer" flag is turned on for this view and its superviews), so that I can draw annotations over the

Re: NSTableView Always Undesirably Selects First Row when It Loses Key Focus

2009-10-23 Thread Grant Erickson
On 10/23/09 4:38 PM, Kyle Sluder wrote: > On Fri, Oct 23, 2009 at 4:31 PM, Grant Erickson wrote: >> Unlike the Network table, in my case there is no mandate that an item (i.e. >> row) always be selected. However, if there are no rows selected, when I hit >> the tab key to change the key focus from

Making NSView auto resize to fit contents of NSTextView

2009-10-23 Thread PCWiz
I have an NSView subclass (the view of an NSCollectionViewItem) that needs to dynamically resize in order to fully display the contents of a NSTextView that it contains. I've tried just doing this off the top of my head: [self setFrame:NSMakeRect([self frame].origin.x, [self frame].origin

Re: NSTableView Always Undesirably Selects First Row when It Loses Key Focus

2009-10-23 Thread Kyle Sluder
On Fri, Oct 23, 2009 at 4:31 PM, Grant Erickson wrote: > Unlike the Network table, in my case there is no mandate that an item (i.e. > row) always be selected. However, if there are no rows selected, when I hit > the tab key to change the key focus from my table to the preferences search > field,

NSTableView Always Undesirably Selects First Row when It Loses Key Focus

2009-10-23 Thread Grant Erickson
I have a device list in my preference pane implemented as a NSTableView under 10.5, not unlike the list of network devices in Apple's Network preference pane. Unlike the Network table, in my case there is no mandate that an item (i.e. row) always be selected. However, if there are no rows selected

Re: Bindings, am I doing right by MVC?

2009-10-23 Thread Keary Suska
On Oct 23, 2009, at 11:52 AM, Paul Bruneau wrote: But I wonder about my edit fields. They are bound like: Bind to: File's owner (a NSWindowController subclass) Controller Key: Model Key Path: door.backset (door is an ivar of the window controller--it's the door that the window controller is

Re: IKImageBrowserView Dragging outside

2009-10-23 Thread Thomas Goossens
On Oct 23, 2009, at 9:15 PM, TFS - Tobias Jordan wrote: > Thanks for that, Thomas. The Problem I'm having is that the > IKImageBrowserView is just representing previews. So it's a file preview and > there's a path behind the preview to be copied when dragging out. > With the standard settings o

2 Questions about the project "With and Without bindings"

2009-10-23 Thread Michael de Haan
I am going through mmalc's excellent bindings pages...and learning a lot. But, may I ask 2 questions related to this, that I could not find in the archives. 1) When adding a bookmark, the bookmark object is initialized thus: - init { if (self = [super init]) { title =

Re: Avoid Compiler Warning regarding IB 3.2

2009-10-23 Thread Matthias Arndt
Am 23.10.2009 um 22:11 schrieb Kyle Sluder: Make sure you set the Development Target to IB3.2 in the Document Info window in IB (Window > Document Info). Wow! That was FAST and EASY ... ! Sorry, that I missed that setting, you made my day! Matthias __

Re: Avoid Compiler Warning regarding IB 3.2

2009-10-23 Thread Kyle Sluder
On Fri, Oct 23, 2009 at 1:04 PM, Matthias Arndt wrote: >    Custom values for the "identifier" attribute are not available in > Interface Builder versions prior to 3.2. Make sure you set the Development Target to IB3.2 in the Document Info window in IB (Window > Document Info). --Kyle Sluder ___

Avoid Compiler Warning regarding IB 3.2

2009-10-23 Thread Matthias Arndt
Hi! In one of my NIBs I use a feature that's only available with IB 3.2 (individual toolbar identifier). This causes the compiler to fire the following warning: Custom values for the "identifier" attribute are not available in Interface Builder versions prior to 3.2. Is there any wa

Re: NSDate timeIntervalSinceNow problem

2009-10-23 Thread Greg Parker
On Oct 23, 2009, at 8:50 AM, Jens Alfke wrote: On Oct 23, 2009, at 8:46 AM, Jens Alfke wrote: "%f" is for float. Use "%d" for doubles. Oops, I meant "%lf" for doubles. %f and %lf both work for both float and double. The printf(3) man page notes: Modifiera, A, e, E, f, F, g, G l

Re: IKImageBrowserView Dragging outside

2009-10-23 Thread TFS - Tobias Jordan
Thanks for that, Thomas. The Problem I'm having is that the IKImageBrowserView is just representing previews. So it's a file preview and there's a path behind the preview to be copied when dragging out. With the standard settings of the view, I'll get the preview image copied to the locatio

Re: Make an NSButton send a message on right click

2009-10-23 Thread Kyle Sluder
On Fri, Oct 23, 2009 at 10:55 AM, Jens Alfke wrote: > Yup. Subclass NSButton, override -mouseDown: and check whether the event > uses the right button. If so, do your thing; otherwise, call the superclass > method. This isn't going to work, because Alexander is using an NSMatrix. This means NSBut

Re: Make an NSButton send a message on right click

2009-10-23 Thread Jens Alfke
On Oct 22, 2009, at 5:28 PM, Alexander Golec wrote: For the cells, I want to have a matrix of NSButtons, and I want each button to respond differently to right clicks and left clicks. Would I have to extend NSButton or something? Yup. Subclass NSButton, override -mouseDown: and check wheth

Re: stringWithContentsOfURL with resulting error 256

2009-10-23 Thread Jens Alfke
On Oct 23, 2009, at 9:23 AM, James Lin wrote: I tried curl and gotten "500 Internal Server Error-The server encountered an internal error or misconfiguration and was unable to complete your request." That is a server error, just like it says. Something probably went wrong inside your PHP

Bindings, am I doing right by MVC?

2009-10-23 Thread Paul Bruneau
I'm trying to do things correctly in my new app that I am writing, so I wanted to ask this question because I'm not sure if I am. I have a window for a "door" object in my document (NSDocument based app). It's a good thing I don't work for a window company or things would be really confusin

UITextField in UITableView covered by keyboard

2009-10-23 Thread Bob Barnes
Hi all, I posted this a yesterday, but it never appeared on the list and it's not showing up in the web archive so I thought I'd retry. I have a UITableView that contains some cells with UITextField's embedded in them. When I touch the UITextField to begin editing the keyboard pops u

Re: IKImageBrowserView Dragging outside

2009-10-23 Thread Thomas Goossens
Hi Jordan, imageBrowser:writeItemsAtIndexes:toPasteboard: is indeed the way to go. Implement this method in your datasource and just fill the pasteboard with the info you want (Images, paths, urls, data...) for the indexes passed in arguments. Also if you feed the imageBrowser with paths or url

Re: Viewing a UIImageJPEGRepresentation image on the desktop

2009-10-23 Thread Randall Meadows
On Oct 22, 2009, at 3:38 PM, The Grand Poohbah wrote: I need to examine an image that was stored in a property list as a NSData UIImageJPEGRepresentation. The property list is a plist file that is sent to me from an iPhone as an email attachment. The image is a "Data" class item in the prop

Make an NSButton send a message on right click

2009-10-23 Thread Alexander Golec
I am somewhat new to Cocoa development, and I've decided to learn a bit by doing my favorite new-language project: a Minesweeper clone. For the cells, I want to have a matrix of NSButtons, and I want each button to respond differently to right clicks and left clicks. Would I have to extend

Viewing a UIImageJPEGRepresentation image on the desktop

2009-10-23 Thread The Grand Poohbah
I need to examine an image that was stored in a property list as a NSData UIImageJPEGRepresentation. The property list is a plist file that is sent to me from an iPhone as an email attachment. The image is a "Data" class item in the property list and stored as a long series of hex bytes. I

kCGErrorIllegalArgument: CGSUnionRegionWithRect

2009-10-23 Thread Jon Nall
Hi. I'm getting the message below printed to the console from my application and hope someone knows what might be going on. When this happens I have a view with an NSProgressIndicator which is updating. In my view's drawRect:, I modify the frame of the progress indicator and draw an NSBezi

IKImageBrowserView Dragging outside

2009-10-23 Thread TFS - Tobias Jordan
Hi all, I've been wondering on how to implement dragging out of the view in the IKImageBrowserView. I am pretty sure this is where I have to start: -imageBrowser:writeItemsAtIndexes:toPasteboard: but I don't have a clue what to do next. It's not a real File Promise, I just need the folder

[SOLVED] Re: is GC not available on 10.5.8?

2009-10-23 Thread Navneet Kumar
Hi, Thanks for the valuable replies, they may come in handy in future. Although the base sdk was chosen to be 10.5 at various places, the menu Project->Active SDK was still 10.6, did it to 10.5 and it is working now. Thanks, Nick On 23-Oct-2009, at 9:26 PM, Jeremy Pereira wrote: The load

Re: stringWithContentsOfURL with resulting error 256

2009-10-23 Thread James Lin
Hi, Thank you for the great tip... I tried curl and gotten "500 Internal Server Error-The server encountered an internal error or misconfiguration and was unable to complete your request." But how can I troubleshoot this one? My ISP is sure going to come back to me with "It works in our se

Re: Foundation Tool and NSDistributedNotificationCenter

2009-10-23 Thread Jerry Krinock
On 2009 Oct 23, at 08:37, Zephyroth Akash wrote: [[NSRunLoop currentRunLoop] run]; I believe you need to read All About Run Loops... http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html#/ /apple_ref/doc/uid/1057

Fwd: Foundation Tool and NSDistributedNotificationCenter

2009-10-23 Thread Zephyroth Akash
Début du message réexpédié : De : Zephyroth Akash Date : 23 octobre 2009 17:59:48 HAEC À : Jens Alfke Objet : Rép : Foundation Tool and NSDistributedNotificationCenter The tool launch the application. The application post a notification to the tool. The tool get the notification and do it

Re: is GC not available on 10.5.8?

2009-10-23 Thread Jeremy Pereira
The load command is a 10.6 only mach-o load command (LC_DYLD_INFO_ONLY). Something in your application is compiled and linked for 10.6. On 23 Oct 2009, at 16:40, Nick Rogers wrote: Hi, Thanks for the reply. The app actually works as a launcher of another app with root privileges (its onl

Re: Foundation Tool and NSDistributedNotificationCenter

2009-10-23 Thread Jens Alfke
On Oct 23, 2009, at 8:37 AM, Zephyroth Akash wrote: It works fine, the tool get the notification and do its work ... but I'm unable to notify the application that the work is done. Are you posting another notification from your tool back to the application? In the code you posted I'm not c

Re: NSDate timeIntervalSinceNow problem

2009-10-23 Thread Jens Alfke
On Oct 23, 2009, at 8:46 AM, Jens Alfke wrote: "%f" is for float. Use "%d" for doubles. Oops, I meant "%lf" for doubles. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Professional Error Handling

2009-10-23 Thread Jens Alfke
On Oct 23, 2009, at 7:03 AM, Squ Aire wrote: I'm not much for the second suggestion of putting all the errors in one big header file (thanks for the idea nonetheless!). I like the idea of seperating it like you have, only that I'm not sure what purpose it serves to make it available to all

Re: is GC not available on 10.5.8?

2009-10-23 Thread Bill Bumgarner
On Oct 23, 2009, at 8:40 AM, Nick Rogers wrote: > Thanks for the reply. > The app actually works as a launcher of another app with root privileges (its > only job is this). > Hence its a standard cocoa project with the following frameworks: > CoreFoundation, Cocoa, AppKit, CoreData, Foundation a

Re: NSDate timeIntervalSinceNow problem

2009-10-23 Thread Jens Alfke
On Oct 22, 2009, at 9:02 PM, PCWiz wrote: Tried using %f to log it instead of %d, but it gives me this: 2009-10-22 22:01:55.459 TestApplication[8629:a0f] -2160.459210 "%f" is for float. Use "%d" for doubles. —Jens___ Cocoa-dev mailing list (Cocoa

Re: is GC not available on 10.5.8?

2009-10-23 Thread Nick Rogers
Hi, Thanks for the reply. The app actually works as a launcher of another app with root privileges (its only job is this). Hence its a standard cocoa project with the following frameworks: CoreFoundation, Cocoa, AppKit, CoreData, Foundation and Security frameworks. Thanks, Nick On 23-Oct-2

Foundation Tool and NSDistributedNotificationCenter

2009-10-23 Thread Zephyroth Akash
Hi, I'm writing a Foundation Tool which detect some hardware components and launch an application. Once the application is running it ask the user to make a choice and then post a notification to the "daemon". It works fine, the tool get the notification and do its work ... but I'm unab

Re: is GC not available on 10.5.8?

2009-10-23 Thread Bill Bumgarner
On Oct 23, 2009, at 5:04 AM, Nick Rogers wrote: > I compiled using Xcode3.2 on 10.6.1, 10.5 base sdk and for Intel 64-bit only > with GC only option. > The program compiles fine, but the following error is there when launching it > on 10.5.8 system: (window doesn't appear) > > EXC_BREAKPOINT (

RE: Professional Error Handling

2009-10-23 Thread Squ Aire
Thanks, I like your idea. If I understood your correctly, the code in your example is for the files ExpressionProcessor.h and ExpressionProcessor.m. If that is the case, why not just put it all in the .m file? And do "static" instead of "extern" on the error domain string. That way you have a l

New AquaticPrime home on github

2009-10-23 Thread Benjamin Rister
Following some discussion on the macsb list, I've created a new home for AquaticPrime, the popular open-source shareware registration infrastructure. The code has been stagnating since Lucas moved on, and many developers have their own private branc

Re: is GC not available on 10.5.8?

2009-10-23 Thread Nick Rogers
HI, I checked all the project and target settings, they are in order and I cleaned all targets before testing. Thanks, Nick On 23-Oct-2009, at 5:34 PM, Nick Rogers wrote: Hi, I compiled using Xcode3.2 on 10.6.1, 10.5 base sdk and for Intel 64- bit only with GC only option. The program compi

is GC not available on 10.5.8?

2009-10-23 Thread Nick Rogers
Hi, I compiled using Xcode3.2 on 10.6.1, 10.5 base sdk and for Intel 64- bit only with GC only option. The program compiles fine, but the following error is there when launching it on 10.5.8 system: (window doesn't appear) EXC_BREAKPOINT (SIGABRT) Dyld error message: unknown required load co