Re: Cocoa program without xib file

2009-04-16 Thread Dave Geering
On Fri, Apr 17, 2009 at 1:31 PM, Bill Bumgarner wrote: > What are you trying to do? > > Building a Cocoa program without a MainMenu.xib [or MainMenu.nib] is > possible, but it is not recommended, supported, or at all standard/typical. > > b.bum Objective-C-based command-line utilities that use on

Re: Cocoa program without xib file

2009-04-16 Thread Bill Bumgarner
On Apr 16, 2009, at 11:26 PM, Dave Geering wrote: On Fri, Apr 17, 2009 at 1:31 PM, Bill Bumgarner wrote: What are you trying to do? Building a Cocoa program without a MainMenu.xib [or MainMenu.nib] is possible, but it is not recommended, supported, or at all standard/ typical. b.bum Objec

Re: Loading Entities from a CoreData document

2009-04-16 Thread mmalc Crawford
On Apr 16, 2009, at 10:04 PM, David Zwerdling wrote: A while ago I wrote a simple application in which users create and manipulate CoreData entities named "DataSets". It is good to use the appropriate terminology. Users don't "create and manipulate CoreData entities"; you define the entiti

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Greg Guerin
Miles wrote: I'm creating a game for where the dictionary file will never get modified, so I'm not really worried about that. I was pretty sure the dictionary was read-only, but that doesn't mean it's always error-free. I was actually thinking of production errors, where the dictionary

Re: Loading Entities from a CoreData document

2009-04-16 Thread Jerry Krinock
On 2009 Apr 16, at 22:04, David Zwerdling wrote: The issue is, when using code like this (url points to a document full of data sets): NSPersistentDocument *pd = [NSPersistentDocument new]; BOOL success = [pd configurePersistentStoreCoordinatorForURL:url ofType:NSXMLStoreType mode

Loading Entities from a CoreData document

2009-04-16 Thread David Zwerdling
Dear List, A while ago I wrote a simple application in which users create and manipulate CoreData entities named "DataSets". Simple enough. I used the document preset so I didn't have to deal with any of the file writing stuff. Anyways, I'm writing a new application that uses these data

Re: Setting up an auxiliary task for use with Distributed Objects

2009-04-16 Thread Oleg Krupnov
@Jeremy > You can communicate with the task, since you seem to control it, by > setting up a pipe (NSPipe) and setting its write/read file handles as > the stdin/stdout for the task. The task can then send you a "ready to > go" signal. You can use -[NSFileHandle > waitForDataInBackgroundAndNotify]

Re: Cocoa program without xib file

2009-04-16 Thread Jeremy W. Sherman
Jeff Johnson has written a series of articles exploring a nibless Cocoa app. You will find them at http://lapcatsoftware.com/blog/?s=%22working+without+a+nib%22. If you simply want to use Foundation without a nib, that's as easy as can be. If you want to use AppKit, good luck, and read Jeff's arti

Re: Cocoa program without xib file

2009-04-16 Thread mathew davis
Hello YongLi, are you writing for osx or iphone? http://ericasadun.com/ has sample code for iphone development, this sample code does not use xib files. On 16/04/2009, at 3:35 PM, YongLi wrote: Hello everyone: I want to build a Cocoa program without xib file. But I can't find any introd

Re: Cocoa program without xib file

2009-04-16 Thread WT
Why would you want to do that? Even if it is possible, and I'm not sure it is, it would imply writing, debugging, and maintaining a zillion more lines of code, code that has already been written, debugged, and is maintained regularly by Apple. Also, like I said, it might not even be possibl

Re: Cocoa program without xib file

2009-04-16 Thread Alex Kac
Please search the cocoa-dev archives. This is talked about at considerable length... On Apr 16, 2009, at 12:35 AM, YongLi wrote: Hello everyone: I want to build a Cocoa program without xib file. But I can't find any introductions or tutorials. Does anybody know where I can find those source?

Re: [SOLVED] Re: NSView modifies CALayer's masksToBounds?

2009-04-16 Thread Scott Anguish
No. On 2009-04-16, at 10:50 PM, Mike Manzano wrote: That did it. Thanks! One last question. If I supply my own layer, is it legal to add subviews to the view that's hosting my layer? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: Cocoa program without xib file

2009-04-16 Thread Bill Bumgarner
On Apr 15, 2009, at 10:35 PM, YongLi wrote: I want to build a Cocoa program without xib file. But I can't find any introductions or tutorials. Does anybody know where I can find those source? What are you trying to do? Building a Cocoa program without a MainMenu.xib [or MainMenu.nib] is poss

NSMetadataQueryDidUpdateNotification problem with volumes

2009-04-16 Thread Eddie Aguirre
I've setup a NSMetaDataQuery to search for particular file types. I've set the search scope to NSMetadataQueryLocalComputerScope. The initial search phase works correctly. The query returns all of the expected files on all of the local volumes. Now if I add a file to the root volume I ge

Advice on server-side web service technology

2009-04-16 Thread Russell Cook
I am working on a custom Obj-C framework that I need to expose through web services on an Xserve. I am finding a serious lack of support for server-side web services in the Cocoa frameworks. My searching has turned up little from others following this same path. From what I have found, these are

Cocoa program without xib file

2009-04-16 Thread YongLi
Hello everyone: I want to build a Cocoa program without xib file. But I can't find any introductions or tutorials. Does anybody know where I can find those source? best wishes YongLi ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-16 Thread Jerry Krinock
The fact that Core Data "cannot fetch using a predicate based on transient properties" [1] seems to greatly limit the utility of the NSPredicateEditor view, and makes me very sad. For example, say that my objects are student test results with a 'score' attribute and two dozen other properti

Create Library of Media File

2009-04-16 Thread Bright
Hi,everyone Now, I am trying to write a music player app. So I want to create a "Library" to add my sound files to it. The function of the library is same as iTunes library. What's the principle of creating the "Library"? And,how to implement it? Any clues and documents about about

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Marcel Weiher
On Apr 16, 2009, at 18:59 , Michael Ash wrote: On Thu, Apr 16, 2009 at 2:47 PM, WT wrote: since he'll be dealing with the string's raw bytes, won't Miles have to manually add a null byte to terminate the search string? The strnstr() function takes a length, and can thus be safely used on

[SOLVED] Re: NSView modifies CALayer's masksToBounds?

2009-04-16 Thread Mike Manzano
That did it. Thanks! One last question. If I supply my own layer, is it legal to add subviews to the view that's hosting my layer? On Apr 16, 2009, at 6:46 PM, Kyle Sluder wrote: On Thu, Apr 16, 2009 at 9:17 PM, Mike Manzano wrote: [theView setLayer: theRootLayer]; [theView setWantsLayer:

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Michael Ash
On Thu, Apr 16, 2009 at 2:47 PM, WT wrote: > Marcel, > > since he'll be dealing with the string's raw bytes, won't Miles have to > manually add a null byte to terminate the search string? The strnstr() function takes a length, and can thus be safely used on buffers which contain no NUL byte. On

Re: NSView modifies CALayer's masksToBounds?

2009-04-16 Thread Kyle Sluder
On Thu, Apr 16, 2009 at 9:17 PM, Mike Manzano wrote: > [theView setLayer: theRootLayer]; > [theView setWantsLayer:YES]; > > Is this what you mean by a "layer-hosted view"? If so, does that mean that > theRootLayer is mine to manage as I wish? Yes. If you set the layer before calling -setWantsLay

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Miles
I'm creating a game for where the dictionary file will never get modified, so I'm not really worried about that. The strings that I am searching for are not from user input, but from user selection, so I'm guaranteed to have the case be correct -- so I don't need to worry about upper vs lower-case

Re: NSView modifies CALayer's masksToBounds?

2009-04-16 Thread Mike Manzano
The example in the docs say: "CoreAnimationdoesn'tprovideameansforactuallydisplayinglayersinawindow , theymustbehostedby aview. Whenpairedwithaview, theviewmustprovideevent- handlingfortheunderlyinglayers, whilethe layersprovidedisplayofthecontent." In the sample code, here is the example give

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-16 Thread Graham Cox
On 17/04/2009, at 1:43 AM, Jerry Krinock wrote: The other way around, Graham. I need the window controller, so I get it from -window. See below. I don't see why you need to get this from an item in a tab view? You talk about the need to initialise something. What? How? What are you tryi

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Greg Guerin
Miles wrote: const char *fileBytes = [stringFileContents bytes]; char *ptr= strstr(fileBytes, cString); Are you certain the bytes returned by [stringFileContents bytes] null- terminated? How was that data initialized? If it's reading from a file, is t

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Marcel Weiher
On Apr 16, 2009, at 12:01 , Miles wrote: It looks like I have the search working like this, but I have to double-space the dictionary file to have a leading \n. No, you just need one initial extra newline at the start, the newline from the end of the last string matches up with the start

Re: Simulating a click in NSStepper

2009-04-16 Thread Nick Zitzmann
On Apr 16, 2009, at 3:13 PM, David Alter wrote: I'm using a NSStepper with the little up and down arrows. I want to simulate a click where the correct arrow will get highlighted as if someone clicked into it. I'm unclear how I should do this. I can do a perform click but that does not spe

Re: NSView modifies CALayer's masksToBounds?

2009-04-16 Thread Kyle Sluder
On Thu, Apr 16, 2009 at 7:14 PM, Mike Manzano wrote: > Is there a way to stop an NSView from modifying its CALayer's masksToBounds > property? The layer that backs a layer-backed view is Not Yours(TM). If you want control over the layer, you need to use a layer-hosted view. This means you might

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Kyle Sluder
On Thu, Apr 16, 2009 at 8:09 PM, Miles wrote: >    char *ptr                        = strstr(fileBytes, cString); OK, this makes sense, but you're still doing a linear scan through the data you've loaded (and I'm assuming creating NSString objects from what you find because plain old C strings wi

Re: Create folder in protected directory

2009-04-16 Thread Kyle Sluder
On Thu, Apr 16, 2009 at 7:23 PM, Chris Purcell wrote: > Thanks for reply Kyle.  The app restores a user's user folder and needs to > recreate that folder within the /Users directory.  Is there an easier way to > accomplish this then having to use the Authorization services C library? Ah. I'm afr

Re: Setting up an auxiliary task for use with Distributed Objects

2009-04-16 Thread Ken Thomases
On Apr 16, 2009, at 4:01 AM, Oleg Krupnov wrote: 2) How do I quit the aux task? [NSTask terminate] does not work, invalidating the connection does not work... First, your MyVendedObject class should expose a method for the client to request that the server terminate. Then, you can change y

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Miles
I'm all for just a little guidance, and thank you for it. Everything you said makes sense now, and I have it working: NSString *searchStr= @"\nJOY\n"; const char *cString = [searchStr UTF8String]; const char *fileBytes = [stringFileContents bytes]; char *ptr

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Scott Ribe
No null terminator... Now it's perfectly possible the bytes will get written into a zeroed block, and so there will be a null terminator purely by chance some times, and not other times. Why the NSData? Why not just get a C string from searchStr, if that's what you want? Otherwise, in general an N

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Greg Guerin
Miles wrote: NSString *searchStr= @"\njoy\n"; NSData *strData= [searchStr dataUsingEncoding:NSUTF8StringEncoding]; const char *strBytes= [strData bytes]; Think about what you're doing here, then look at the NSString method - UTF8String. Also, think about

Re: Create folder in protected directory

2009-04-16 Thread Chris Purcell
Thanks for reply Kyle. The app restores a user's user folder and needs to recreate that folder within the /Users directory. Is there an easier way to accomplish this then having to use the Authorization services C library? On Apr 16, 2009, at 3:53 PM, Kyle Sluder wrote: On Thu, Apr 16

Quickie question on text edit cycle (and textDidEndEditing notification)

2009-04-16 Thread Luke Evans
Hello Cocoa listers. What is the best/right way to obtain the context object for a piece of text that has been edited by the editing system (i.e. in a cell in NSOutlineView) once the textDidEndEditing notification is delivered to an observer? This is the second or third time I have added

NSView modifies CALayer's masksToBounds?

2009-04-16 Thread Mike Manzano
Is there a way to stop an NSView from modifying its CALayer's masksToBounds property? It looks like it's making the change during a frame resize. It's making a call to some internal selector called _updateLayerMasksToBoundsFromView. AFAIK, there's no way to turn on or off masking from the

Re: Create folder in protected directory

2009-04-16 Thread Kyle Sluder
On Thu, Apr 16, 2009 at 5:59 PM, Chris Purcell wrote: > My App has to create a folder in a directory owned by the system.  How would > I go about doing this, do I need to use the security framework and get the > user to authenticate themselves as an admin? Yes, the Security framework is necessary

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Miles
Also, any idea why these lines would give different results in different projects? NSString *searchStr= @"\njoy\n"; NSData *strData= [searchStr dataUsingEncoding:NSUTF8StringEncoding]; const char *strBytes= [strData bytes]; When this code is in the project you

Re: Setting a layer delegate affects drawRect being called

2009-04-16 Thread David Duncan
On Apr 16, 2009, at 3:02 PM, Mohan Parthasarathy wrote: I am implementing actionForLayer:forKey for the property "sublayers". How do I do this unless I am implementing the Views Layer delegate because i am adding/removing layers from the Views root Layer ? Does this mean I have to add a du

Re: BAS use of asl_log()

2009-04-16 Thread Jerry Krinock
On 2009 Apr 16, at 12:40, Todd Heberlein wrote: err = asl_log(asl, aslMsg, ASL_LEVEL_ERR, "Request failed: %m"); ... err = asl_log(asl, aslMsg, ASL_LEVEL_ERR, errStr); Is there a requirement that [a] at compile time the field be known (as in the first example), or [b] can it also be generat

Create folder in protected directory

2009-04-16 Thread Chris Purcell
Hello everyone, My App has to create a folder in a directory owned by the system. How would I go about doing this, do I need to use the security framework and get the user to authenticate themselves as an admin? Thanks! --Chris ___ Cocoa-dev

Re: Setting a layer delegate affects drawRect being called

2009-04-16 Thread David Duncan
On Apr 16, 2009, at 2:54 PM, Mohan Parthasarathy wrote: I have a View whose drawRect method never gets called when I call [View setNeedsDisplay]. It looks like the reason is that the View's layer delegate is been set and If I remove that drawRect is called. Is this an expected behavior or

Setting a layer delegate affects drawRect being called

2009-04-16 Thread Mohan Parthasarathy
Hi, I have a View whose drawRect method never gets called when I call [View setNeedsDisplay]. It looks like the reason is that the View's layer delegate is been set and If I remove that drawRect is called. Is this an expected behavior or something else is going on ? thanks -mohan

Simulating a click in NSStepper

2009-04-16 Thread David Alter
I'm using a NSStepper with the little up and down arrows. I want to simulate a click where the correct arrow will get highlighted as if someone clicked into it. I'm unclear how I should do this. I can do a perform click but that does not specify what arrow to click. Any suggestions? thanks for the

Re: QTMovieDidEndNotification

2009-04-16 Thread Seth Willits
On Apr 14, 2009, at 4:59 PM, Tilo Villwock wrote: i have a list with QTMovie objects which are supposed to be played one after another. Now, to recognize when a movie has finished playing i registered for the QTMovieDidEndNotification. For some reason though this notification is sometimes p

BAS use of asl_log()

2009-04-16 Thread Todd Heberlein
I am looking the Apple's "Better Authorization Sample" code to figure out how to launch privileged helper tools from a Cocoa app. The BAS code includes use of asl_log(), but sometimes the field is a string literal like: err = asl_log(asl, aslMsg, ASL_LEVEL_ERR, "Request failed: %m"); and

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Miles
It looks like I have the search working like this, but I have to double-space the dictionary file to have a leading \n. NSString *searchStr= @"\njoy\n"; NSData *strData= [searchStr dataUsingEncoding:NSUTF8StringEncoding]; const char *strBytes= [strData bytes];

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread WT
Marcel, since he'll be dealing with the string's raw bytes, won't Miles have to manually add a null byte to terminate the search string? Wagner On Apr 16, 2009, at 7:57 PM, Marcel Weiher wrote: On Apr 16, 2009, at 10:10 , Miles wrote: Marcel, NOW we're talking. This has really been such

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread WT
On Apr 16, 2009, at 7:43 PM, Marcel Weiher wrote: Hi Wagner, we have rather impressive hardware these days, and Objective-C can access all that power if you let it. No kidding. Incidentally, the - [start timeIntervalSinceNow] you used in your code is a really clever trick for getting e

Re: IsBadCodePtr in Cocoa or Unix?

2009-04-16 Thread Douglas Davidson
On Apr 16, 2009, at 11:21 AM, Colin Cornaby wrote: I would suggest reading Microsoft's own notes on that function, which might tell you why it's a bad idea to use that function even under Windows, and give you a clue on how to do something similar on other platforms. You should probably lo

Re: IsBadCodePtr in Cocoa or Unix?

2009-04-16 Thread Eric Gorr
On Apr 16, 2009, at 2:21 PM, Clark Cox wrote: On Thu, Apr 16, 2009 at 11:09 AM, Eric Gorr wrote: I was wondering if anyone knows of a Cocoa or Unix based equivalent for this window function...? Not really. And if you're at the point where you're asking whether or not a pointer is "bad" i

Re: IsBadCodePtr in Cocoa or Unix?

2009-04-16 Thread Clark Cox
On Thu, Apr 16, 2009 at 11:09 AM, Eric Gorr wrote: > I was wondering if anyone knows of a Cocoa or Unix based equivalent for this > window function...? Not really. And if you're at the point where you're asking whether or not a pointer is "bad" in production code, you've already failed :) What p

Re: IsBadCodePtr in Cocoa or Unix?

2009-04-16 Thread Colin Cornaby
I would suggest reading Microsoft's own notes on that function, which might tell you why it's a bad idea to use that function even under Windows, and give you a clue on how to do something similar on other platforms. You should probably look at catching a SIGSEGV, which should be possible,

IsBadCodePtr in Cocoa or Unix?

2009-04-16 Thread Eric Gorr
I was wondering if anyone knows of a Cocoa or Unix based equivalent for this window function...? http://msdn.microsoft.com/en-us/library/aa366712(VS.85).aspx Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Marcel Weiher
On Apr 16, 2009, at 10:10 , Miles wrote: Marcel, NOW we're talking. This has really been such an eye-opening thread. Now it's googling time to try to figure out how to search for a string in there. 1. Get the bytes out of your search string in the encoding that your dictionary is in 2.

Re: Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Randall Meadows
On Apr 16, 2009, at 11:43 AM, Jeremy W. Sherman wrote: Foundation memory management for CoreFoundation programmers, in brief: * the Create rule becomes the "you own all references returned by a method beginning with new, copy, or alloc" * the Get rule becomes "you do not own any references ret

Re: Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Jeremy W. Sherman
Foundation memory management for CoreFoundation programmers, in brief: * the Create rule becomes the "you own all references returned by a method beginning with new, copy, or alloc" * the Get rule becomes "you do not own any references returned by a method beginning with anything else" * C

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Marcel Weiher
Hi Wagner, we have rather impressive hardware these days, and Objective-C can access all that power if you let it. The 0.007 time for the simulator you got sounds about right, my 0.043 was a typo, I was missing a leading zero (fast MacPro). Incidentally, the - [start timeIntervalSinceN

Re: Reading in dictionary from txt file: options for speed

2009-04-16 Thread Miles
Marcel, NOW we're talking. This has really been such an eye-opening thread. Now it's googling time to try to figure out how to search for a string in there. Thanks! On Wed, Apr 15, 2009 at 7:01 PM, WT wrote: > Hi Marcel, > > that's quite impressive. On the simulator on my machine, it took

Re: Apple's PredicateEditorSample returns [self init] in -awakeFromNib ?!?

2009-04-16 Thread Jerry Krinock
On 2009 Apr 15, at 22:07, Michael Ash wrote: It's completely busted ... File a bug ... I agree. Without objection, then ... Bug ID 6798076. Just for the record, there is something else very weird in PredicateEditorSample. When you run it, if you choose predicate operator "contains",

Re: Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Steve Mills
On Apr 16, 2009, at 10:44:07, Jesper Storm Bache wrote: You'll want to read Cocoa memory management: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwnership.html#/ /apple_ref/doc/uid/2043 The general rule is that if you do *not* create an instance b

Re: Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Shawn Erickson
On Thu, Apr 16, 2009 at 8:32 AM, Steve Mills wrote: > Any ideas on what might be wrong? I appreciate any help. Simple misapplication of Cocoa memory management. Read the following (seriously it will save you a lot of time)...

Re: Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Jesper Storm Bache
You'll want to read Cocoa memory management: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwnership.html#/ /apple_ref/doc/uid/2043 The general rule is that if you do *not* create an instance by using [[X alloc] initZZ] then you should *not* call re

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-16 Thread Jerry Krinock
On 2009 Apr 15, at 22:14, Michael Ash wrote: IMO that's a silly objection. Subclassing and adding this method is easy, straightforward, and it works. You only need to override one method to justify having a subclass. Thanks Michael. I decided to subclass the view that needs the initializat

Re: Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Michael Ash
On Thu, Apr 16, 2009 at 11:32 AM, Steve Mills wrote: > I'm not a Cocoa developer, so I rarely have to touch the stuff. This code > used to work, and I'm not sure when or why it got broken. It previously did > not have the NSApplicationLoad or NSAutoreleasePool, so I added those in > hopes that tha

Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Steve Mills
I'm not a Cocoa developer, so I rarely have to touch the stuff. This code used to work, and I'm not sure when or why it got broken. It previously did not have the NSApplicationLoad or NSAutoreleasePool, so I added those in hopes that that was the problem. Before adding those 2 things, I wou

Re: nstoolbar in tiger

2009-04-16 Thread Jo Phils
Hello and thanks for the replies! Yes it's what I.S. mentioned about doing with IB3. That clears it up and I'll just do it the old-fashioned way following the examples... :-) Thanks again, Rick From: I. Savant To: Kiel Gillard Cc: Jo Phils ; cocoa dev S

Re: Combing Bindings with Target-Action

2009-04-16 Thread Jeff Hutchison
Thanks for the responses. I had used KVO on the bound property on an earlier version and was encountering a small problem due to the nature of my application. There might be cleaner way so some more details might be helpful. I'm writing an application that connects to my home theater receiver on i

Re: nstoolbar in tiger

2009-04-16 Thread I. Savant
On Thu, Apr 16, 2009 at 9:21 AM, Kiel Gillard wrote: > You don't need to create a subclass of NSwindow, all you need is an object > to provide the NSWindow instance a NSToolbar. The difference that likely led Jo to this conclusion is that Interface Builder 3 (and the latest version of nibs/xib

Fwd: Setting up an auxiliary task for use with Distributed Objects

2009-04-16 Thread Jeremy W. Sherman
Apologies for the multiple-send. Keep forgetting to reply to all. Looking to see if I can set that as default or just have to start slapping myself for negative reinforcement instead. -- Forwarded message -- From: Jeremy W. Sherman Date: Thu, Apr 16, 2009 at 9:26 AM Subject: Re: S

Re: Setting up an auxiliary task for use with Distributed Objects

2009-04-16 Thread Jeremy W. Sherman
On Thu, Apr 16, 2009 at 5:01 AM, Oleg Krupnov wrote: > I'm looking for the right way of setting up the auxiliary NSTask from > within the main task. The aux task vends some Distributed Objects, and > the main task uses them. > > The auxiliary task does this: > > NSAutoreleasePool* pool = [[NSAutor

Re: nstoolbar in tiger

2009-04-16 Thread Kiel Gillard
Hi Rick/Jo/whoever, You don't need to create a subclass of NSwindow, all you need is an object to provide the NSWindow instance a NSToolbar. Running "NSToolbar" through Google would give you this result on the first page: Hope this helps,

nstoolbar in tiger

2009-04-16 Thread Jo Phils
Hello, I think I know the answer already but to be sure I'm not missing something if I want the equivalent of NSToolbar in Tiger I must create a custom window is that correct? Unless there's a trick I don't know about I can't use NSToolbar in Tiger right? Thanks for your input, Rick

Re: filteredArrayUsingPredicate and points

2009-04-16 Thread Graham Cox
On 16/04/2009, at 8:24 PM, Alexey Baev wrote: I thought about this way but I don't know how I can create my predicate. I guess it has to be like this: NSPredicate* pr = [NSPredicate predicateWithFormat: @"containsPointString ??? what to write here ??? == YES"]; but I don't know exactly.

Re: filteredArrayUsingPredicate and points

2009-04-16 Thread Kirk Kerekes
Something like: [NSPredicate predicateWithFormat: @"containsPointString %@ == YES", NSStringFromPoint(point)]; On Apr 16, 2009, at 5:24 AM, Alexey Baev wrote: On Apr 15, 2009, at 19:59:39, Kirk Kerekes wrote: Untested suggestion: Try adding a method to MyDot that will accept the NSStri

Re: sending emails using URLRequest and php

2009-04-16 Thread I. Savant
On Apr 16, 2009, at 6:52 AM, I. Savant wrote: This is a discussion for another list, but have you thought of the security implications of hosting such a script on a public-facing server? This is the kind of wide-open thing spammers love to find ... Sorry for the noise, I hit send too ear

Re: sending emails using URLRequest and php

2009-04-16 Thread Reza Farhad
This was just a simple example of making this work, obviously it needs to be improved upon for implementation. Reza On 16 Apr 2009, at 11:52, I. Savant wrote: On Apr 16, 2009, at 5:26 AM, Reza Farhad wrote: The script sendInfo.php: This is a discussion for another list, but have you th

Re: sending emails using URLRequest and php

2009-04-16 Thread I. Savant
On Apr 16, 2009, at 5:26 AM, Reza Farhad wrote: The script sendInfo.php: This is a discussion for another list, but have you thought of the security implications of hosting such a script on a public-facing server? This is the kind of wide-open thing spammers love to find ... -- I.S.

Re: filteredArrayUsingPredicate and points

2009-04-16 Thread Alexey Baev
On Apr 15, 2009, at 19:59:39, Kirk Kerekes wrote: Untested suggestion: Try adding a method to MyDot that will accept the NSStringFromPoint representation, and then reference that method in your predicate, supplying a NSStringFromPoint as the object to be searched for. - (BOOL)containsPoi

Re: Best way to get a non-repeating random number?

2009-04-16 Thread Peter Castine
On 15-Apr-2009, at 18:46, Michael Ash wrote, quoting Eric E. Dolecki: int result = (arc4random()%9) + 1; if (result >= activeTarget) ++result; activeTarget = result; No it won't. Sorry, you're right; I was wrong. I wrote after a too brief analysis of the code. It's actually a rather algori

sending emails using URLRequest and php

2009-04-16 Thread Reza Farhad
dear all The issue has now been solved so here is the solution for all those that are interested: You need to make your URL request pointing to your php script: and through my frustration I had forgotten to add the call to get URL request sent out with URLConnection so here it is in full

Setting up an auxiliary task for use with Distributed Objects

2009-04-16 Thread Oleg Krupnov
I'm looking for the right way of setting up the auxiliary NSTask from within the main task. The aux task vends some Distributed Objects, and the main task uses them. The auxiliary task does this: NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; MyVendedObject* vendedObj = [[[MyVendedO

Re: Best way to pass large objects between tasks?

2009-04-16 Thread Jean-Daniel Dupas
I don't know about other OS X technologies, but IIRC CFMessagePort is optimized to exchange large amount of data between processes. http://developer.apple.com/documentation/CoreFoundation/Reference/CFMessagePortRef/Reference/reference.html Le 16 avr. 09 à 10:44, Oleg Krupnov a écrit : Thank

Re: Best way to pass large objects between tasks?

2009-04-16 Thread Oleg Krupnov
Thanks, Marcel and Graham. It answers my question. I will now look for ways to optimize data transmission between processes, and I think I have already found one. On Thu, Apr 16, 2009 at 3:10 AM, Marcel Weiher wrote: > > On Apr 12, 2009, at 23:26 , Oleg Krupnov wrote: > >> I haven't tried either

Re: Table with all Key-Value Pairs

2009-04-16 Thread Gerriet M. Denkmann
On 15 Apr 2009, at 19:44, Volker in Lists wrote: You may want to download an example from Apple ;-) : http://developer.apple.com/samplecode/DictionaryController/index.html Thanks for this link. It did help me a lot. One problem though: If I bind the content of my dictionary controller to

Re: Combing Bindings with Target-Action

2009-04-16 Thread Quincey Morris
On Apr 15, 2009, at 12:04, Jeff Hutchison wrote: I am relying on the binding messages to complete before the target-action message - is this an OK idea? If you look at the diagram in: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/MessageFlow.html#/ /apple_