Re: Turn on zombies in user environment?

2009-09-07 Thread Joar Wingfors
On 6 sep 2009, at 22.48, Kyle Sluder wrote: You'll need to make sure you have the unstripped release binary (not a debug version) of the same app version for this backtrace to be useful. If you don't, you will have to send the user a new binary. For tracking down this type of issue, I wou

Re: NSString drawAtPoint and vertical font alignment

2009-09-07 Thread Quincey Morris
On Sep 6, 2009, at 23:38, Stephen Blinkhorn wrote: I make a custom view (really a NSControl subclass) and I use a place holder in IB to position it on screen. I also set it's size to be say 50 wide by 22 high. If I draw the view by simply filling the rect returned by [self bounds] then i

How to play the movie(.mov) looped using QTMovie ?

2009-09-07 Thread James
Hi, everyone In my application, I have implemented to play the movie(.mov). Now, I want to control the movies looped or not when they play using menu items. Using the menu items, user can select to play single movie looped or all movie looped one by one. I looked up the

Re: Turn on zombies in user environment?

2009-09-07 Thread Graham Cox
Great, thank-you all very much! I'm afraid this user is finding even point-and-click tough going, but I'll try as we have very little else to go on right now. Installing the dev tools is likely to be out for the moment. However, in following your advice I'm not getting the app launched - I

Re: Turn on zombies in user environment?

2009-09-07 Thread Joar Wingfors
On 7 sep 2009, at 00.34, Graham Cox wrote: However, in following your advice I'm not getting the app launched - I just get "$: Command not found.". I just use the default shell in Terminal and I don't use it much myself so I'm not sure what the problem is. I'm on Snow but the user is on 10

Finding nearby places

2009-09-07 Thread Mahaboob
Hi, I get the latitude and longitude from the iPhone using coreLocation framework. Now I need to show the nearby hotels, restaurants etc. Which api I need to use for this? I'm using iPhone OS 2.2 Thanks in advance Mahaboob ___ Cocoa-dev mailing list

Re: Code Signing

2009-09-07 Thread Charles Srstka
On Sep 6, 2009, at 6:22 PM, Chris Suter wrote: It's important to remember that code signatures are not really there to prevent malware from running, or make it harder for hackers (since it's trivial to remove a code signature or replace them other valid signatures). Well, you can always check

Re: Code Signing

2009-09-07 Thread Peter Hudson
Many thanks for this info. I was looking for a way to observe the code having been hacked - and if it has been, for the app not to run. What is the kill flag and how do I set it ? Could it be reset by someone ? Best regards Peter On 7 Sep 2009, at 00:22, Chris Suter wrote: Hi Peter,

Re: document-based application

2009-09-07 Thread René v Amerongen
Hi, did you look at cocoadev/forum? If you want actualy the same, there is a disscusion about this. HTH Op 7 sep 2009, om 07:24 heeft Oftenwrong Soong het volgende geschreven: Hi All, In my doc-based app, I need to initially display a startup window instead of a new empty document. Its

Crash on SL in com.apple.DesktopServices after using NSOpenPanel

2009-09-07 Thread Markus Spoettl
Hello, I have a crash that I can't reproduce on my machines but a user runs into it every time he uses an open panel in the app on Snow Leopard. Below is the stack trace and the code that handles the panel. Nothing obvious for me and it used to work and works fine under Leopard and Sn

Problem with LSSharedFileListInsertItemURL() usage. (API in LaunchServices/LSSharedFileList.h)

2009-09-07 Thread Parimal Das
Hello all, I am trying to do the following- "when my app is used for the first time - *'open at login'* is selected by default". For that i am calling the code below for the app's first run. The code is working fine and my app is getting added in the login item list, But on ctrl+click on my apps

Re: Crash on SL in com.apple.DesktopServices after using NSOpenPanel

2009-09-07 Thread Thomas Clement
Looks like an Apple bug. http://kb2.adobe.com/cps/506/cpsid_50654.html Thomas On Sep 7, 2009, at 12:37 PM, Markus Spoettl wrote: Hello, I have a crash that I can't reproduce on my machines but a user runs into it every time he uses an open panel in the app on Snow Leopard. Below is the

Sending the "value" message to an object typed "id"

2009-09-07 Thread Paulo F. Andrade
I was explaining the difference between typing objects with id instead of UISlider * (in this case) to a friend and came across this weird behaviour. Consider the folowing method that is called when chaing the value of a UISlider: === - (IBAction)changeValue:(id)sender { [textLabe

Weird malloc error when dealing with lots of NSImage objects

2009-09-07 Thread DairyKnight
Hi all, I keep on getting weird malloc errors with the following code, first from ATSFontManager, and then: FooProgram(1343,0xa01e1720) malloc: *** mmap(size=30855168) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug 2009-09-07 19:37:

Re: Turn on zombies in user environment?

2009-09-07 Thread Graham Cox
On 07/09/2009, at 5:37 PM, Joar Wingfors wrote: You're not supposed to type either the "$", or the "(gdb)". They're just there to indicate that you're supposed to type this at a prompt, and what type of prompt you're at. Which was what I thought, but doing that produces much the same resu

Re: Sending the "value" message to an object typed "id"

2009-09-07 Thread Graham Cox
On 07/09/2009, at 9:36 PM, Paulo F. Andrade wrote: So what's the deal with the method name "value" and ObjC runtime? As an iPhone question this may be incorrect, but normally you use - floatValue to get a, umm, float value. I suspect what's occurring is that -value is defined in multiple

Re: Turn on zombies in user environment?

2009-09-07 Thread Jean-Daniel Dupas
Le 7 sept. 2009 à 14:03, Graham Cox a écrit : On 07/09/2009, at 5:37 PM, Joar Wingfors wrote: You're not supposed to type either the "$", or the "(gdb)". They're just there to indicate that you're supposed to type this at a prompt, and what type of prompt you're at. Which was what I th

Re: Crash on SL in com.apple.DesktopServices after using NSOpenPanel

2009-09-07 Thread Markus Spoettl
On Sep 7, 2009, at 1:31 PM, Thomas Clement wrote: Looks like an Apple bug. http://kb2.adobe.com/cps/506/cpsid_50654.html That doesn't seem to be the problem with that user's machine as the files are local. Thanks for the pointer, though! Regards Markus -- _

Re: Crash on SL in com.apple.DesktopServices after using NSOpenPanel

2009-09-07 Thread Thomas Clement
On Sep 7, 2009, at 2:25 PM, Markus Spoettl wrote: On Sep 7, 2009, at 1:31 PM, Thomas Clement wrote: Looks like an Apple bug. http://kb2.adobe.com/cps/506/cpsid_50654.html That doesn't seem to be the problem with that user's machine as the files are local. The document states "especially w

Re: Weird malloc error when dealing with lots of NSImage objects

2009-09-07 Thread Roland King
where's this getting called? Is it getting called from a timer or button press or other event, or do you do a whole load of these in a loop? It seems to me that everything you have init'ed you have released again, however surface is autoreleased, so it won't actually get dealloced until t

Re: document-based application

2009-09-07 Thread Nathan Day
That is the way I do it, I don't see why it wouldn't work 100% of the time, it would be nice if Apple had a way to insert a template chooser, but I would describe the way you have done it as 'an ugly hack'. On 07/09/2009, at 3:24 PM, Oftenwrong Soong wrote: Hi All, In my doc-based app, I

Re: Turn on zombies in user environment?

2009-09-07 Thread Graham Cox
On 07/09/2009, at 10:22 PM, Jean-Daniel Dupas wrote: env Thankyou - the missing piece. It's good. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the m

Re: Code Signing

2009-09-07 Thread Carl Harris
Peter Hudson wrote: I was looking for a way to observe the code having been hacked - and if it has been, for the app not to run. What is the kill flag and how do I set it ? Could it be reset by someone ? Take a look at the Code Signing Services Reference: http://developer.apple.com/mac

Re: Change the text color in an NSTableView based on the data in the row

2009-09-07 Thread Bryan Zarnett
Thanks Graham, I did the following and it worked fine: NSNumber *isClosed = [[[activityController arrangedObjects] objectAtIndex: row] valueForKey: @"isClosed"]; Cheers! On 7-Sep-09, at 12:34 AM, Graham Cox wrote: On 07/09/2009, at 9:40 AM, Bryan Zarnett wrote: I would like to set the

Re: Finding nearby places

2009-09-07 Thread I. Savant
On Sep 7, 2009, at 5:48 AM, Mahaboob wrote: I get the latitude and longitude from the iPhone using coreLocation framework. Now I need to show the nearby hotels, restaurants etc. Which api I need to use for this? I'm using iPhone OS 2.2 This has to be the fourth or fifth time you've asked th

Re: document-based application

2009-09-07 Thread I. Savant
On Sep 7, 2009, at 1:24 AM, Oftenwrong Soong wrote: In my doc-based app, I need to initially display a startup window instead of a new empty document. Its function would be somewhat akin to that of the Template Chooser that comes up when you launch Pages. This might help (it's a little ha

Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Joshua Garnham
How would I do this? The Outline View is being used with Core Data. Cheers, Josh. ___ 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

Re: Sending the "value" message to an object typed "id"

2009-09-07 Thread Paulo F. Andrade
On 2009/09/07, at 13:11, Graham Cox wrote: On 07/09/2009, at 9:36 PM, Paulo F. Andrade wrote: So what's the deal with the method name "value" and ObjC runtime? As an iPhone question this may be incorrect, but normally you use - floatValue to get a, umm, float value. UISlider does not

Re: Sending the "value" message to an object typed "id"

2009-09-07 Thread Graham Cox
On 08/09/2009, at 1:31 AM, Paulo F. Andrade wrote: I don't get this. Won't the call [sender value] be dealt by objc_msgSend? Will it not traverse the isa pointer to get the method table and find the method named "value" and call that? At least from the UISlider class hierarchy there seems

Re: Symbolic Links in Snow Leopard

2009-09-07 Thread Greg Guerin
Gerriet M. Denkmann wrote: Try using a pathname that contains only Latin alphabet characters (for reference, the original chars of the volume-name are Thai: \u0e40 \u0e21\u0e48\u0e19). If necessary, create and mount a disk-image in order to get only Latin chars. Did try already - same issu

Re: Symbolic Links in Snow Leopard

2009-09-07 Thread Greg Guerin
Jens Alfke wrote: Huh? I never said the path was invalid. "/Code/Murky" is a perfectly cromulent path on my machine, although it goes through a symlink. Oops. Color me incromulent. I somehow misunderstood your description, and was thinking it was a broken symlink. -- GG __

Re: Sending the "value" message to an object typed "id"

2009-09-07 Thread Graham Cox
On 08/09/2009, at 1:31 AM, Paulo F. Andrade wrote: At least from the UISlider class hierarchy there seems to be only one method named "value", no ambiguity there. A further point - it's not the immediate class hierarchy that is searched. It's the entire namespace, which as you know is eve

Re: Weird malloc error when dealing with lots of NSImage objects

2009-09-07 Thread Bill Bumgarner
On Sep 7, 2009, at 4:45 AM, DairyKnight wrote: FooProgram(1343,0xa01e1720) malloc: *** mmap(size=30855168) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug 2009-09-07 19:37:17.606 KindPDF[1343:10b] *** NSCopyMemoryPages (0xfc18a000

Re: Sending the "value" message to an object typed "id"

2009-09-07 Thread Paulo F. Andrade
Got it. Thank you! Paulo F. Andrade On 2009/09/07, at 16:51, Graham Cox wrote: Yes, but the return type will cause different compilation of objc_msgSend. There are several variants of that (obc_msgSend_fpret, objc_msgSend_stret, etc) depending on which registers are expected to return

mouseDown Event Position Accuracy (was: NSString drawAtPoint and vertical font alignment)

2009-09-07 Thread Stephen Blinkhorn
On 7 Sep 2009, at 01:09, Quincey Morris wrote: On Sep 6, 2009, at 23:38, Stephen Blinkhorn wrote: I make a custom view (really a NSControl subclass) and I use a place holder in IB to position it on screen. I also set it's size to be say 50 wide by 22 high. If I draw the view by simply f

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Steven Degutis
Josh, The outline view is probably being displayed with an NSArrayController, not just "Core Data", which is an abstract term for a ton of APIs. As well, NSArrayController falls into part of Cocoa, as well as Core Data, but that's another story. Assuming your row is "removed" via an outlet to your

Re: mouseDown Event Position Accuracy (was: NSString drawAtPoint and vertical font alignment)

2009-09-07 Thread Steven Degutis
Stephen, The most obvious reason that comes to mind, is that your cursor's exact point is not located on the exact top of the default +[NSCursor arrowCursor]. It's actually located a little lower. Try changing your cursor to the crosshair cursor, or a custom cursor if you'd prefer, and see if it i

Re: Problem with LSSharedFileListInsertItemURL() usage. (API in LaunchServices/LSSharedFileList.h)

2009-09-07 Thread Steven Degutis
Parimal, Your code looks complete and correct, so my only guess is that the variable url is not actually pointing to [[NSBundle mainBundle] bundleURL] which might explain it. (Then again, I've only ever dealt with manually adding my application to the Login Items programmatically in apps that had n

Re: Copying records from to-many relationship in Core Data

2009-09-07 Thread Sean Kline
In case anyone is interested (or understood my post ;-)), Rib Rix is helping me through this one. The issue is that Apple states: You are typically discouraged from performing fetches within an implementation of awakeFromInsert. Although it is allowed, execution of the fetch request can trigger th

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Joshua Garnham
Steven, The Outline View isn't being displayed with an NSArrayController rather an NSTreeController, but I think you can still override -remove:. Also, how would I check to see whether the row the user wants to delete has any children? Cheer, Josh. From: Steve

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Kyle Sluder
On Sep 7, 2009, at 8:14 AM, Joshua Garnham wrote: How would I do this? http://www.whathaveyoutried.com --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: mouseDown Event Position Accuracy (was: NSString drawAtPoint and vertical font alignment)

2009-09-07 Thread Stephen Blinkhorn
Astonishing... that is the problem. I thought the default hot spot for the default cursor would be the tip of the arrow. Obviously not. OK, custom cursors it is then. Many thanks, Stephen On 7 Sep 2009, at 10:24, Steven Degutis wrote: Stephen, The most obvious reason that comes to mind

Re: Sending the "value" message to an object typed "id"

2009-09-07 Thread Jens Alfke
On Sep 7, 2009, at 5:11 AM, Graham Cox wrote: I suspect what's occurring is that -value is defined in multiple classes having different return types: maybe float in one case and id in another, say. The compiler can't disambiguate a method based on return type alone so compiles based solely

Re: How to play the movie(.mov) looped using QTMovie ?

2009-09-07 Thread Jens Alfke
On Sep 7, 2009, at 12:40 AM, James wrote: Using the menu items, user can select to play single movie looped or all movie looped one by one. I looked up the QTMovie class. But, I can not find the method for my purpose. Set the movie's attribute QTMovieLoopsAttribute to YES. (A

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Joshua Garnham
This. - (IBAction)remove:(id)sender { NSArray *selectedRow = [treeController selectedObjects]; NSInteger childrenCount = [selectedRow.children count]; if ([childrenCount != 0]) { NSLog(@"Display Alert"); }else{ NSLog(@"Delete Imediately"); } } _

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Volker in Lists
Hi, NSArray *selectedRow = [treeController selectedObjects]; you get an NSArray -> so you should enumerate through the objects of the array NSInteger childrenCount = [selectedRow.children count]; Does not get the children count of anything but the NSArray, which it doesn't have.

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Kyle Sluder
On Sep 7, 2009, at 10:20 AM, Joshua Garnham wrote: This. Excellent response. In the future, it is always better if you include code or a description of your attempts (even if it's just looking at the documentation). - (IBAction)remove:(id)sender { NSArray *selectedRow = [treeCont

Re: Does Mac OS X support interior pointers?

2009-09-07 Thread Quincey Morris
On Sep 7, 2009, at 02:32, John Engelhart wrote: [...] I'm not going to engage you on this discussion. If that means I'm ignoring your reasonable requests for clarification, I apologize. However, I do feel the need to acknowledge what I might have previously done wrong ... I may have mi

KVO on Distributed Objects with exception handling.

2009-09-07 Thread Edward Chan
Hello, I'm using KVO on a Distributed Object, and I am binding my UI controls based on the observer. For example: MonkeyViewController.isEatingABanana -> Binded to a UI checkbox. MonkeyViewController.m: @propery (readwrite, assign) BOOL isEatingABanana; -(id)init { ... [MonkeyBrainDOObject ad

Re: Turn on zombies in user environment?

2009-09-07 Thread Joar Wingfors
On 7 sep 2009, at 05.03, Graham Cox wrote: You're not supposed to type either the "$", or the "(gdb)". They're just there to indicate that you're supposed to type this at a prompt, and what type of prompt you're at. Which was what I thought, but doing that produces much the same result:

Re: Turn on zombies in user environment?

2009-09-07 Thread Kyle Sluder
On Sep 7, 2009, at 12:21 PM, Joar Wingfors wrote: The syntax I proposed works with bash, the default shell for Mac OS X. If you have changed to using some other shell, you will need to change the syntax to match. IIRC the default shell on Jaguar and earlier was tcsh. If you've upgraded y

Re: completion handlers?

2009-09-07 Thread Gabriel Zachmann
As mentioned before, the new feature is called Blocks, and is available only for Snow Leopard for the moment (probably being ported to the iPhone too). I've written an introductory guide on what they are and how they work, specifically intended for people who have experience with Objective-

Menu Weirdness (can't set command + 3 or command + 4)

2009-09-07 Thread Chilton Webb
Hi! I've checked the archives, but finding 'command' and '3' for anything relevant is somewhat impossible. I have a situation where if I try to set the key equivalent of a menu to 3 or 4, it just won't happen. any other number--it works just fine. I even made a movie... http://www.conjure

Re: completion handlers?

2009-09-07 Thread Kyle Sluder
On Sep 7, 2009, at 1:08 PM, Gabriel Zachmann wrote: It seems to me that Blocks in SL are exactly the same thing as "Closures" in Smalltalk -- is that correct? Mostly. ObjC blocks have certain semantics you need to be aware of, since they can live on the stack. Further discussion belo

Re: KVO on Distributed Objects with exception handling.

2009-09-07 Thread Edward Chan
Great... How long ago did you ask the Apple engineers? I haven't tried this piece of code with Snow Leopard actually... On Mon, Sep 7, 2009 at 3:29 PM, Graham Lee wrote: > On Sep 7, 2009, at 20:02 , Edward Chan wrote: > >> Hello, >> >> I'm using KVO on a Distributed Object, and I am binding my U

Re: KVO on Distributed Objects with exception handling.

2009-09-07 Thread Edward Chan
Also, Did they explain why they didn't want to support it? Thanks, Ed On Mon, Sep 7, 2009 at 4:45 PM, Edward Chan wrote: > Great... > > How long ago did you ask the Apple engineers? I haven't tried this > piece of code with Snow Leopard actually... > > > On Mon, Sep 7, 2009 at 3:29 PM, Graham Le

Need simple port scan

2009-09-07 Thread Ashley Perrien
I'm very new to networking via cocoa and need to develop a small port scanner application. The core of it is very simple, is address 1.2.3.4 listening on port X. I've done a bit of looking on NSStream, pipes, tasks and such but hopefully what I'm trying to get is a short and sweet. What spe

Re: completion handlers?

2009-09-07 Thread Jens Alfke
On Sep 7, 2009, at 1:08 PM, Gabriel Zachmann wrote: It seems to me that Blocks in SL are exactly the same thing as "Closures" in Smalltalk -- is that correct? Actually, Smalltalk calls them "blocks" too — that's where Obj-C, and Ruby, got the name from. (The Obj-C object model has always b

Re: Menu Weirdness (can't set command + 3 or command + 4)

2009-09-07 Thread Jens Alfke
On Sep 7, 2009, at 1:37 PM, Chilton Webb wrote: I have a situation where if I try to set the key equivalent of a menu to 3 or 4, it just won't happen. any other number--it works just fine. There are probably some other menu commands that already have those key equivalents. I suspect the

NSLineBreakByClipping is not clipping

2009-09-07 Thread Seth Willits
I'm drawing an attributed string with drawInRect which is documented to clip to the rect you pass in. The line break mode of the paragraph style is NSLineBreakByClipping. If the string's text is too wide for the rect (even by a lot), it draws outside of the rect. I've noticed that this on

Re: Need simple port scan

2009-09-07 Thread Peter Duniho
On Sep 7, 2009, at 1:56 PM, Ashley Perrien wrote: I'm very new to networking via cocoa and need to develop a small port scanner application. The core of it is very simple, is address 1.2.3.4 listening on port X. I've done a bit of looking on NSStream, pipes, tasks and such but hopefully wha

NSKeyedUnarchiver and memory management

2009-09-07 Thread DKJ
I included this method in the MyObject class as part of implementing the NSCoder protocol: - (id)initWithCoder:(NSCoder *)aDecoder { self = [super init]; theData = [[aDecoder decodeObjectForKey:@"theData"] retain]; return self; } This is how I read the object from disk:

Re: NSKeyedUnarchiver and memory management

2009-09-07 Thread DKJ
P.S. Doing the autorelease thing gave me an EXC_BAD_ACCESS too. And theData is released in the dealloc method of MyObject. dkj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the li

Re: (no subject)

2009-09-07 Thread Bryan Henry
According to the memory management rules, yes, you own the object returned by that method and you should therefore release it. "You take ownership of an object if you create it using a method whose name begins with “alloc” or “new” or contains “copy” (for example, alloc,newObject, or mutabl

Re: Need simple port scan

2009-09-07 Thread Ashley Perrien
I'm very new to networking via cocoa and need to develop a small port scanner application. The core of it is very simple, is address 1.2.3.4 listening on port X. Does it have to be a Cocoa API? You should be able to use the Unix BSD sockets API, which IMHO if you're looking for "short and

Anti-aliasing in Snow Leopard (10.6) PDFView

2009-09-07 Thread Duncan McGregor
It used to be that PDFView anti-aliased nicely. Now it doesn't, at least not for some files. Text and scans rendered in both the PDKKitViewer and PDFLinker2 samples are horrible in 10.6. I understand that shouldAntiAlias defaults to true, but even setting it explicitly does not seem to help. The d

Re: Need simple port scan

2009-09-07 Thread Greg Guerin
Ashley Perrien wrote: I'm very new to networking via cocoa and need to develop a small port scanner application. Why do you need this port scanner? Are you going to distribute it, or just run it yourself? Is it a class project or assignment? Does it absolutely have to be Cocoa? If so

Re: Need simple port scan

2009-09-07 Thread Brent Gulanowski
Deusty: AsyncSocket 4.3.4 Just create an instance with your address and port and connect with a timeout. It's not conclusive proof of a port being open or closed (there's no way to get

(no subject)

2009-09-07 Thread Colin Deasy
Does the returned obj from this method: - (NSCollectionViewItem *)newItemForRepresentedObject:(id)object require a release? ThanksColin _ Share your memories online with anyone you want. http://www.microsoft.com/ireland/windows/windo

NSImage rotation regression?

2009-09-07 Thread Marco S Hyman
This image rotation code works when compiled with the 10.5 SDK (64-bit, garbage collected). - (NSImage *) rotateImage: (NSImage *) anImage byDegrees: (CGFloat) degrees { // create an image for the rotated size NSSize originalSize = [[anImage bestRepresentationForDevice:nil]

Re: Turn on zombies in user environment?

2009-09-07 Thread Graham Cox
On 08/09/2009, at 5:27 AM, Kyle Sluder wrote: IIRC the default shell on Jaguar and earlier was tcsh. If you've upgraded your Mac throughout the ages, that might have stuck. --Kyle Sluder Indeed, it was set to tcsh. I have upgraded a few times but I generally set up a new Mac by copying

Re: NSKeyedUnarchiver and memory management

2009-09-07 Thread Graham Cox
On 08/09/2009, at 7:53 AM, DKJ wrote: - (id)initWithCoder:(NSCoder *)aDecoder { self = [super init]; theData = [[aDecoder decodeObjectForKey:@"theData"] retain]; return self; } This is how I read the object from disk: MyObject *myob = [NSKeyedUnarchiver unarchiveObject

Strangest UITable bug

2009-09-07 Thread Development
Ok I have the weirdest UITableViewBug.. I've set up the delegate, datasource, etc. My data appears correctly in the table. HOWEVER, when I click the table once, it ignores the first click. Then, if I click it again on a different cell, it shows that I clicked the previous cell. In fact each

Re: NSImage rotation regression?

2009-09-07 Thread Erik Buck
The -bestRepresentationFirDrevice: method is doing nothing better than [anImage size] would do for you. You are not doing anything useful with rotatedSize in your code. Your test for if (degrees == 180.0) is completely pointless. If you were going to do it anyway, you should be looking for 9

Re: NSImage rotation regression?

2009-09-07 Thread Marco S Hyman
On Sep 7, 2009, at 2:16 PM, Erik Buck wrote: The -bestRepresentationFirDrevice: method is doing nothing better than [anImage size] would do for you. Correct in its first use, incorrect for it's second use. That doesn't resolve the issue. You are not doing anything useful with rotatedSize

Re: Strangest UITable bug

2009-09-07 Thread Hank Heijink (Mailinglists)
Do you want help guessing or help solving? If you're after the latter, you should post your code. Hank On Sep 7, 2009, at 9:10 PM, Development wrote: Ok I have the weirdest UITableViewBug.. I've set up the delegate, datasource, etc. My data appears correctly in the table. HOWEVER, when I c

UIWebView height calculation

2009-09-07 Thread Dragos Ionel
Hi, 1. I am trying to find how much text fits in a UIWebView of a certain size (let's say 320x400). For this, I am using a UIWebViewDelegate in the following way: - (void)webViewDidFinishLoad:(UIWebView *)webView{    //...   CGSize size = [webView sizeThatFits:CGSizeZero];   int h = size.height

Re: UIWebView height calculation

2009-09-07 Thread Alex Kac
- (void) webViewDidFinishLoad:(UIWebView *)sender { [self performSelector:@selector(calculateWebViewSize) withObject:nil afterDelay:0.1]; } - (void) calculateWebViewSize { //size the notes view float newHeight = [[notesWebView stringByEvaluatingJavaScriptFromString :@"document.doc

Re: Menu Weirdness (can't set command + 3 or command + 4)

2009-09-07 Thread Andy Lee
On Sep 7, 2009, at 5:31 PM, Jens Alfke wrote: On Sep 7, 2009, at 1:37 PM, Chilton Webb wrote: I have a situation where if I try to set the key equivalent of a menu to 3 or 4, it just won't happen. any other number--it works just fine. There are probably some other menu commands that alread

Re: Menu Weirdness (can't set command + 3 or command + 4)

2009-09-07 Thread Andy Lee
On Sep 7, 2009, at 10:35 PM, Andy Lee wrote: On Sep 7, 2009, at 5:31 PM, Jens Alfke wrote: On Sep 7, 2009, at 1:37 PM, Chilton Webb wrote: I have a situation where if I try to set the key equivalent of a menu to 3 or 4, it just won't happen. any other number--it works just fine. There a

NSImage with Core Foundation Console Application failed?

2009-09-07 Thread DairyKnight
Hi all, I'm trying to use NSImage in a Cocoa Console App, but every time I tried to save the NSImage into a file through NSImageRep, it failed with NSData.length = 0. This is what I did: NSImage *surface = [[NSImage alloc] initWithSize:NSMakeSize(786 * 2, 1144 * 2)]; NSBitmapImageRep *jpgRep =

Re: NSImage with Core Foundation Console Application failed?

2009-09-07 Thread Kyle Sluder
On Sep 7, 2009, at 8:08 PM, DairyKnight wrote: NSBitmapImageRep *jpgRep = [NSBitmapImageRep imageRepWithData:[surface TIFFRepresentation]]; Is -TIFFRepresentation returning nil? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: KVO on Distributed Objects with exception handling.

2009-09-07 Thread Scott Anguish
In spite of the fact that it might be working, it isn't supported. When I talked to engineering about this, this is what I was told. He was a bit shocked it worked at all, and it isn't tested as part of releases. On Sep 7, 2009, at 3:02 PM, Edward Chan wrote: Hello, I'm using KVO on a

Re: KVO on Distributed Objects with exception handling.

2009-09-07 Thread Scott Anguish
On Sep 7, 2009, at 4:45 PM, Edward Chan wrote: Great... How long ago did you ask the Apple engineers? I haven't tried this piece of code with Snow Leopard actually... It still isn't supported in SL. I'd be shocked if it ever is. ___ Cocoa-dev m

NSController's class accessing NSDocument methods

2009-09-07 Thread BareFeet
Hi all, I have a fairly simple app, with an Entity table and a DataRows table (each has a controller), set up using bindings (no Core Data). I've set it up so when I select an Entity in the Entities table, the DataRows table refreshes by calling my Entity.selection.dataRows accessor metho

Framework versioning and handling multiple OS SDK's?

2009-09-07 Thread aaron smith
Hey All, I've got a framework (GDKit) that I maintain - started writing it on 10.5. I'm running into something I'm not sure how to handle. -So far, everything I've been writing in GDKit links against 10.5, and applications I've been writing link against GDKit, and 10.5. -I have some new classes I

Re: NSImage rotation regression?

2009-09-07 Thread Ken Ferry
Hi Marco, I dropped the code below in a test app, and it seemed to work fine on 10.6 with 90 as the number of degrees. Perhaps you could make a full test app that demonstrates the issue? -Ken On Mon, Sep 7, 2009 at 4:21 PM, Marco S Hyman wrote: > This image rotation code works when compiled wi

Re: Menu Weirdness (can't set command + 3 or command + 4)

2009-09-07 Thread Chilton Webb
Hi guys! Mystery solved--it was something already assigned to that in a menu deep in a nested menu, inside the NIB. I had to comb through the designable.nib in a text editor, actually, to find it. So for future reference, not being able to set a menu can be caused by another menu item bei

Re: Menu Weirdness (can't set command + 3 or command + 4)

2009-09-07 Thread Andy Lee
On Sep 8, 2009, at 12:13 AM, Chilton Webb wrote: I realize it's not immediately evident, but I'm inside a for loop, and I'm checking to see if 'i' is less than 9 prior to doing this. If it is, in my original code, I would use @"%d", i there to increase the numbers as it goes down the list.

Re: Menu Weirdness (can't set command + 3 or command + 4)

2009-09-07 Thread Chilton Webb
Hi Andy and Jens, Thank you for your replies. It's not something system-wide, as I CAN set it to things like command +shift+3. That works fine, oddly enough. And if I set it to all of any one number, obviously it lets me set it to those numbers, even though they're already in use farther up

Re: Weird malloc error when dealing with lots of NSImage objects

2009-09-07 Thread DairyKnight
I found the problem. It seems rather than autoreleasing the outputBitmapRep, I should first CGImageReleasethe 'thickenedCGImg'. This creates a dilemma because thickenedCGImg lies inside a function. I have to change the function to return a CGImage instead. From Apple's Cocoa document, it says the

Re: Problem with LSSharedFileListInsertItemURL() usage. (API in LaunchServices/LSSharedFileList.h)

2009-09-07 Thread Parimal Das
The 'url' path is correct as it is adding my app to the login item list, I suspect that, as i am calling this method in awakeFromNib: , dock is getting created first and then the app is getting added in the login item list. Can you suggest some events, which can be called before app generates its