Documents, Archived Objects, and Bindings

2008-04-15 Thread Seth Willits
Aloha, I have a document which contains a model object created in the document's -init method, and I have a ton of bindings hooked up to this model by binding to the document nib's File's Owner and then using the key path "myModel.whateverProperty". This works spectacularly. To save the

Re: Documents, Archived Objects, and Bindings

2008-04-15 Thread mmalc crawford
On Apr 15, 2008, at 12:27 AM, Seth Willits wrote: So what should I do? Add an object controller (NSObjectController) to which everything else is bound. Then just set the content of the object controller to the unarchived model object. mmalc ___

Re: Documents, Archived Objects, and Bindings [Nevermind...]

2008-04-15 Thread Seth Willits
On Apr 15, 2008, at 12:27 AM, Seth Willits wrote: Aloha, I'm sorry if you read any further than this line! :) It was giving me an error because I didn't retain the newly created instance, not because I released the old instance. I *knew* it should have worked this way. :) -- Seth Willi

Re: Documents, Archived Objects, and Bindings

2008-04-15 Thread mmalc crawford
On Apr 15, 2008, at 12:45 AM, mmalc crawford wrote: Add an object controller (NSObjectController) to which everything else is bound. Then just set the content of the object controller to the unarchived model object. Rather better... you should bind the object controller's content to [File

Image view binding doesn't update on nil values

2008-04-15 Thread Ben Lachman
I have an image view and its value binding is bound to a transient property of a CD object (a cached thumbnail). However when a user removes an image from the image view I am sending the image view [imageView setImage:nil] (or any similar variant). When I do this the CD object never gets

Getting feedback from application

2008-04-15 Thread parag vibhute
Hi guys, I have created a cocoa application. Now I would like to have functionality such that there will be a button, on clicking that application will send feedback to me. Is there any class or any documentation available for this? Please give your feedback/comments. Thank, Parag -- There ar

Re: How to fetch remote file?

2008-04-15 Thread Chris Suter
On 15/04/2008, at 8:12 PM, Mike Abdullah wrote: NSURLDownload would be the one. Or you can just use +[NSData dataWithContentsOfURL:]. - Chris smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: How to fetch remote file?

2008-04-15 Thread I. Savant
NSURLDownload would be the one. Or you can just use +[NSData dataWithContentsOfURL:]. I'd recommend the previous suggestions. NSURLDownload is non- blocking and uses callbacks to notify you when the download is complete (not to mention specific errors and progress). It also downloads t

Re: How to fetch remote file?

2008-04-15 Thread Mike Abdullah
NSURLDownload would be the one. Mike. On 15 Apr 2008, at 11:08, parag vibhute wrote: Hi, I have implemented cocoa application in which I want to fetch a file which is kept on remote machine. I know url of that file. But don't know how to download that file. Can anybody please guide me ho

How to fetch remote file?

2008-04-15 Thread parag vibhute
Hi, I have implemented cocoa application in which I want to fetch a file which is kept on remote machine. I know url of that file. But don't know how to download that file. Can anybody please guide me how to do this? Thanks, Palav -- There are many things in your life that will catch your eye

Re: How to fetch remote file?

2008-04-15 Thread Michael Vannorsdel
Check out NSURLDownload or NSURLConnection. On Apr 15, 2008, at 4:08 AM, parag vibhute wrote: I have implemented cocoa application in which I want to fetch a file which is kept on remote machine. I know url of that file. But don't know how to download that file. Can anybody please guide me

App fails to kill NSTask processes

2008-04-15 Thread Alexander Reichstadt
Hi, my app makes heavy use of NSTask. The tool it nstasks oftentimes falls asleep and doesn't return, I can't fix it cause I don't have the source code. Til Tiger I worked around this behavior by making a custom class that contains an NSTask and a thread, run the task, and let the thread

Re: How to fetch remote file?

2008-04-15 Thread parag vibhute
Thanks guys. I am going through the documentation of those classes & if have any query then will ask. Thanks again. Regards, Palav On Tue, Apr 15, 2008 at 3:50 PM, Chris Suter <[EMAIL PROTECTED]> wrote: > > On 15/04/2008, at 8:12 PM, Mike Abdullah wrote: > > NSURLDownload would be the one. > >

Re: "hooking" into another app

2008-04-15 Thread I. Savant
Though the link was funny, I'll ignore the flamebait and answer the technical aspect of this post: You yourself said that the OS is resistant against this sort of attack in the following quotes: Well, password fields are "special" and are 'resistant' to key logging, but you don't have

Re: App fails to kill NSTask processes

2008-04-15 Thread Ken Thomases
On Apr 15, 2008, at 5:55 AM, Alexander Reichstadt wrote: my app makes heavy use of NSTask. The tool it nstasks oftentimes falls asleep and doesn't return, I can't fix it cause I don't have the source code. Til Tiger I worked around this behavior by making a custom class that contains an NSTa

Capture mouse events globally

2008-04-15 Thread Apparao Mulpuri
Is three any way to capture mouse events globally from my background app. - Apparao ___ 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(a

Cannot get PDF document show up in PDFView

2008-04-15 Thread Rajeshwari Iyer
Hi, I am a beginner with cocoa and am making an application where i want to display a PDF file in my app. window. I have subclassed PDFView to myPDFView and have attached a PDF view from interface builder to my window. Now how do i associate the PDF document that i want to display wit

[ANN] Port mapping/forwarding framework (MIT license)

2008-04-15 Thread Dominik Wagner tcm
Hi. We here at TheCodingMonkeys like to announce that we published an open- source framework for port mapping today: TCMPortMapper. It's MIT licensed and supports NAT-PMP and UPNP capable routers. If you do peer-to-peer networking in your application or just would like to have your network

Re: App fails to kill NSTask processes

2008-04-15 Thread Alexander Reichstadt
Alexander Reichstadt [EMAIL PROTECTED] On 15.04.2008, at 13:29, Ken Thomases wrote: On Apr 15, 2008, at 5:55 AM, Alexander Reichstadt wrote: my app makes heavy use of NSTask. The tool it nstasks oftentimes falls asleep and doesn't return, I can't fix it cause I don't have the source code

Inline Help Text Approaches

2008-04-15 Thread Steven Huey
Hi, I want to add some "inline" help text to an app I'm working on, much like the text in the screenshot linked here from Apple Backup: http://stevenhuey.net/pics/Backup.png The text I'm describing is the gray text over the table views such as: "Add QuickPicks, files, and folders..." that

Updating IKImageBrowserView with Edited Image

2008-04-15 Thread Jamie Phelps
Hi, all. Does anyone know how I could go about updating the content of my IKImageBrowserView after editing an image in an IKImageView? So... 1) User has some images in an IKImageBrowserView. 2) User selects an image. 3) The selected image shows in an IKImageView 4) User edits the image (Adjust

Re: is this badly written code?

2008-04-15 Thread Jeff LaMarche
On Apr 14, 2008, at 10:53 PM, Adam Gerson wrote: In cocoa its very tempting to write a single line of code like: NSManagedObject *selectedTreeObject = [self delegate] mainWindowController] treeController] selectedObjects] objectAtIndex:0]; or to flush it out in to individual lines: NSWind

Re: NSAllocateCollectable() questions

2008-04-15 Thread Alastair Houghton
On 15 Apr 2008, at 06:42, Brendan Younger wrote: Hi all, This is a re-post since I didn't receive any response on Sunday. I've been writing a library that uses NSAllocateCollectable() quite a bit and I have a few questions about proper usage. The problem is that your questions are quite in

RE: is this badly written code?

2008-04-15 Thread john darnell
I am a long-time C/C++ programmer, with roots in XBase and Basic. Code style is a subject that often comes up with newbie programmers regardless of the language, and it deserves a thoughtful response. I agree wholeheartedly with Mr. Stiles; more than anything else, your style of coding *is* a mat

to write to file except NSData*

2008-04-15 Thread Nick Rogers
Hi, I am creating a file with: NSFileManager *fileManager = [NSFileManager defaultManager]; [fileManager createFileAtPath:path contents:nil attributes:nil]; === then I got a fileHandle as: NSFileHandle *fileHandle = [NSFileHandle fileHandleForWritingAtPath:path]; === NSFileHandl

Re: to write to file except NSData*

2008-04-15 Thread Thomas Backman
Sorry to duck your question, but are you sure you don't want NSKeyedArchiver and similar classes? /Thomas On Apr 15, 2008, at 4:38 PM, Nick Rogers wrote: Hi, I am creating a file with: NSFileManager *fileManager = [NSFileManager defaultManager]; [fileManager createFileAtPath:path contents:nil

Re: is this badly written code?

2008-04-15 Thread Jeff LaMarche
On Apr 15, 2008, at 10:25 AM, john darnell wrote: 4.) Comment verbosely and often. You may understand now what you are doing and why, but six months from now, you won't. Don't fool yourself by saying "I'll add comments later," because, trust me, later never comes. I'm not going to argue

Re: to write to file except NSData*

2008-04-15 Thread Nick Rogers
Hi, I will use NSKeyedArchiver to create a lot of NSData objects before writing to file. I can't write one whole NSData to file because i have to write in GBs and also have to show the progress bar. Thanks for the reply, Nick On 15-Apr-08, at 8:10 PM, Thomas Backman wrote: Sorry to duck yo

Re: Subclassing NSArrayController

2008-04-15 Thread Jeff LaMarche
On Apr 14, 2008, at 11:53 PM, antikraft clover wrote: If I am subclassing NSArrayController to provide and update an array of objects, which methods do I need to implement ? What are you trying to accomplish. The only time that I regularly subclass NSArrayController is to implement drag and

Re: to write to file except NSData*

2008-04-15 Thread Alastair Houghton
On 15 Apr 2008, at 15:49, Nick Rogers wrote: I will use NSKeyedArchiver to create a lot of NSData objects before writing to file. I can't write one whole NSData to file because i have to write in GBs and also have to show the progress bar. So just use NSKeyedArchiver to generate a header be

Re: is this badly written code?

2008-04-15 Thread I. Savant
> I'm not going to argue with you because I think you've given some pretty > good advice here. I'm a fan of white space in my code as well, and though > there are some stylistic differences between us, I concur with the basic > concepts you laid out. I just thought a caveat might be in order on #

Re: to write to file except NSData*

2008-04-15 Thread Navneet Kumar
ok, so if i generate a header NSData object and write that to file, and then then write the larger NSData object, how will i read one NSData after the another. How will i know what length should I read. excuse me if this sounds very newbie to you. Wishes, Nick On 15-Apr-08, at 8:30 PM, Alast

RE: is this badly written code?

2008-04-15 Thread john darnell
Mr. LaMarche: I agree wholeheartedly. Thanks for adding your very salient point. Mr. IS: My apologies. I have no desire to divert the list to some off-topic subject. R, John On Apr 15, 2008, at 10:25 AM, john darnell wrote: > 4.) Comment verbosely and often. You may understand now

Re: to write to file except NSData*

2008-04-15 Thread Jeff LaMarche
On Apr 15, 2008, at 10:38 AM, Nick Rogers wrote: Hi, I am creating a file with: NSFileManager *fileManager = [NSFileManager defaultManager]; [fileManager createFileAtPath:path contents:nil attributes:nil]; === then I got a fileHandle as: NSFileHandle *fileHandle = [NSFileHandle fileHan

Re: to write to file except NSData*

2008-04-15 Thread Alastair Houghton
On 15 Apr 2008, at 16:06, Navneet Kumar wrote: ok, so if i generate a header NSData object and write that to file, and then then write the larger NSData object, how will i read one NSData after the another. How will i know what length should I read. excuse me if this sounds very newbie to yo

Re: is this badly written code?

2008-04-15 Thread I. Savant
> Mr. IS: *Mister* Idiot Savant? I like that. ;-) >My apologies. I have no desire to divert the list to some off-topic > subject. I'm not a moderator. Scott (Anguish) may have a different opinion and his is what counts. It pains me, because I think it is a good debate but one that will

Re: Cannot get PDF document show up in PDFView

2008-04-15 Thread Mike R. Manzano
Look up -awakeFromNib. // Called when @implementation MyPDFView [...] // Called when this view is loaded from the nib - (void) awakeFromNib { myDoc = [[[PDFDocument alloc] initWithURL: [ NSURL fileURLWithPath:@"Users/raj/Desktop/ObjectiveC.pdf"]] autorelease]; [self setDocument: myDoc];} }

Re: App fails to kill NSTask processes

2008-04-15 Thread Scott Ribe
> Whether I waitUntilExit or not makes no > difference Try waitpid after killing the process. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Getting feedback from application

2008-04-15 Thread Mike R. Manzano
Please read one of the many fine tutorials on the subject, including this one: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/objctutorial.pdf Regards, Mike On Apr 15, 2008, at 1:31 AM, parag vibhute wrote: Hi guys, I have created a cocoa application. Now I would l

RE: is this badly written code?

2008-04-15 Thread john darnell
Okay, this is now definitely veering off topic. Fearing an electronic punch in the nose, I did not want to call you Mister Idiot, and I thought Mister Savant might be just a bit too lofty so I compromised on Mister IS. I hope that minor, gentle banter of this sort is never considered off-topic.

Re: is this badly written code?

2008-04-15 Thread glenn andreas
On Apr 15, 2008, at 9:25 AM, john darnell wrote: 2.) Symmetry can add elegance to the visual aspect of your code, and thus make it more pleasing to the eye, and easier to decipher. For example, when I have a long list of includes, I often do this to them: #include #include #include

Re: Memory leak when re-alloc Methods

2008-04-15 Thread Mike R. Manzano
Are you calling release on everything you've alloc'd and retain'd? Mike On Apr 14, 2008, at 4:05 PM, [EMAIL PROTECTED] wrote: Hi and sorry for my bad english. I have a nasty leak problem when i realloc several methods of the main class of my app. I have a button that initiate a series of

Re: Getting feedback from application

2008-04-15 Thread I. Savant
On Tue, Apr 15, 2008 at 11:25 AM, Mike R. Manzano <[EMAIL PROTECTED]> wrote: > Please read one of the many fine tutorials on the subject, including this > one: > http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/objctutorial.pdf In addition, there is: http://www.cocoadevcen

Re: is this badly written code?

2008-04-15 Thread Michael Ash
On Tue, Apr 15, 2008 at 2:09 AM, Adam Leonard <[EMAIL PROTECTED]> wrote: > Paraphrasing Wil Shipley (I believe), variables are variable. They are > supposed to change. If you are just creating a temporary variable to use > only in the next step, it seems unnecessarily wasteful. Your variable names

Re: is this badly written code?

2008-04-15 Thread I. Savant
"Idiot" is fine. ;-) > I hope that minor, gentle banter of this sort is never considered > off-topic. It's what glues a community together... For the record, I think banter is safe, so long as it's accompanied by relevance. Agreed 100% on the 'community glue' sentiment. Most of us really *

Re: is this badly written code?

2008-04-15 Thread Jean-Daniel Dupas
Note that not everybody uses monospaced fonts everywhere - this is, after all, the 21st century. Especially considering that Xcode allows you to specify that different elements can be different fonts, styles, etc... For example, I've got my comments to be in a more readable non-monospac

Re: Memory leak when re-alloc Methods

2008-04-15 Thread I. Savant
> I have a nasty leak problem when i realloc several methods of the main class > of my app. Without seeing your code, all I can suggest is making sure you've followed these rules: http://devworld.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html# -- I.S. __

Re: is this badly written code?

2008-04-15 Thread Johnny Lundy
My Cocoa coding is for hobby only, and only for about 4 years, so I do not have experience with working in teams or on multi-developer projects. But I see this issue in other development environments of recent issue as well. Apple has provided a rich set of finely-granulated APIs, which a

RE: is this badly written code?

2008-04-15 Thread john darnell
-Original Message- >> 2.) Symmetry can add elegance to the visual aspect of your code, and >> thus make it more pleasing to the eye, and easier to decipher. For >> example, when I have a long list of includes, I often do this to >> them: >> >> #include >> #include >> #inclu

Re: is this badly written code?

2008-04-15 Thread Jean-Daniel Dupas
Le 15 avr. 08 à 17:44, Johnny Lundy a écrit : My Cocoa coding is for hobby only, and only for about 4 years, so I do not have experience with working in teams or on multi-developer projects. But I see this issue in other development environments of recent issue as well. Apple has provided

Re: Getting feedback from application

2008-04-15 Thread Matt Long
This might help you: http://www.matthew-long.com/2007/11/09/xcode-30-tutorial/ It's a bit shorter tutorial than the Apple one. -Matt On Apr 15, 2008, at 9:25 AM, Mike R. Manzano wrote: Please read one of the many fine tutorials on the subject, including this one: http://developer.apple.com

Re: is this badly written code?

2008-04-15 Thread Michael Ash
On Tue, Apr 15, 2008 at 11:44 AM, Johnny Lundy <[EMAIL PROTECTED]> wrote: > What would be great is if Apple would give us many more convenience methods > that pared it down to the most common things - like a "- (NSStriing *) > NSSynchronousURLFetch:(NSString *)theURL" method that just takes a stri

Re: Getting feedback from application

2008-04-15 Thread Quincey Morris
I suspect the OP was asking about adding a button to an application that, when clicked by a user, would send feedback ("Your software sucks!") to the developer. -- On Apr 15, 2008, at 09:01, Matt Long wrote: This might help you: http://www.matthew-long.com/2007/11/09/xcode-30-tutorial/ It

Re: Capture mouse events globally

2008-04-15 Thread Kyle Sluder
On Tue, Apr 15, 2008 at 7:41 AM, Apparao Mulpuri <[EMAIL PROTECTED]> wrote: > Is three any way to capture mouse events globally from my background app. 1) Why are you doing this? I'm curious. 2) See Quartz Event Taps: http://developer.apple.com/documentation/Carbon/Reference/QuartzEventServicesRe

Using the debugger with local variables was Re: is this badly written code?

2008-04-15 Thread Erik Buck
>1) Write each portion of the code by assigning to intermediate ivars. >This of course is easiest if you just type them in-line as you write >them, but then of course they will not show up in the debugger so it > is better to go ahead and type them in the @interface section. Say what ? Loca

Re: App fails to kill NSTask processes

2008-04-15 Thread Alexander Reichstadt
Thanks, had found wait(0) to work along with changing from thread to timer in some cases. The zombies are gone now. On Apr 15, 2008, at 5:23 PM, Scott Ribe wrote: Whether I waitUntilExit or not makes no difference Try waitpid after killing the process. -- Scott Ribe [EMAIL PROTECTED] http:/

Re: [ANN] Port mapping/forwarding framework (MIT license)

2008-04-15 Thread Jens Alfke
On 15 Apr '08, at 5:40 AM, Dominik Wagner tcm wrote: We here at TheCodingMonkeys like to announce that we published an open-source framework for port mapping today: TCMPortMapper. It's MIT licensed and supports NAT-PMP and UPNP capable routers. FYI, there's already some support for this bu

Re: Using the debugger with local variables was Re: is this badly written code?

2008-04-15 Thread I. Savant
> Say what ? Local variables show up perfectly fine in the debugger. Creating an instance variable just to store intermediate results is of dubious value. > > Even with nested messages, no special magic is needed. To see intermediate > values, just use the po command. > > > po [NSURL URLWi

Re: Using the debugger with local variables was Re: is this badly written code?

2008-04-15 Thread John Stiles
IS makes a good point. Moreover, if you have some method which has a side effect or which might not return the same result every time, "po" is no good for debugging it. These simplistic examples (creating a URL from a string) will work the same no matter how many times you execute them, but a l

Re: Cannot Remove Observer Error

2008-04-15 Thread Mark Piccirelli
How are KVO notifications for the Wine class' wineType property being done? KVO is complaining that not enough of them are being sent out. The rule for KVO-compliance in this case is that something must do [wine willChangeValueForKey:@"wineType"] before the value returned by [wine valueForK

Re: Using the debugger with local variables was Re: is this badly written code?

2008-04-15 Thread I. Savant
> These simplistic examples (creating a URL from a string) > will work the same no matter how many times you execute them, but a lot of > real code isn't that simple. Well *THANK* you, John! ;-) Indeed as I was finishing up that sermon and packing up my soapbox, I thought of the many shortcomin

binary search trees & binning

2008-04-15 Thread Boyd Collier
Hello all, I need to place many thousands of doubles into size-class groups whose boundaries can be explicitly specified (much like one would do in constructing a histogram, though that's not what I'm doing). The number of size-classes won't be great, usually fewer than 100, say. It occ

[OT: security] smbclient

2008-04-15 Thread Stuart Malin
[sorry to post here, but I don't know what other list might be better/ more appropriate] I run Little Snitch and it has popped up that smbclient wants to connect to some server (169.254.44.184) on port 139 (netbios-ssn). That IP doesn't resolve when I try to reverse lookup. I'm concerned a

Re: [OT: security] smbclient

2008-04-15 Thread I. Savant
Stuart: > [sorry to post here, but I don't know what other list might be better/more > appropriate] This list is for Cocoa developers to talk about software development. Not only do we know nothing about your computer's configuration or your network environment, but it has positively nothing to

Re: [OT: security] smbclient

2008-04-15 Thread Dave Camp
On Apr 15, 2008, at 12:52 PM, Stuart Malin wrote: [sorry to post here, but I don't know what other list might be better/more appropriate] I'd suggest the network list, since it's a network question... Dave ___ Cocoa-dev mailing list (Cocoa-dev@list

[ANN] JSKit - JavaScript Embedding Framework

2008-04-15 Thread glenn andreas
The first beta version of JSKit, an open sourced (MIT license) framework for embedding JavaScript inside Cocoa applications is now available at . JSKit provides Objective-C wrappers around the lower level JavaScriptCore (available on 10.5 and 1

Re: NSAllocateCollectable() questions

2008-04-15 Thread Greg Parker
Brendan Younger wrote: I've been writing a library that uses NSAllocateCollectable() quite a bit and I have a few questions about proper usage. For those of you playing along at home, let me summarize the reasons for the garbage collector's special functions. Some heap blocks are "GC-mana

Re: Core Data for managing subtree?

2008-04-15 Thread Hamish Allan
Ben, Thanks for your reply. On Sun, Apr 13, 2008 at 11:54 PM, Ben Trumbull <[EMAIL PROTECTED]> wrote: > If you only want only some of the tree using Core Data objects, you could > try having an array controller manage the extra entity, and wire its content > into your tree controller. Could yo

Re: [OT: security] smbclient

2008-04-15 Thread Jens Alfke
On 15 Apr '08, at 12:52 PM, Stuart Malin wrote: I run Little Snitch and it has popped up that smbclient wants to connect to some server (169.254.44.184) 169.254.*.* is the self-assigned address range. If a computer connects to a LAN but finds no router or DHCP server on it (and it doesn't

Re: [ANN] JSKit - JavaScript Embedding Framework

2008-04-15 Thread Jens Alfke
On 15 Apr '08, at 1:07 PM, glenn andreas wrote: JSKit provides Objective-C wrappers around the lower level JavaScriptCore (available on 10.5 and 10.4 with Safari 3.0) and provides transparent two way bridging technologies, allowing you to call JavaScript objects from Objective-C and to wri

Frameworks in bundles?

2008-04-15 Thread Thomas Backman
Hi everybody. I'm writing a plugin architecture for my app. I just moved a class from the main project to a new Bundle project, and got 18 errors because of a few missing frameworks. I'm using two frameworks that I ship with the app, since they're not included in OS X. To start with, I'll ha

Re: "hooking" into another app

2008-04-15 Thread Jens Alfke
On 14 Apr '08, at 2:39 PM, Bill Cheeseman wrote: However, the Accessibility API is also wonderfully useful for doing lots of other things, such as hooking into a text chat window so that you can log the incoming messages. I'm not so enthusiastic about it … it's basically the GUI equivale

Re: Inline Help Text Approaches

2008-04-15 Thread Jens Alfke
On 15 Apr '08, at 6:54 AM, Steven Huey wrote: http://stevenhuey.net/pics/Backup.png The text I'm describing is the gray text over the table views such as: "Add QuickPicks, files, and folders..." that appears over the table, but once you add something is hidden. I would do this by subclas

Re: binary search trees & binning

2008-04-15 Thread Jean-Daniel Dupas
Le 15 avr. 08 à 21:02, Boyd Collier a écrit : Hello all, I need to place many thousands of doubles into size-class groups whose boundaries can be explicitly specified (much like one would do in constructing a histogram, though that's not what I'm doing). The number of size-classes won't

Re: to write to file except NSData*

2008-04-15 Thread Jens Alfke
On Apr 15, 2008, at 10:38 AM, Nick Rogers wrote: but i want to write the length of (NSData *)data, before I write it to file because I will be writing a lot of NSData to the file, so that I will be able to read the length first and then read the following NSData. SO how can I write the lengt

Re: [OT: security] smbclient

2008-04-15 Thread Stuart Malin
My apologies for bothering the list. I didn't mean to raise a virus scare (and hope I haven't). I.S. -- not quite a "random building" that I've posted to -- lots of very smart people here -- and was hoping by my post here to be led to a _quality_ security related Mac mailing list or forum;

Re: [ANN] JSKit - JavaScript Embedding Framework

2008-04-15 Thread glenn andreas
On Apr 15, 2008, at 4:13 PM, Jens Alfke wrote: On 15 Apr '08, at 1:07 PM, glenn andreas wrote: JSKit provides Objective-C wrappers around the lower level JavaScriptCore (available on 10.5 and 10.4 with Safari 3.0) and provides transparent two way bridging technologies, allowing you to c

Re: binary search trees & binning

2008-04-15 Thread Jens Alfke
I need to place many thousands of doubles into size-class groups whose boundaries can be explicitly specified (much like one would do in constructing a histogram, though that's not what I'm doing). The number of size-classes won't be great, usually fewer than 100, say. It occurred to me

Re: Frameworks in bundles?

2008-04-15 Thread Kyle Sluder
On Tue, Apr 15, 2008 at 5:15 PM, Thomas Backman <[EMAIL PROTECTED]> wrote: > Now, that means that the three plugins, each with only 100-150 lines of > code, need 4MB worth of frameworks... Is there a way to get around this > without making it ugly, to include the frameworks *once*? Build your fra

Re: "hooking" into another app

2008-04-15 Thread Don Arnel
Actually, after playing around with the Accessibility API I've found that changing the layout of UI elements won't adversely affect the external app's code at all. On Apr 15, 2008, at 5:37 PM, Jens Alfke wrote: I'm not so enthusiastic about it … it's basically the GUI equivalent of Applica

Re: binary search trees & binning

2008-04-15 Thread John Stiles
Hmm, set sounds a lot easier than this to me. Just use insert to put all the doubles into the set (one line), then use lower_bound to find the delineations between each group (another one-liner, though of course you'll need to loop over the number of groups you want). Then the distance between

Re: "hooking" into another app

2008-04-15 Thread Ricky Sharp
On Apr 15, 2008, at 4:37 PM, Jens Alfke wrote: On 14 Apr '08, at 2:39 PM, Bill Cheeseman wrote: However, the Accessibility API is also wonderfully useful for doing lots of other things, such as hooking into a text chat window so that you can log the incoming messages. I'm not so enthu

Re: "hooking" into another app

2008-04-15 Thread Jens Alfke
On 15 Apr '08, at 3:07 PM, Don Arnel wrote: Actually, after playing around with the Accessibility API I've found that changing the layout of UI elements won't adversely affect the external app's code at all. Changing the x/y coords of views in the nib won't, but other types of changes mi

Getting selection of IKImageView?

2008-04-15 Thread Colin Cornaby
I have an IKImageView that I am using as a preview view for working with a flatbed scanner. I'd like the user to be able to select the area they want to scan with the selection tool, and then hit a scan button to do a high quality scan. The issue I am having is that I can't seem to find a w

Re: "hooking" into another app

2008-04-15 Thread Ricky Sharp
On Apr 15, 2008, at 5:13 PM, Jens Alfke wrote: On 15 Apr '08, at 3:07 PM, Don Arnel wrote: Actually, after playing around with the Accessibility API I've found that changing the layout of UI elements won't adversely affect the external app's code at all. Changing the x/y coords of views

Re: Basic Core Animation question

2008-04-15 Thread Greg Sabo
I retained the layer object, and now the program no longer crashes! I'll be sure to read up more on retaining objects, as that is clearly an important concept. Now just to get the circle to display. I'm not quite sure what you mean by "set the layer to a view to be displayed," which means that I'm

Re: Basic Core Animation question

2008-04-15 Thread Michael Vannorsdel
[myView setLayer:theLayer]; [myView setWantsLayer:YES]; You might want to read the Core Animation Programming Guide. You can find a link to it at the top if the CALayer class docs. It will explain a lot about how to use CALayers. On Apr 15, 2008, at 4:49 PM, Greg Sabo wrote: I retained

Re: "hooking" into another app

2008-04-15 Thread Bill Cheeseman
on 2008-04-15 5:37 PM, Jens Alfke at [EMAIL PROTECTED] wrote: > I'm not so enthusiastic about it Š it's basically the GUI equivalent > of Application Enhancer, or of HTML screen-scraping. That really isn't fair. I avoid Application Enhancer like the plague. In fact, I had to work with Unsanity so

Re: "hooking" into another app

2008-04-15 Thread Christopher Nebel
On Apr 15, 2008, at 3:20 PM, Ricky Sharp wrote: On Apr 15, 2008, at 5:13 PM, Jens Alfke wrote: On 15 Apr '08, at 3:07 PM, Don Arnel wrote: Actually, after playing around with the Accessibility API I've found that changing the layout of UI elements won't adversely affect the external app's

Re: Memory leak when re-alloc Methods

2008-04-15 Thread Mario Gajardo Tassara
El 15-04-2008, a las 14:21, [EMAIL PROTECTED] escribió: I have a nasty leak problem when i realloc several methods of the main class of my app. Without seeing your code, all I can suggest is making sure you've followed these rules: http://devworld.apple.com/documentation/Cocoa/Conceptual/Me

Re: Core Data for managing subtree?

2008-04-15 Thread Hamish Allan
Further info (sorry for the reply to myself): Having taken approach (2), if I dump [myTreeController contents], they are ostensibly correct (e.g. having added a couple of items): 2008-04-16 01:56:55.558 Test[4187:10b] content ( { children = ( (entity: Item; id

Resizing NSView with CABasicAnimation

2008-04-15 Thread Michael Fey
Folks, I'm trying to perform a basic resize on an NSView subclass using an explicit animation. The code compiles and runs without crashing, but also without performing the resize. I'm obviously missing something very basic, but I haven't been able to find the answer elsewhere. Here's m

NSURL and certificates

2008-04-15 Thread Stephane Huaulme
when I try to fetch a web page on an internal server using: [NSString stringWithContentsOfURL:[NSURL URLWithString: theURLString] encoding:NSASCIIStringEncoding error:&theError]; I get the following error: {contents = "NSUnderlyingError"} = Error Domain=NSURLErrorDomain Code=-1203 UserInfo

Re: NSURL and certificates

2008-04-15 Thread John Stiles
AFAIK, you'd need to use the lower-level NSURL* APIs (e.g. NSURLConnection) instead of stringWithContentsOfURL, which is going to be a little more work. Unless there is some trick I don't know about... Also, you don't really want ASCII encoding—probably UTF8 is more what you had in mind. ASCII

Re: Getting selection of IKImageView?

2008-04-15 Thread Jamie Phelps
See last paragraph here: http://devworld.apple.com/documentation/GraphicsImaging/Conceptual/ImageKitProgrammingGuide/ImageViews/chapter_3_section_6.html HTH JP On Apr 15, 2008, at 5:16 PM, Colin Cornaby wrote: I have an IKImageView that I am using as a preview view for working with a flatbe

Re: Memory leak when re-alloc Methods

2008-04-15 Thread Mike Manzano
Unless you perform [blisterModelClass release] in your NSView's - dealloc, you are still potentially leaking. Mike On Apr 15, 2008, at 5:17 PM, Mario Gajardo Tassara wrote: El 15-04-2008, a las 14:21, [EMAIL PROTECTED] escribió: I have a nasty leak problem when i realloc several methods of

Re: binary search trees & binning

2008-04-15 Thread Michael Ash
On Tue, Apr 15, 2008 at 5:38 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > If you need a storage that provide binary search, you can probably use a > CFBinaryHeap. > > "CFBinaryHeap implements a container that stores values sorted using a > binary search algorithm. All binary heaps are muta

Re: NSAllocateCollectable() questions

2008-04-15 Thread Michael Ash
On Tue, Apr 15, 2008 at 4:53 PM, Greg Parker <[EMAIL PROTECTED]> wrote: > You don't need a write barrier when erasing GC-scanned memory. The write > barrier helps the collector see pointers that it might otherwise miss > because it's cheating. It does not help the collector "forget" a value that >

NSTreeController and NSOutlineView: How do I get to the outline view's item

2008-04-15 Thread Markus Spoettl
Hi, this probably sounds terribly stupid but apparently I can't find this out on my own so here I am asking for help again: I have a NSDocument subclass with a simple tree structure attached to an NSOutlineView via NSTreeController and bindings. I learned - through this list - to add it

CGBitmapRef and User Space Coordinates

2008-04-15 Thread Carter R. Harrison
Hi All, I have a CGBitmapRef that I am using as a backing store for my NSView subclass. The CGBitmapRef has the same dimensions as my NSView. Each time I draw to the backing store, I call my view's setNeedsDisplayInRect: method to invalidate the area in which I have drawn. Is it necess

  1   2   >