Re: How to iterate over all objects stored with NSCoder

2009-10-14 Thread Graham Cox
On 14/10/2009, at 10:24 AM, Graham Cox wrote: It can also be parsed by the Property List Editor utility, which at least gives you a glimpse at the names of the classes and keys used. It takes some detective work but you can even work out what keys are with which class. It's not much, but i

Re: Code Sign verification on Leopard

2009-10-14 Thread Charles Srstka
On Oct 13, 2009, at 10:41 AM, Jens Alfke wrote: This code sample seems to be designed to verify the binary that it's compiled into. That's sort of useless for security purposes, like yelling downstairs "are you a burglar?" If your own code's already been modified, it's easy enough for the h

Re: NSString Class Instance Variables

2009-10-14 Thread Ariel Feinerman
It seems interesting. If I want to create my own superclass for class cluster, how can I implement it? Could you show simple example, please? -- best regards Ariel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Handle multiple screens & mouse

2009-10-14 Thread Gabriel Höhener
Thank you for your response! The problem is not about the window but about the mouse. When i programmatically move the mouse around and cross the borders of my screens, it jumps to (0,0) on the mainscreen.. The mouse must know the screen borders, which is not that difficult. But when I move

Default Core Data errors

2009-10-14 Thread Rick Mann
I'm having some issues with my Core Data app. It's based on the Xcode 3.2 Core Data document stationery. I thought it was working okay earlier, but now the simplest operation doesn't work. I launch my app, create a new document, save it, and then try to re-open it. The app displays an aler

Re: Getting AAC tag information

2009-10-14 Thread Sven
On Tue, 13 Oct 2009, Jens Alfke wrote: On Oct 13, 2009, at 9:30 AM, Sven wrote: Thanks... I don't want to encode any audio files, I merely want to be able to get and set tag data. For MP3s I can use id3lib no problems, but that doesn't help me with AAC files. I guess if there's no way to edi

Re: Default Core Data errors

2009-10-14 Thread Volker in Lists
Hi Rick, any messages in the console? Usually you should get more information there. Also, what happens when run from Xcode in debug settings? Maybe activate an objc_exception_throw breakpoint in advance. Cheers, Volker Am 14.10.2009 um 10:07 schrieb Rick Mann: > I'm having some issues with m

Re: NSString Class Instance Variables

2009-10-14 Thread Andy Lee
On Oct 14, 2009, at 3:39 AM, Ariel Feinerman wrote: It seems interesting. If I want to create my own superclass for class cluster, how can I implement it? Could you show simple example, please? Maybe Google knows? The first hit is

Background image of CustomTableView Cells

2009-10-14 Thread Symadept
Hi, Can you help me to fix this problem. I am customizing my table view to show various images in the background of the cells accordingly as Selected : Font Changed to While Colour, Background image, Highlighted.png Deselected/Normal: Font -> Black colour, Bg Image: Default.png I tried to overri

Custom NSComboBox

2009-10-14 Thread Symadept
Hi, I am designing a custom NSComboBox to display the rect image as some ComboboxBg.png and set foreground (text) color to Red. To render image I am doing the following things. @interface CustomComboBoxCell : NSComboBoxCell { } @end @implementation CustomComboBoxCell - (void)drawWithFrame:(NSRect)b

iPhone developer training

2009-10-14 Thread Martin Crane
Hi, Based on personal experience, can anyone recommend the best training course (in the UK only, please) for iPhone development? Thanks in advance! Regards, Martin Crane Senior Software Engineer Vicomsoft Vicomsoft Ltd. 21 Oxford Road, Bournemouth. BH8 8ET UK Tel: 08707 273510 (UK) +44 (0

Re: Validate NSToolbarPrintItem

2009-10-14 Thread Knut Lorenzen
Am 13.10.2009 um 21:00 schrieb Knut Lorenzen: how does one validate a NSToolbarPrintItem that was added in IB 3.2? To answer my own question (and for the archives): This looks like a bug in IB's predefined Print Toolbar Item. Workaround: Simply delete it, add a custom item instead, set it

Question about Apple's updated Sketch-112 program

2009-10-14 Thread Michael de Haan
Hi All, I think this is an easy issue...for those with more knowledge than I :) but it has had me stumped for a while now. I am puzzled about one of the calls (the "invalidateGraphic method") of the setter of the NSArray (_graphics) in the document.m file. The sequence occurs when data

Examples of MVC pattern with Core Data

2009-10-14 Thread Darren Wheatley
Hi, I've been Googling and searching the XCode docs for good examples of using the MVC pattern with Core Data, but not had a lot of success. Can anyone suggest some good examples? I'm learning Cocoa at the moment, and while I'm happy with the MVC pattern (and design patterns in general), I

iPhone/iPod Device Detection Necessary for App Approval?

2009-10-14 Thread Anthony Smith
I read on a forum somewhere that it's necessary to detect the device your app is running on and enable/disable features accordingly (e.g. disable phone feature on iPod) for app approval. If an app is meant for the iPhone only, is it necessary to detect the device and notify the user? smime

Re: Property List Format vs NSKeyedArchiver Format

2009-10-14 Thread Michael Ash
On Tue, Oct 13, 2009 at 6:24 PM, Ken Ferry wrote: > On Tue, Oct 13, 2009 at 2:40 PM, Jens Alfke wrote: > >> >> On Oct 13, 2009, at 1:08 PM, Bridger Maxwell wrote: >> >>  I would like to read more on the NSKeyedArchiver XML format, but can't >>> find >>> documentation on it. Is it open? >>> >> >>

UIControl = what was the event again?

2009-10-14 Thread Roland King
I must be missing something obvious here but ... UIControl has a method - (void)addTarget:(id)target action:(SEL)action forControlEvents: (UIControlEvents)controlEvents which lets you add an action to be called when any of the given controlEvents occur. ControlEvents are a bitmask of event

QLPreviewPanel causes warnings in QLThumbnailImageCreate?

2009-10-14 Thread Keith Blount
Hello, I'm using Matt Gemmell's NSImage category to create an NSImage from a QuickLook thumbnail, which uses QLThumbnailImageCreate() to generate the thumbnail image. My app also makes use of the new 10.6 QuickLook functionality to bring up a QuickLook panel for certain file previews. However,

Re: Examples of MVC pattern with Core Data

2009-10-14 Thread Kyle Sluder
On Oct 14, 2009, at 7:03 AM, Darren Wheatley > wrote: I've been Googling and searching the XCode docs for good examples of using the MVC pattern with Core Data, but not had a lot of success. Because MVC is so pervasive throughout Cocoa, its use is rarely called out except in introductory do

Re: Examples of MVC pattern with Core Data

2009-10-14 Thread I. Savant
On Oct 14, 2009, at 11:29 AM, Kyle Sluder wrote: On Oct 14, 2009, at 7:03 AM, Darren Wheatley > wrote: I've been Googling and searching the XCode docs for good examples of using the MVC pattern with Core Data, but not had a lot of success. Because MVC is so pervasive throughout Cocoa, its

Re: Code Sign verification on Leopard

2009-10-14 Thread Clark Cox
On Wed, Oct 14, 2009 at 12:37 AM, Charles Srstka wrote: > On Oct 13, 2009, at 10:41 AM, Jens Alfke wrote: > >> This code sample seems to be designed to verify the binary that it's >> compiled into. That's sort of useless for security purposes, like yelling >> downstairs "are you a burglar?" If you

SelectedRowIndexes

2009-10-14 Thread gMail.com
Hi, when I call [tableView selectedRowIndexes]; I always get a indexSet already sorted by row. Instead I need to sort it as the selection order. I mean, if the user selected the rows in the order Row 6 Row 2 Row 8 I want to get 6, 2, 8 and not 2, 6, 8 as I get now with selectedRowIndexes. How ca

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
Do you meant the console in Xcode? There's nothing there (and I checked Console.app just to be sure, same stuff there). No exceptions (I checked "Stop on Objective-C Exceptions" and created a symbolic breakpoint on "objc_exception_throw" just to be sure). On Oct 14, 2009, at 03:10:49, Volke

Re: Zombies instrument for iPhone?

2009-10-14 Thread Jon Drukman
On Tue, Oct 13, 2009 at 8:32 PM, Nick Zitzmann wrote: > > On Oct 13, 2009, at 5:35 PM, Jon Drukman wrote: > > Is the Zombies instrument that comes with Snow Leopard supposed to work >> with >> iPhone applications? It is always grayed out in Xcode. I am guessing it >> only works for Mac OS proj

Re: SelectedRowIndexes

2009-10-14 Thread I. Savant
On Oct 14, 2009, at 11:55 AM, gMail.com wrote: Oh, come on, at least pick a witty pseudonym. :-D when I call [tableView selectedRowIndexes]; I always get a indexSet already sorted by row. Instead I need to sort it as the selection order. I mean, if the user selected the rows in the order Ro

[SOLVED] Re: Question about Apple's updated Sketch-112 program

2009-10-14 Thread Michael de Haan
and the part that I do not get: - (void)invalidateGraphic:(SKTGraphic *)graphic { NSArray *windowControllers = [self windowControllers]; [windowControllers makeObjectsPerformSelector:@selector (invalidateGraphic:) withObject:graphic];} I **think** I see what each line is doing, but, fail

Re: Default Core Data errors

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 9:06 AM, Rick Mann wrote: > No exceptions (I checked "Stop on Objective-C Exceptions" and created a > symbolic breakpoint on "objc_exception_throw" just to be sure). Also try breaking on -[NSApp presentError:]. --Kyle Sluder ___

Re: SelectedRowIndexes

2009-10-14 Thread Corbin Dunn
On Oct 14, 2009, at 8:55 AM, gMail.com wrote: > Hi, > when I call [tableView selectedRowIndexes]; > I always get a indexSet already sorted by row. > Instead I need to sort it as the selection order. > I mean, if the user selected the rows in the order > > Row 6 > Row 2 > Row 8 > > I want to ge

Re: Zombies instrument for iPhone?

2009-10-14 Thread Nick Zitzmann
On Oct 14, 2009, at 10:09 AM, Jon Drukman wrote: I have been playing around with Instruments trying to get it to run my app in the simulator with zombies enabled and I can't quite figure out the sequence of steps required to make it happen. Do you happen to have a recipe? Xcode won't le

Re: iPhone/iPod Device Detection Necessary for App Approval?

2009-10-14 Thread David Duncan
On Oct 14, 2009, at 7:29 AM, Anthony Smith wrote: I read on a forum somewhere that it's necessary to detect the device your app is running on and enable/disable features accordingly (e.g. disable phone feature on iPod) for app approval. If an app is meant for the iPhone only, is it necessar

Re: SelectedRowIndexes

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 8:55 AM, gMail.com wrote: > Instead I need to sort it as the selection order. I'm kind of curious (not, I must emphasize, incredulous) as to why you need this. Wouldn't it be better to record the order in which selections were made in the controller layer, not in the view

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 09:34:20, Kyle Sluder wrote: On Wed, Oct 14, 2009 at 9:06 AM, Rick Mann wrote: No exceptions (I checked "Stop on Objective-C Exceptions" and created a symbolic breakpoint on "objc_exception_throw" just to be sure). Also try breaking on -[NSApp presentError:]. Breaki

Re: Problem using filewrappers under snow leopard - SOLVED

2009-10-14 Thread Eagle Offshore
I thought I'd share the underlying cause. In prior versions of OS X, if the contents of the file was nil, NSFileWrapper would just create an empty file. No problem. Empty file. Under Snow Leopard, NSFileWrapper writing aborts cryptically if any of the files' contents are nil or the wrapp

Re: Object Alloc Instrument and releasing question

2009-10-14 Thread Shawn Erickson
On Tue, Oct 13, 2009 at 1:40 PM, Nick Rogers wrote: > Here is some Object Alloc instrument data after the first tree is formed > (1), after releasing that tree (2) and after again making a tree (3): >CategoryLive Bytes #Living #Transitory > Overall Bytes #Overa

Re: Default Core Data errors

2009-10-14 Thread Volker in Lists
Rick, which StoreType are you using? If it is XML it could be worth looking into the raw xml. Otherwise more information on the model and any special methods (if any) could be useful. Any changes to the standard CoreData template provided by Xcode? Is the file readable at all from finder usin

Re: Default Core Data errors

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 9:44 AM, Rick Mann wrote: > Breaking on all -presentError:, it finally stops here: Okay, this is the point at which you examine the NSError and see if it has any more information for you. :) --Kyle Sluder ___ Cocoa-dev mailing

CoreData could not fulfill a fault after Save As

2009-10-14 Thread Jim Thomason
I'm completely and utterly stumped. I've stumbled across a showstopper bug and could use some pointers to try and debug it. Unfortuately, I haven't been able to reduce it into a succinct demo app. So clearly, the error is elsewhere in my code, but I can't figure out how to track it down yet. The s

Re: iPhone/iPod Device Detection Necessary for App Approval?

2009-10-14 Thread Clark Cox
On Wed, Oct 14, 2009 at 7:29 AM, Anthony Smith wrote: > I read on a forum somewhere that it's necessary to detect the device your > app is running on and enable/disable features accordingly (e.g. disable > phone feature on iPod) for app approval. I can't speak to what's required for approval, but

NSTimeZone questions

2009-10-14 Thread Alex Kac
Some hopefully basic questions. We normally call [NSTimeZone localTimeZone] in our app to get the current timezone. In some cases we may set the default timezone via [NSTimeZone setDefaultTimeZone:...]. Now after we've done that we want to reset it so that it again simply gets the system's

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 09:57:58, Kyle Sluder wrote: On Wed, Oct 14, 2009 at 9:44 AM, Rick Mann wrote: Breaking on all -presentError:, it finally stops here: Okay, this is the point at which you examine the NSError and see if it has any more information for you. :) Is there a way I can get a

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 09:51:15, Volker in Lists wrote: Rick, which StoreType are you using? If it is XML it could be worth looking into the raw xml. Otherwise more information on the model and any special methods (if any) could be useful. Any changes to the standard CoreData template provi

Re: Default Core Data errors

2009-10-14 Thread Volker in Lists
Rick, you can use po and than most of what you are used in Obj-C like you would use in NSLog. Or just use NSLog and any of the properties a NSError has. Cheers, Volker Am 14.10.2009 um 19:30 schrieb Rick Mann: > > On Oct 14, 2009, at 09:57:58, Kyle Sluder wrote: > >> On Wed, Oct 14, 2009 at

Re: Default Core Data errors

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 10:30 AM, Rick Mann wrote: > Is there a way I can get at that programmatically, rather than via gdb? I'm > very clumsy in gdb. Your time will be better spent learning how to use the debugger. Quick crash course: 1. Use `po` to print objects. Example: >> po theError 2.

CALayer z-axis scale

2009-10-14 Thread ChrisOutwin
My Core Animation application correctly scales a CALayer's x and y axes but does nothing to change the layer's visual position relative to sibling layers when the z scaling factor is changed in the UI. The debugger and NSLog both indicate that element m33 of the CATransform3D structure cha

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
I knew about po, but sometimes it says the thing is nil, but then I'll go back to my code and write NSLog() statements, and it prints something out, so I felt like po wasn't reliable. Also, when accessing collections, it was easier to write loops in ObjC. But I'll give this a shot, thanks!

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
Well, I discovered the willPresentError delegate method. From that, I got: (gdb) po inError Error Domain=NSCocoaErrorDomain Code=256 UserInfo=0x200272ea0 "The document “Untitled.telem” could not be opened. " (gdb) po [inError userInfo] { NSLocalizedDescription = "The document \U201cUnt

Re: CALayer z-axis scale

2009-10-14 Thread douglas welton
Question: does your view actually have a "depth" in the z dimension or is it just a plane with x and y measurement and a z (depth) of 0.0. If you scale something with a size of zero, you'll produce no visible results. If you want the position of one layer to change, relative to another,

re: Default Core Data errors

2009-10-14 Thread Ben Trumbull
Do you check, and at least assert, if any API that has an NSError** parameter returns one ? (typically a return value of NO or nil). For Core Data, you'll always want to check adding a store to the coordinator, saving, and fetching. For your documented based app, the NSDocument APIs can

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
In the simplest case, I don't create any entities. I don't override any of NSPersistentDocument's persistence-related methods. I just save the new untitled document, then try to re-open it. On Oct 14, 2009, at 12:11:29, Ben Trumbull wrote: Do you check, and at least assert, if any API that h

re: CoreData could not fulfill a fault after Save As

2009-10-14 Thread Ben Trumbull
The short description is this - I have a document based CoreData app. I can carefully craft a set of data. I then open the document, select a particular record, and do a Save As. This works fine. But when I select a second record, I get errors that CoreData could not fulfill a fault. If I quit the

Re: Default Core Data errors

2009-10-14 Thread Ben Trumbull
On Oct 14, 2009, at 12:21 PM, Rick Mann wrote: In the simplest case, I don't create any entities. I don't override any of NSPersistentDocument's persistence-related methods. I just save the new untitled document, then try to re-open it. You can override the methods declared in NSPersisten

Re: Default Core Data errors

2009-10-14 Thread Rick Mann
I did exactly that for readFromURL. It comes back with no errors. The dialog is not displayed until after that method returns. I'll try the configure call. On Oct 14, 2009, at 12:31:28, Ben Trumbull wrote: On Oct 14, 2009, at 12:21 PM, Rick Mann wrote: In the simplest case, I don't create

Intercept tap on URL in UITextView

2009-10-14 Thread Lorenzo Thurman
I have text in a UITextView which *may* contain a URL. I would like to intercept any tap on the URL and display the html page in an UIWebView in my app. Can anyone point me to some sample code that does this? Or is it even possible?Thanks! -- "My break-dancing days are over, but there's always th

Re: CoreData could not fulfill a fault after Save As

2009-10-14 Thread Jim Thomason
On Wed, Oct 14, 2009 at 2:25 PM, Ben Trumbull wrote: >> The short description is this - I have a document based CoreData app. >> I can carefully craft a set of data. I then open the document, select >> a particular record, and do a Save As. This works fine. But when I >> select a second record, I

Slider with tag?

2009-10-14 Thread Gabriel Zachmann
Could someone please explain to me how I can present a little tag to the user that moves along with a slider's handle (above or below), in which I can give some feedback to the user about the current value of the slider? I'm afraid I couldn't find an example, but I think I have seen such a

Re: Handle multiple screens & mouse

2009-10-14 Thread Jens Alfke
On Oct 14, 2009, at 12:53 AM, Gabriel Höhener wrote: The problem is not about the window but about the mouse. When i programmatically move the mouse around and cross the borders of my screens, it jumps to (0,0) on the mainscreen.. Don't move the mouse cursor around! That's just annoying. N

AudioConverterFillComplexBuffer problem in Snow Leopard

2009-10-14 Thread Bill Patterson
When trying to convert a Apple Lossless audio file (.m4a) to a aif file on Snow Leopard 10.6.1, I get an error return value from AudioConverterFillComplexBuffer() with an ascii value of '!dat', 0x21646174. The error is returned the initial time the routine is called, before any conversion

Positioning NSWindow center to Application main window?

2009-10-14 Thread Arun
Hi In my application, i launch a window on a click of button. Is it possible to position the launched window to become exactly center to the Main application window? If so how can i achieve this. Thanks Arun KA ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: AudioConverterFillComplexBuffer problem in Snow Leopard

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 2:05 PM, Bill Patterson wrote: > When trying to convert a Apple Lossless audio file (.m4a) to a aif file on > Snow Leopard 10.6.1, I get an error return value from > AudioConverterFillComplexBuffer() with an ascii value of '!dat', 0x21646174. Looks like you meant to post t

Re: Positioning NSWindow center to Application main window?

2009-10-14 Thread Jens Alfke
On Oct 14, 2009, at 2:09 PM, Arun wrote: Is it possible to position the launched window to become exactly center to the Main application window? Get the frame of the main window. Get the frame of your new window. Figure out how far to offset the x,y of the new window's frame to center it.

Setting Application cursor

2009-10-14 Thread David Alter
I need to set a cursor for the application when it is in specific states. I have been doing this by creating by cursor and calling set. [[NSCursor crosshairCursor] set]; If the application is deactivated. When you activate the application the cursor needs to be reset. I tried doing this in NSAppl

Re: Setting Application cursor

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 2:42 PM, David Alter wrote: > I need to set a cursor for the application when it is in specific states. I > have been doing this by creating by cursor and calling set. Do you need this cursor to be effective anywhere on the screen? If not, use the NSTrackingArea API on wh

Re: Setting Application cursor

2009-10-14 Thread David Alter
I do need the cursor to be active everywhere on the screen. In other places we are using NSTrackingArea and that works great. On Wed, Oct 14, 2009 at 2:48 PM, Kyle Sluder wrote: > On Wed, Oct 14, 2009 at 2:42 PM, David Alter > wrote: > > I need to set a cursor for the application when it is in

Re: Setting Application cursor

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 2:56 PM, David Alter wrote: > I do need the cursor to be active everywhere on the screen. In other places > we are using NSTrackingArea and that works great. «Obligatory confirmation that you are doing this for good (ex: eyedropper) and not for evil (well of course the use

Help with NSURLConnection memory fault

2009-10-14 Thread Stuart Malin
I create (in an object) an NSURLConnection and start it asynchronously: mNSURLConnection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self]; [mNSURLConnection start]; I release the NSURLConnection instance after it calls back in -connectionDidFinishLoading:

Re: Question about Apple's updated Sketch-112 program

2009-10-14 Thread Graham Cox
On 15/10/2009, at 12:44 AM, Michael de Haan wrote: - (void)invalidateGraphic:(SKTGraphic *)graphic { NSArray *windowControllers = [self windowControllers]; [windowControllers makeObjectsPerformSelector:@selector (invalidateGraphic:) withObject:graphic];} I **think** I see what each line is

Re: SelectedRowIndexes

2009-10-14 Thread Peter Hudson
I have tackled this problem by using the NSTableView delegate method tableViewSelectionDidChange: In this method I query the table for selected rows and then compare with the index set from the previous call to tableViewSelectionDidChange: I simply store the incremental changes in sequen

Re: SelectedRowIndexes

2009-10-14 Thread Graham Cox
On 15/10/2009, at 10:01 AM, Peter Hudson wrote: I have tackled this problem by using the NSTableView delegate method tableViewSelectionDidChange: In this method I query the table for selected rows and then compare with the index set from the previous call to tableViewSelectionDidChange:

Re: Help with NSURLConnection memory fault

2009-10-14 Thread Jens Alfke
It looks as though your object (the delegate) got dealloced too early, before the NSURLConnection finished loading. This shouldn't be possible, since the connection object retains the delegate, but you may have too many release calls to it someplace. What I would do next is set a breakpoint

Re: SelectedRowIndexes

2009-10-14 Thread gMail.com
I need that because the last object selected is the one I represent in the Inspector panel (instead of "Multiple Selection" which is not editable). So for example the last object selected has coords x = 30 and y = 50 and I show these coords on the Inspector. This info lets me do so nice tasks. e.g

Re: SelectedRowIndexes

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 4:45 PM, gMail.com wrote: > I need that because the last object selected is the one I represent in the > Inspector panel (instead of "Multiple Selection" which is not editable). So > for example the last object selected has coords x = 30 and y = 50 > and I show these coords

Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Rick Mann
I'm trying to implement a library like Interface Builder's. When the user drags an item out of the library and onto one of my custom views, it should instantiate an object and place it in the view accordingly. I'm trying to implement the drag by writing to the pasteboard an NSData object I

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Kiel Gillard
You could archive and unarchive your object as data using NSKeyedArchiver and NSKeyedUnarchiver.

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Rick Mann
That's the kind of thing I'm trying to avoid. There's no need to do that, since the drag is only within my app. I just want the drag receiver to have access to a *point* to the object, not a new copy of the object. On Oct 14, 2009, at 17:34:06, Kiel Gillard wrote: You could archive and una

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread mmalc Crawford
On Oct 14, 2009, at 5:21 PM, Rick Mann wrote: >NSMutableData* data = [NSMutableData data]; >[data appendBytes: &self length: sizeof (self)]; > Try using an NSValue: + (NSValue *)valueWithPointer:(const void *)aPointer archive then unarchive - (void *)pointerValue mmalc ___

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 17:43:28, mmalc Crawford wrote: On Oct 14, 2009, at 5:21 PM, Rick Mann wrote: NSMutableData* data = [NSMutableData data]; [data appendBytes: &self length: sizeof (self)]; Try using an NSValue: + (NSValue *)valueWithPointer:(const void *)aPointer archive the

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Kiel Gillard
A few other alternatives come to mind: - archive an identifier value that uniquely identifies the object you are dragging or - use and archive an instance of NSValue using the valueWithPointer: initializer.

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Rick Mann
On Oct 14, 2009, at 17:43:28, mmalc Crawford wrote: On Oct 14, 2009, at 5:21 PM, Rick Mann wrote: NSMutableData* data = [NSMutableData data]; [data appendBytes: &self length: sizeof (self)]; Try using an NSValue: + (NSValue *)valueWithPointer:(const void *)aPointer archive the

Re: Property List Format vs NSKeyedArchiver Format

2009-10-14 Thread Ken Ferry
On Wed, Oct 14, 2009 at 7:47 AM, Michael Ash wrote: > On Tue, Oct 13, 2009 at 6:24 PM, Ken Ferry wrote: > > Nor is there anything stopping you from dropping in classes written by > > someone else. You could use > > MAKeyedArchiver. > > As long

[SOLVED] Re: Help with NSURLConnection memory fault

2009-10-14 Thread Stuart Malin
On Oct 14, 2009, at 7:24 PM, Jens Alfke wrote: It looks as though your object (the delegate) got dealloced too early, before the NSURLConnection finished loading. This shouldn't be possible, since the connection object retains the delegate, but you may have too many release calls to it som

Re: iPhone/iPod Device Detection Necessary for App Approval?

2009-10-14 Thread Anthony Smith
Thanks for the response, David. My app is iPhone only. I'm curious as to whether I need do a device check at the beginning of my app's execution and disable the app in some way(have a view stating, "This app is iPhone only") in order to be accepted by the app store. I understand the impor

Re: [SOLVED] Re: Help with NSURLConnection memory fault

2009-10-14 Thread Jens Alfke
On Oct 14, 2009, at 7:43 PM, Stuart Malin wrote: Just a "lucky" coincidence that the memory where the dealloc'd NSURLConnection had lived was still the (now defunct) object, so it went through its motions again, and tried to release the delegate a second time. The MallocScribble environm

shared preferences.

2009-10-14 Thread Sandro Noel
Hello, I'm experiencing problems with my application preference, some part of the preferences are user specific but the licensing part is meant to be global for the computer. I am looking for a document that would explain how I can get some preferences installed in /Library or if someone co

Re: iPhone/iPod Device Detection Necessary for App Approval?

2009-10-14 Thread David Duncan
On Oct 14, 2009, at 7:51 PM, Anthony Smith wrote: My app is iPhone only. I'm curious as to whether I need do a device check at the beginning of my app's execution and disable the app in some way(have a view stating, "This app is iPhone only") in order to be accepted by the app store. As C

Re: shared preferences.

2009-10-14 Thread Jens Alfke
On Oct 14, 2009, at 8:38 PM, Sandro Noel wrote: I'm experiencing problems with my application preference, some part of the preferences are user specific but the licensing part is meant to be global for the computer. I am looking for a document that would explain how I can get some preferen

Re: Code Sign verification on Leopard

2009-10-14 Thread Charles Srstka
On Oct 14, 2009, at 10:50 AM, Clark Cox wrote: You say that as if "getting infected by" and "being specifically targeted by" a virus are different things. Either a virus has targeted your application, and as such knows enough about it to modify it's code (and therefore replace/defeat any signatu

RE: Code Sign verification on Leopard

2009-10-14 Thread Jeff Laing
> Actually, heck, you wouldn't even need that. All a virus would have to > do would be to move the binary somewhere else and put a binary in its > place that does something malicious and then launches the real binary, > and the user would never tell the difference. > > Unless, of course, the app c

Re: Code Sign verification on Leopard

2009-10-14 Thread Charles Srstka
On Oct 14, 2009, at 11:40 PM, Jeff Laing wrote: Actually, heck, you wouldn't even need that. All a virus would have to do would be to move the binary somewhere else and put a binary in its place that does something malicious and then launches the real binary, and the user would never tell t

Re: Code Sign verification on Leopard

2009-10-14 Thread Kyle Sluder
On Wed, Oct 14, 2009 at 9:35 PM, Charles Srstka wrote: > Unless, of course, the app checked its code signature. Put malicious library in temp dir. Set DYLD_LIBRARY_PATH. Game over. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-14 Thread Motti Shneor
Hello. I'm in a strange situation, where I am implementing a plugin component that runs within a host application which I don't have access to. Within this context, The host sometimes calls my plug-in to open an NSSavePanel (or NSOpenPanel). The host expects that I'm synchronous --- i.e. I

Re: SelectedRowIndexes

2009-10-14 Thread Peter Hudson
The user has an NSTableView in which is presented a number of elements ( 1 per row, typically 20 - 200 rows ) out of which they need to produce a number of sequenced sub groups. The user presses the 'Start Sub Group' key ( i.e. clear the sequence selection cache ) and then by picking a po

Re: SelectedRowIndexes

2009-10-14 Thread Graham Cox
On 15/10/2009, at 5:24 PM, Peter Hudson wrote: The user has an NSTableView in which is presented a number of elements ( 1 per row, typically 20 - 200 rows ) out of which they need to produce a number of sequenced sub groups. The user presses the 'Start Sub Group' key ( i.e. clear the sequ

Re: SelectedRowIndexes

2009-10-14 Thread Peter Hudson
We offer a drag and drop option as well - very similar to your idea. The problem is that our users find it easier to scroll their way through the list and command click on the appropriate rows. Users prefer to have their way I find. Peter On 15 Oct 2009, at 07:45, Graham Cox wrote: On