Re: How to make whole view be drop target for small subview

2008-03-22 Thread Ben Lachman
Well, to answer my own question... Seemingly you just have to call all the appropriate drag... methods on the image view, performDragOperation won't work on its own. ->Ben -- Ben Lachman Acacia Tree Software http://acaciatreesoftware.com [EMAIL PROTECTED] 740.590.0009 On Mar 23, 2008, at

How to make whole view be drop target for small subview

2008-03-22 Thread Ben Lachman
I have a large NSTextView that shows my current record. One of the record's attributes is an image which is displayed in a small NSImageView subview of the textview. I'd like to allow images dropped anywhere on the textview be routed into the imageview. My first thought was to override N

Re: Adding commandline batch mode to Cocoa app

2008-03-22 Thread Marcus
23 mar 2008 kl. 00.01 skrev Carsten: The script installation in a more central place is an interesting thought. Is /usr/local/bin the Apple-sanctioned place for user-installed commandline utilities, rather than something like (the non-existent) /Users//bin? I could also install such a script al

Re: Help with this code

2008-03-22 Thread Jens Alfke
On 22 Mar '08, at 3:23 PM, Guillem Palou wrote: The debugger crashes in a MoviesTask call. The movie is loaded long before the call, but the QTMovie object is created only a few instants before. All the other objects look valid. Maybe a Movie, or other important object, got deallocated. Tr

Re: CoreAnimation Memory Use/Eating Memory

2008-03-22 Thread Jens Alfke
On 22 Mar '08, at 6:02 PM, Colin Cornaby wrote: When I load the 5000x5000 image into my CALayer's contents, Instruments does not see any change in my memory usage, while Activity Monitor sees the 200 MB extra being allocated. Instruments also does not find any leaks in my program. "Memor

Re: Help with this code

2008-03-22 Thread Bill Monk
There's not enough context to tell what's really going on. )Also, quicktime-dev may be a more useful list.) But a few things stick out. As written, the if-test is meaningless because no NSError is passed to the QTMethod. movieWithQuickTimeMovie: may be failing, so you may be passing garba

Re: Changing properties inside a relationship entity

2008-03-22 Thread Andrew Merenbach
Hi, Malcom, Note that in such cases, it is often easier to write: NSString *tmp = [[[view textStorage] string] copy]; or, if your new string should be mutable: NSMutableString *tmp = [[[view textStorage] string] mutableCopy]; Cheers, Andrew On Mar 22, 2008, at 11:45

CoreAnimation Memory Use/Eating Memory

2008-03-22 Thread Colin Cornaby
I have a document based app that loads layers of certain sizes in a document based on user input. As I've been optimizing my app, I noticed that loading a 5000x5000 image into a layer causes my application to consume 200 more MB of memory. Seems a little high, but fair enough. But more inte

Re: Adding commandline batch mode to Cocoa app

2008-03-22 Thread Carsten
The script installation in a more central place is an interesting thought. Is /usr/local/bin the Apple-sanctioned place for user-installed commandline utilities, rather than something like (the non-existent) /Users//bin? I could also install such a script alongside the .app bundle, which is a thoug

Re: Adding commandline batch mode to Cocoa app

2008-03-22 Thread Tom Harrington
On Sat, Mar 22, 2008 at 4:26 PM, Carsten <[EMAIL PROTECTED]> wrote: > However, image processing apps can benefit from batch modes, and > although some things can be nicely handled by an in-app batch manager, > the ideal would be to also allow the application to be run from the > commandline, as

Adding commandline batch mode to Cocoa app

2008-03-22 Thread Carsten
I am new to Cocoa and Mac development, but not to development, being a C/C++ graphics programmer by trade. I am working my way through Hillegass' book, and although I am forgetting the details as fast as I am reading them, it all makes sense, and I suppose it will come together and stick in my head

Re: Help with this code

2008-03-22 Thread Guillem Palou
The debugger crashes in a MoviesTask call. The movie is loaded long before the call, but the QTMovie object is created only a few instants before. All the other objects look valid. The only thing is that when setting the movie object, I'm trying to set an invalid QTMovie object but I don't see the

Re: base64 NSData to NSString

2008-03-22 Thread Marco Cassinerio
On Mar 22, 2008, at 9:24 PM, Jens Alfke wrote: On 22 Mar '08, at 1:19 PM, Marco Cassinerio wrote: I've done what you said, but nothing changed. I get the same data content, like this: ImgR\362FBIL\346\326\303\331\376\247H+\222!\222C\303\351-+ \377\376\377\377\377\377\222!\221\302\221\30

Re: Help with this code

2008-03-22 Thread Jens Alfke
On 22 Mar '08, at 12:19 PM, Guillem Palou wrote: It crashes when I call the setMovie method of the QTMovieView Object. The code seems to work with movieWithFile instead of movieWithQuicktimeMovie. Use the debugger, then. How does it crash? In the debugger, what's the backtrace? What's th

Re: base64 NSData to NSString

2008-03-22 Thread Jens Alfke
On 22 Mar '08, at 1:19 PM, Marco Cassinerio wrote: I've done what you said, but nothing changed. I get the same data content, like this: ImgR\362FBIL\346\326\303\331\376\247H+\222!\222C\303\351-+ \377\376\377\377\377\377\222!\221\302\221\301 \2161\216a mfile.icnsMacintosh HD>Devel

Re: base64 NSData to NSString

2008-03-22 Thread Marco Cassinerio
On Mar 22, 2008, at 8:46 PM, Jens Alfke wrote: On 22 Mar '08, at 12:40 PM, Marco Cassinerio wrote: Using NSPropertyListSerialization means that the .plist file is a binary representation and not an XML representation, is it true? No. You can choose either format when writing a plist, and

Re: base64 NSData to NSString

2008-03-22 Thread Jens Alfke
On 22 Mar '08, at 12:40 PM, Marco Cassinerio wrote: Using NSPropertyListSerialization means that the .plist file is a binary representation and not an XML representation, is it true? No. You can choose either format when writing a plist, and when reading a plist it automatically detects th

Re: base64 NSData to NSString

2008-03-22 Thread Marco Cassinerio
>They aren't "base64 NSData objects", they are NSData objects which >happen to be stored using base64. This is an implementation detail and >you shouldn't need to care about it. >The .plist extension implies that these are property lists. You can >read them with NSPropertyListSerialization. This

Help with this code

2008-03-22 Thread Guillem Palou
Hi all, anyone knows what's wrong with this code? -(void)loadStateChanged:(NSNotification *) notification { QTMovie *movie = [notification object]; long loadState = [[movie attributeForKey:QTMovieLoadStateAttribute] longValue]; if (loadState >= 2) [clipMovieView setMovi

Re: base64 NSData to NSString

2008-03-22 Thread Michael Ash
On Sat, Mar 22, 2008 at 1:22 PM, Marco Cassinerio <[EMAIL PROTECTED]> wrote: > Hi, > > i'm trying to read the com.apple.recentitems.plist file and i found > that "Alias" and "Icon" key are base64 NSData object. > NSData and NSString don't provide methods to manage base64 data. They aren't "base

Re: Best Way To Lookup From a Huge Table

2008-03-22 Thread Thomas Engelmeier
On 21.03.2008, at 21:51, John Stiles wrote: std::map actually does more than NSDictionary—it sorts its entries instead of keeping them in random order. Also, it copies its keys instead of just keeping a reference to them, which is also more work— it would be a much fairer test if you used s

Re: Changing properties inside a relationship entity

2008-03-22 Thread malcom
Ok I've just found a solution. Make a new NSString object with a copy of the textview string and pass it. NSString *tmp = [[NSString alloc] initWithString: [[view textStorage] string]]; ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: base64 NSData to NSString

2008-03-22 Thread Jeff LaMarche
I really wouldn't do it this way. There are many ways of doing this within your app without spawning a task. LibCrypto offers functions for encoding and decoding Base64 as does LibSSL (which is going to be the same code as you're currently trying to use, but without spawning a task). Ther

Re: base64 NSData to NSString

2008-03-22 Thread Paolo Manna
Marco, > I've searched with Google and i found some "pathces" for NSString and NSData > but they > don' t seem to work. I've used the one contained in Eric Czarny's XML-RPC library, and it seems to work: http://sourceforge.net/projects/xml-rpc/ That is based on: http://ranchero.com/cocoa/xmlrpc/

base64 NSData to NSString

2008-03-22 Thread Marco Cassinerio
Hi, i'm trying to read the com.apple.recentitems.plist file and i found that "Alias" and "Icon" key are base64 NSData object. NSData and NSString don't provide methods to manage base64 data. I've searched with Google and i found some "pathces" for NSString and NSData but they don' t seem to

Re: NSTreeController, "canRemove" binding

2008-03-22 Thread Alexey Zakhlestin
SOLVED NSToolbarItem, which I was trying to "disable" had "Autovalidates" checked. After switching that off everything works as supposed On 3/22/08, Alexey Zakhlestin <[EMAIL PROTECTED]> wrote: > On 3/22/08, Jeff Nouwen <[EMAIL PROTECTED]> wrote: > > On Mar-22-2008, at 3:20 AM, Alexey Zakhlestin

Re: NSTreeController, "canRemove" binding

2008-03-22 Thread Alexey Zakhlestin
On 3/22/08, Jeff Nouwen <[EMAIL PROTECTED]> wrote: > On Mar-22-2008, at 3:20 AM, Alexey Zakhlestin wrote: > > I have NSOutlineView bound to NSTreeController > > Additionally, I have a button, which is bound to "canRemove" of > > NSTreeController. Unfortunately, button never gets disabled (even i

Installer is automatically diverting the applications location in Leopard

2008-03-22 Thread JanakiRam
Hi All, I've came across a strange situation with Installer on Leopard. Please help me to solve this. I've created a pkg installer for my cocoa application in Tiger using the following code snippet. */Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker

Unable to unload Launch Daemon using Cocoa Application.

2008-03-22 Thread JanakiRam
Hi All, I'm developing a cocoa application which needs to unload my Launch Daemon for one particular requirement. I've used Authorization Services to perform unload of Launch Daemon ( previlaged action ). But couldn't succeed in this. I'm getting the following error on executed my code. *

Re: Creating custom sheets

2008-03-22 Thread Ken Thomases
On Mar 21, 2008, at 9:44 AM, Sherm Pendley wrote: On Fri, Mar 21, 2008 at 9:42 AM, Ken Thomases <[EMAIL PROTECTED]> wrote: On Mar 20, 2008, at 7:37 PM, Kevin Dixon wrote: > I want to create a custom sheet that displays a bit of text, a > progress > bar and an abort button. The Apple docs say us

Re: NSTreeController, "canRemove" binding

2008-03-22 Thread Jeff Nouwen
On Mar-22-2008, at 3:20 AM, Alexey Zakhlestin wrote: I have NSOutlineView bound to NSTreeController Additionally, I have a button, which is bound to "canRemove" of NSTreeController. Unfortunately, button never gets disabled (even if I have an empty selection in NSOutlineView) I've run into this

Re: [iPhone] NSTableView and NSIndexPath

2008-03-22 Thread Cathy Shive
Noone's going to answer your question. A general rule of thumb to follow (at least until CocoaTouch SDK is out of beta) - don't ask about any classes whose names don't start with the letters "NS" or "CA" on this list. I'm sure that there are exceptions - maybe "QT", but generally this lis

[iPhone] NSTableView and NSIndexPath

2008-03-22 Thread Ryan Homer
NSTableView has a delegate method as follows: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath withAvailableCell:(UITableViewCell *)availableCell You can figure out which section and row of the table is in question using in

Re: XML to RTF transformation via XSL

2008-03-22 Thread Andrew Farmer
On 22 Mar 08, at 01:46, Ian Jackson wrote: I'd like to have my XML file read by my app, and save the file, or display it in a NSTextView, as RTF (with the appropriate formatting etc). So I have been trying to use: - (id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments: (NSDictionary *)

Re: Changing properties inside a relationship entity

2008-03-22 Thread malcom
I've noticed a strange thing. If I take my NSString from an NSTextField it seems to works, while if I use textStorage] string] from an NSTextView it simply put an empty string or still remain the old value into the NSManagedObject (however with GDB the textStorage] string] return the correct value)

Changing properties inside a relationship entity

2008-03-22 Thread malcom
Hello, I'm working with Core-Data. I've a simple cd structure (look here: ) with two entities: Draft and Data. Draft contains some infos about the draft itself while the data entity contains the body of the draft (I've used it in order to avoid to load the entire article while I need to put some ba

Re: disabling NSButton?

2008-03-22 Thread Kevin Dixon
I have a TableView. In order to update the state of the buttons that operate on the items in the list, I call my function "updateActionEnabledState" when my controller receives the tableView message (which is triggered by calling [uiAudioFileTableView reloadData] when the data source is altered).

NSTreeController, "canRemove" binding

2008-03-22 Thread Alexey Zakhlestin
Mac OS X 10.5.2 I have NSOutlineView bound to NSTreeController Additionally, I have a button, which is bound to "canRemove" of NSTreeController. Unfortunately, button never gets disabled (even if I have an empty selection in NSOutlineView) I added NSLog() to the method, which handles click on but

XML to RTF transformation via XSL

2008-03-22 Thread Ian Jackson
I'd like to have my XML file read by my app, and save the file, or display it in a NSTextView, as RTF (with the appropriate formatting etc). So I have been trying to use: - (id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments: (NSDictionary *)argumentserror:(NSError **)error Which is