Re: NSSecureCoding with containers (or, is NSArray lying?)

2015-07-17 Thread Tony Parker
is to avoid calling +alloc or -initWithCoder: on an arbitrary class. The unarchiver would not call an arbitrary selector when decoding in the first place. Hope this helps, - Tony On Jul 17, 2015, at 6:03 AM, André Francisco andre.frate...@hotmail.com wrote: Hm. I was specifically thinking

Re: NSCoding vs NSSecureCoding

2014-06-18 Thread Tony Parker
Hi Sean, On Jun 18, 2014, at 9:42 AM, Sean McBride s...@rogue-research.com wrote: On Tue, 17 Jun 2014 08:22:40 -0700, Tony Parker said: NSKeyedArchiver and NSKeyedUnarchiver also support secure coding as of 10.9. Tony, Thanks for the details. Are there any issues in creating

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Tony Parker
is not really a factor in determining if it should adopt NSSecureCoding or not. If you run into a class which you wish adopted secure coding, then please file a bug. We do already have plenty of requests for NSColor, NSImage, and NSAttributedString. - Tony

preventing launch

2013-09-01 Thread Tony Giaccone
Is there a programatic way to prevent the launch of a particular application? I want to prevent certain applications under particular situations from starting up. Tony ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: archiving report

2013-02-27 Thread Tony Parker
reports. Yes, we do get them and we do listen to them. - Tony ___ 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(at)lists.apple.com Help

PackageMaker Unable to Change Content Permission

2012-08-13 Thread Tony S. Wu
Hi, I am trying to use PackageMaker to create a package for my application. This is the first time I opened up PackageMaker in Mountain Lion. I am running into a problem where the content permission cannot be changed to anyone else but me. I don't see any other users populated in the drop-down

Re: JSON validator for Xcode

2012-03-06 Thread Tony Parker
a more complete code sample. Thanks, - Tony Of course I can plow through the data structure by hand, but I was wondering if there is a way to get more data on just what the reason is why this data fails or if there is an OC friendly JSON validator out there in the wilds somwhere. TIA

Re: boundingRectWithSize problem?

2012-02-07 Thread Tony Pollard
/CategoriesObjC.git Cheers! Tony Pollard On 27 Jan 2012, at 11:26 am, Tony Pollard wrote: Good thought Tim, but for some reason it doesn't work in this case (both on 10.6 10.7). As you would expect, it is size/font sensitive so I can get the same failure result (for the sample text

Re: boundingRectWithSize problem?

2012-01-27 Thread Tony Pollard
that don't get their height calculated correctly. Tony On 26 Jan 2012, at 6:59 pm, Tim Schröder wrote: I had exactly the same problem and solved it by using the NSStringDrawingUsesDeviceMetrics option instead of NSStringDrawingDisableScreenFontSubstitution. Tim Am 25.01.2012 um 16:26

boundingRectWithSize problem?

2012-01-25 Thread Tony Pollard
it into a big hopper.{ CdctPhraseType = Transition; NSColor = NSCalibratedRGBColorSpace 0.227451 0.54902 0.258824 1; NSFont = LucidaGrande 9.00 pt. P [] (0x50bbd0) fobj=0x50b7b0, spc=2.85; } The resulting Rect is too short by about 9 pixels. Anyone had the same problem? Tony Pollard

Re: checking if directory is writable

2012-01-12 Thread Tony Arnold
) and handle the error gracefully than it is to try to figure out ahead of time whether the operation will succeed. (Sorry for the resend — my original reply only went to Rick, not the entire list) all the best, Tony -- Tony Arnold http://thecocoabots.com

Re: Does anyone else dislike Xcode 4?

2011-07-24 Thread Tony
Yep, only if it felt as good as VS 2010 IDE, we would be having discussions on Cocoa and not the IDE. -tony -Original Message- From: Gary L. Wade Sent: Sunday, July 24, 2011 11:13 AM To: Julie Seif Cc: cocoa-dev@lists.apple.com Subject: Re: Does anyone else dislike Xcode 4? Yes

finder eject images

2011-07-04 Thread Tony Romano
Not quite a cocoa questionŠ By chance, does somewhere know where the images are for the eject button in finder. I looked in /system/library/coreservices/finder and they are not bundled with it. I'd prefer the Mac OS X versions and not some 3rd party. Thanks in advance. Tony Romano

Re: finder eject images

2011-07-04 Thread Tony Romano
Lee Ann and Patrick, thank you! I suspect the one from ../coreservices/menu extras/Eject.menu uses the character set one as well. They converted to a pdf for displaying as an image. Again, thank you. Tony Romano On 7/4/11 12:52 PM, Lee Ann Rucker lruc...@vmware.com wrote: That's

Finder context menu behavior

2011-06-24 Thread Tony Romano
enough. Thanks, Tony Romano ___ 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(at)lists.apple.com Help/Unsubscribe/Update your

Re: If No Memory Leaks, Is It Good Enough for Memory Management?

2011-06-20 Thread Tony Romano
for Heapshot analysis. Tony Romano On 6/20/11 12:28 AM, Bing Li lbl...@gmail.com wrote: Dear all, I am still a new programmer of Cocoa. In my program, at least right now, there are no memory leaks according to Instruments. Is it good enough for memory management? What I designed is a TCP

Re: Automatically mirroring folders

2011-06-20 Thread Tony Romano
, but they have limits. Not as robust as I've seen elsewhere. HTH, Tony Romano On 6/20/11 12:53 AM, Matt Gough devlists...@gmail.com wrote: Can you not make use of: kFSEventStreamCreateFlagIgnoreSelf Ignore events generated by this client. For example, an application might want to watch for changes

This code is leaking...

2011-06-19 Thread Tony Cate
count 2 after the initWithData:? Should I file a bug? Tony ___ 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(at)lists.apple.com Help

Re: Synthesised properties and additional actions

2011-06-19 Thread Tony Romano
are writing the setter anyways. Tony Romano On 6/19/11 11:02 AM, Dave DeLong davedel...@me.com wrote: On Jun 19, 2011, at 11:01 AM, Matt Neuburg wrote: I provide a good (I think) technique for doing this in my book (p. 275, example 12-5 Overriding synthesized accessors). You can also download sample

Re: Weird behavior of -URLByAppendingPathComponent:

2011-06-19 Thread Tony Romano
: If the original URL does not end with a forward slash and pathComponent does not begin with a forward slash, a forward slash is inserted between the two parts of the returned URL, unless the original URL is the empty string. It puts the slash in. Tony Romano On 6/19/11 9:14 PM, Jens Alfke j

Re: Drawing focus rings

2011-06-18 Thread Tony Romano
You will need this as well. - (BOOL) resignFirstResponder { ... // Invalidate the area around the focus ring [self setKeyboardFocusRingNeedsDisplayInRect:[self bounds]]; ... } Tony Romano On 6/18/11 10:19 AM, Lee Ann Rucker lruc...@vmware.com wrote: From the sample code

Re: FSEvents - handling kFSEventStreamEventFlagRootChanged flag

2011-06-16 Thread Tony Romano
at will. HTH, Tony Romano On 6/16/11 3:33 AM, Ajay Sabhaney co...@mothercreative.com wrote: Hello, I have setup an FSEventStream so that I can monitor a directory for file changes. If the root directory that is being watched is moved/renamed, I want to be able to keep monitoring the directory. I am

Re: After Autoreleasing Still Getting Leaked

2011-06-16 Thread Tony Romano
No, I meant to use packet since I was speaking in terms at the protocol level. In either case, your explanation is helpful to Bing but I fear he is new to socket level programming and will stumble with other issues as well. Your advice to use some framework is what he should follow. Tony

Re: NSDragOperation for operationNotAllowedCursor !!

2011-06-15 Thread Tony Romano
Return this NSDragOperationNone is validateDrop: Tony Romano On 6/15/11 7:48 AM, Naresh Kongara nkong...@apple.com wrote: Hi, I'm working on a cocoa application, which is like a file browser similar to finder. In this application we implemented drag and drop of files/folder. we

Re: After Autoreleasing Still Getting Leaked

2011-06-15 Thread Tony Romano
:-). Tony Romano On 6/15/11 2:20 PM, Scott Ribe scott_r...@elevated-dev.com wrote: On Jun 15, 2011, at 2:30 PM, Jens Alfke wrote: On Jun 15, 2011, at 1:26 PM, Bing Li wrote: Actually, I attempt to design P2P system using Cocoa. Meanwhile, the peer on Mac OS X must communicate with some Java

Re: Memory Management for an Array

2011-06-13 Thread Tony Romano
a bona-fide growth. Tony Romano On 6/13/11 7:31 AM, Bing Li lbl...@gmail.com wrote: Dear Tito, Scott and all, Thanks so much for your replies! I think the memory management in my system is much better. I just used Instruments to check potential leaks. To my surprise, I was still

NSFileHandle and Data Integrity

2011-06-10 Thread Tony S. Wu
resulting in damaged data. What would be an ideal way to stop this from happening? I'd appreciate any recommendation. Thanks. Tony S. Wu tonyswu@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Archiving / Unarchiving Question

2011-06-02 Thread Tony S. Wu
Thanks for all the suggestions. Dave was right, the class was not included in the server target (bang my head). Using XML, however, does seem to make more sense, so I will look into that as well. Thanks a lot, Tony S. Wu tonyswu@gmail.com On Jun 2, 2011, at 12:26 AM, Jens Alfke wrote

Archiving / Unarchiving Question

2011-06-01 Thread Tony S. Wu
really important in my code. I would appreciate any help. Thanks, Tony S. Wu tonyswu@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: Archiving / Unarchiving Question

2011-06-01 Thread Tony S. Wu
Hi, It's NSInvalidUnarchiveOperationException, reason is *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (DataObject) Tony S. Wu tonyswu@gmail.com On Jun 1, 2011, at 6:28 PM, Roland King wrote: On Jun 2, 2011, at 9:23, Tony S. Wu tonyswu.mailingl

Synthesize getter in a NSThread

2011-05-21 Thread Tony Romano
-Code.git -tony ___ 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(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http

Re: Synthesize getter in a NSThread

2011-05-21 Thread Tony Romano
release). Still not sure what the problem is. Tony Romano On 5/21/11 6:58 PM, Ken Thomases k...@codeweavers.com wrote: On May 21, 2011, at 3:27 PM, Tony Romano wrote: I am running into an issue using a synthesized getter in a thread. Observing memory consumed by the application in Activity

Re: Synthesize getter in a NSThread

2011-05-21 Thread Tony Romano
Yes, allocating the pool in the loop in conjunction with the drain did the trick. It wont be too bad in the actual code because my thread is not free running with a while(1), I use a condition lock. Thanks for the help guys. Tony Romano On 5/21/11 8:31 PM, Roland King r...@rols.org wrote

[NSMenu _enableItem} crash

2011-05-04 Thread Tony Cate
the mainMenu. I'm not. Any help with this problem would be greatly appreciated. Tony ___ 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

Re: Debugging a sleepless Mac

2011-03-16 Thread Tony Romano
Not sure if it was mentioned, but did you look at the /var/log/DiagnosticMessages log, it should have all the sleep activity messages. Tony Romano On 3/16/11 11:36 AM, Michael Nickerson darkshado...@mac.com wrote: On Mar 16, 2011, at 8:37 AM, Matt Gough wrote: I've just been

Re:[Solution] Preventing a window from moving while dragging a view.

2010-10-07 Thread Tony Romano
I found what I needed to do. Implement in the custom view: - (BOOL)mouseDownCanMoveWindow { return NO; } Tony Romano http://www.cocoaegghead.com On Oct 6, 2010, at 11:13 AM, Tony Romano wrote: I have a NSPanel with a NSToolbar and a tabless NSTabView to create an inspector

Preventing a window from moving while dragging a view.

2010-10-06 Thread Tony Romano
prevent the Panel from moving during the drag operation? Do I need to use a modal loop? Thanks! Tony Romano http://www.cocoaegghead.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Crash in NSBinder

2010-09-30 Thread Cate Tony
this, let alone debug it. Has anyone seen this or have an idea what could be going on? Tony 3 Cats And A Mouse http://www.3caam.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: NSOutlineView

2010-09-09 Thread Tony Romano
What he is referring to is using a NSTreeController. You bind the controller to the NSOutlineView and provide KVC compliant methods to enumerate the children and it can optionally create nodes for you as well. Check out the sample SourceView from Apple. Tony Romano http

recalling the original view height

2010-09-07 Thread Tony Romano
or do I simply cache the value? I get worried with cached values because of some special situations that are dynamic. However, I think the original value is gone once I resize it. I tried search for this answer but its tough to refine the search on this one. Thanks so much. Tony Romano http

Re: recalling the original view height

2010-09-07 Thread Tony Romano
Thanks, this is what I suspected. Tony Romano http://www.cocoaegghead.com On Sep 7, 2010, at 2:03 PM, John C. Randolph wrote: Views have no storage for previous frame or bounds rectangles. If you want to remember them, you'll need to save them yourself. -jcr

Re: iTunes 10 UI

2010-09-02 Thread Tony Romano
The controls used in the title bar are NSThemeWidgets and not your standard button. It appears that many functions are overridden to control behavior. Your best best is to hide the standard controls and place your own buttons there. This is what I have done for my Inspector Panel. Tony

Re: Making an NSMethodInvocation from the current method

2010-08-21 Thread Tony Romano
Use GCD. dispatch_sync(dispatch_get_main_queue(), ^{ // Call your function here MyFunction (param 1, param2, ...); }); Tony Romano http://www.cocoaegghead.com On Aug 21, 2010, at 10:03 PM, Roland King wrote: Is there a built

Re: concludeDragOperation

2010-08-16 Thread Tony Romano
the code for section that implement the drag/drop parts and any mouse overrides? -Tony On Aug 16, 2010, at 6:28 PM, Erik Buck wrote: I have never seen the specific problem reported, but I have some suggestions: 1) Are you using a retained or non-retain window as opposed to a buffered window

SMTP Framework for Cocoa

2010-08-13 Thread Tony S. Wu
Hi, Is there a easy to use framework for sending email via SMTP authentication? I did a some searchings and found MailCore, Pantomime, EdMessage, but they all seem quite out-dated to me. Thanks. Tony S. Wu tonyswu@gmail.com___ Cocoa-dev mailing

NStoolbarItem, custom view, setAction:

2010-08-09 Thread Tony Romano
they set some bits on creation and look at the bit setting instead of calling respondsToSelector every time. Anyone have any ideas as to why I can't use a custom view derived from NSView? Thanks, -Tony ___ Cocoa-dev mailing list (Cocoa-dev

Re: NStoolbarItem, custom view, setAction:

2010-08-09 Thread Tony Romano
on the developer to do custom work. I wanted to do some work and need to track the mouse messages. It would have been much simpler if it was derived from the view and I could over-ride the methods. Thanks for confirming this Peter, -Tony On Aug 9, 2010, at 5:51 PM, Peter Ammon wrote: On Aug

NStoolbaritem and a custom view

2010-08-06 Thread Tony Romano
For NSToolbarItem and a custom view, do you need to call the selector for the action or is that handled automatically? I think it's not handled automatically because I have to handle the mouse events to update the drawing so I assume by calling super, it won't invoke the action because I

Re: NSPanel, changing the look of the min button

2010-08-03 Thread Tony Romano
; [disclosureTriangle setFrame:minFrame]; } -Tony On Aug 3, 2010, at 6:46 AM, Uli Kusterer wrote: Am 03.08.2010 um 00:31 schrieb Tony Romano: Changing the argument to the correct flag gets me the button, however, setting the style doesn't have any effect. I moved the code to initWithContentRect: post

NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
or should I be looking at a completely different path? I know one alternatively is to completely write my own header and draw things the way I want. The second question is, how do I completely hide the resize button, it's disabled via IB, but the button still shows(albeit disabled). Thanks, -Tony

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
Im not trying to disregard the HIG. The panel is the basis for an inspector(s) for properties for a drawing application. Looking at other well known applications, it seemed there is precedence. If that precedence is wrong, I won't follow it. Please advise. -Tony On Aug 2, 2010, at 2:58 PM

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
style I set but the window still draws the standard widget. Any other ideas? -Tony On Aug 2, 2010, at 2:53 PM, Kyle Sluder wrote: On Aug 2, 2010, at 2:47 PM, Tony Romano tony...@hotmail.com wrote: NSButton *minButton = [[self window] standardWindowButton:NSMiniaturizableWindowMask

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
displayed without hiding the panel. I have this functionality via menu/keybindings but wanted to add a widget on the panel as another method. -Tony On Aug 2, 2010, at 3:36 PM, Kyle Sluder wrote: On Mon, Aug 2, 2010 at 3:31 PM, Tony Romano tony...@hotmail.com wrote: Changing the argument

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
! -Tony On Aug 2, 2010, at 3:51 PM, Quincey Morris wrote: On Aug 2, 2010, at 15:31, Tony Romano wrote: Changing the argument to the correct flag gets me the button, however, setting the style doesn't have any effect. I moved the code to initWithContentRect: post the call to super, still

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
idea was to change the way the button looks and give it a new behavior. -Tony On Aug 2, 2010, at 4:22 PM, Kyle Sluder wrote: On Mon, Aug 2, 2010 at 4:16 PM, Tony Romano tony...@hotmail.com wrote: Honestly guys, I have no devious motives here ! :-) I am not trying to take any shortcuts, I am

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
won't be so bad. I need to try that. It avoids the proximity issue with the standard button. Sorry on the confusion with Precedence/Precedents. I need slow down. Again, super thanks for the feedback. -Tony On Aug 2, 2010, at 4:43 PM, Quincey Morris wrote: On Aug 2, 2010, at 16:16, Tony Romano

Re: drawingRectForBounds not being called

2010-07-31 Thread Tony Romano
having an outlet to the control have any affect on this method getting called. Something weird is going on. -Tony On Jul 30, 2010, at 4:05 PM, Tony Romano wrote: @interface ViewStatusTextCell : NSTextFieldCell - (NSRect)drawingRectForBounds:(NSRect)theRect; @end - (NSRect

drawingRectForBounds not being called

2010-07-30 Thread Tony Romano
that the instance of NSTextField is using my custom cell. I can invoke my method via F-Script as well. 3. Verified the correct spelling and signature of the method. Anyone have other ideas as to what I am overlooking? Thanks, -Tony ___ Cocoa-dev

Re: drawingRectForBounds not being called

2010-07-30 Thread Tony Romano
at 3:38 PM, Tony Romano tony...@hotmail.com wrote: I have an NSTextTextField in my nib that is using a custom NSTextFieldCell (set in IB) class that has only one method over-riden, drawingRectForBounds. The method is not being called. This is what I have done. 1. Set a break point to verify

redraw problem

2010-07-29 Thread Tony Romano
during observing the keypath changes to grid values. Not sure what other information is needed. Please let me know, Thanks in advance, -Tony ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: redraw problem

2010-07-29 Thread Tony Romano
line don't leave any residuals. Changing the setLineWidth prior to any drawing doesn't have any affect on the problem. Didn't think it would as I understand the attributes are not applied until the stroke happens. I'll look into Quartz debug. On Jul 29, 2010, at 3:54 PM, Tony Romano wrote

Re: redraw problem

2010-07-29 Thread Tony Romano
That was it Michael. Thank you. On Jul 29, 2010, at 9:19 PM, Michael Ash wrote: On Thu, Jul 29, 2010 at 4:26 PM, Tony Romano tony...@hotmail.com wrote: I have a document based Cocoa App and I am trying to understand what is causing these residual lines to happen. Attached is a link to what

UIImage Color Overlay

2010-07-21 Thread Tony S . Wu
quite the same, and the image only draws over part of the view. Any idea? Thanks. Tony S. Wu tonyswu.mailingl...@gmail.com___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: Debugger hangs?

2010-07-21 Thread Tony Romano
it to access violate. Submit that log with a bug. HTH, -Tony On Jul 21, 2010, at 1:12 PM, Charlie Dickman wrote: I have turned the data formatters off and the debugger continues to get EXC_BAD_ACCESS while stepping through code. It then times out fetching data and everything is hosed

NSUserDefaultsController and a document app.

2010-07-15 Thread Tony Romano
document window is unique. One approach I thought of is to have a section in the plist for each document window, since they appear to be unique. Any other thoughts on how this may be accomplished? Thanks, -Tony ___ Cocoa-dev mailing list (Cocoa-dev

Re: NSTextView retain count and HICocoaView problems

2010-07-15 Thread Tony Romano
, force the leak, then examine how the retains/released paired up. You'll find it. Instruments is a very nice tool. -Tony On 7/15/10 3:30 PM, Ryan Joseph wrote: On Jul 15, 2010, at 4:25 PM, Kyle Sluder wrote: On Wed, Jul 14, 2010 at 9:39 AM, Ryan Josephr...@thealchemistguild.org wrote

NSResizableWindowMask and view update

2010-07-12 Thread Tony Romano
not flipped and not the same as my view bounds. I don't want to leave the additional setNeedsDisplay because it flickers. Anyone know why this is? If more info is needed, please let me know. TIA, -Tony ___ Cocoa-dev mailing list (Cocoa-dev

Re: NSResizableWindowMask and view update

2010-07-12 Thread Tony Romano
Yep, overlooked that the drawRect will give me the dirty rect. Because the sizing handle is diagonal to the origin (0,0), it looked like it wasn't flipped. Fix the problem by one missing multiply in a calculation. Thanks and it's time to call it day! -Tony On Jul 12, 2010, at 4:54 PM

Re: Finder-like conversion of a fileURL to 'user-friendly' path

2010-07-01 Thread Tony Romano
, use the NSPathControl. -Tony On 7/1/10 10:58 AM, Rainer Standke wrote: That helps, to get rid of the 'file://localhost' part. What about the addition of the drive name? Thanks, Rainer On Jul 1, 2010, at 10:33 , Kevin Wojniak wrote: Use -[NSURL path] to get the unix-style path format

Using NSImage to render the view

2010-07-01 Thread Tony Romano
drawAtPoint:NSMakePoint(0, 0) fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; [anImage release]; // for now. } Thanks people, -Tony ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Using NSImage to render the view

2010-07-01 Thread Tony Romano
bounding rectangle and not rely on scaling. Thanks for the detailed reply Graham. -Tony On 7/1/10 6:55 PM, Graham Cox wrote: On 02/07/2010, at 11:29 AM, Tony Romano wrote: I have a view who's bounding rectangle has been normalize to make drawing a grid easier. It' bounds is set to ~1x1

Re: inference of block return type

2010-06-28 Thread Tony Romano
Did you happen to read this link? It's clearly documented in the section Declaring and Using a Block. HTH. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html -Tony On 6/28/10 9:51 AM, Matt Neuburg wrote: I'm curious about

Re: inference of block return type

2010-06-28 Thread Tony Romano
that had precedence but use the new symbol ^(only remaining operator that is not overloadable in C++) instead of *(btw, that wasn't a block with a void return type :-). Anyhows, I no longer think this is a cocoa question... -Tony On 6/28/10 2:41 PM, Michael Ash wrote: On Mon, Jun 28, 2010 at 4

Re: C arrays as __block variables

2010-06-27 Thread Tony Romano
W W W -Tony On Jun 26, 2010, at 9:19 PM, Bill Bumgarner wrote: On Jun 26, 2010, at 9:14 PM, Tony Romano wrote: That's why I asked for an example of what the op question is http://lists.apple.com/archives/cocoa-dev/2010/Jun/msg01040.html This would seem

Re: C arrays as __block variables

2010-06-27 Thread Tony Romano
The reason for the __block specifier is to allow the variable to be written to. If the variable remains a const, then the complier can optimize how the block is stored. If the data is changed, much of the optimization is lost. -Tony On Jun 26, 2010, at 8:56 PM, Kyle Sluder wrote: On Sat

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
? -Tony On Jun 26, 2010, at 7:16 PM, Bill Bumgarner wrote: On Jun 26, 2010, at 6:38 PM, Matt Neuburg wrote: The docs say: There are two further restrictions on __block variables: they cannot be variable length arrays, and cannot be structures that contain C99 variable-length arrays

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
I understand all that. I was providing an example to seek clarity in his question. But I understand what he is asking now, thanks. -Tony On Jun 26, 2010, at 7:50 PM, Dave DeLong wrote: That's going to create a new copy of the array every time the block is executed, and the array

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
have a __block variable inside a block that is fixed length array and I can access it via NSLog(@char %c, array1[0]); Please post the example you are having problems with. Thanks, -Tony On Jun 26, 2010, at 8:16 PM, Bill Bumgarner wrote: On Jun 26, 2010, at 7:48 PM, Tony Romano wrote

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
That's why I asked for an example of what the op question is Sent from my phone, Thanks Tony On Jun 26, 2010, at 8:56 PM, Kyle Sluder kyle.slu...@gmail.com wrote: On Sat, Jun 26, 2010 at 8:51 PM, Tony Romano tony...@hotmail.com wrote: OP posted: This would seem to imply that a __block

Re: NSMenuDelegate menuDidClose called before NSMenuItem's action?

2010-06-25 Thread Tony Romano
get your object back. Ref counting should be straight forward. HTH, -Tony On Jun 25, 2010, at 4:16 PM, Peter Ammon wrote: Unfortunately this isn't as easy as it should be. Since the menu action can do anything, including trigger menu tracking again, it really does need to happen last

Re: raising NSException between Controllers

2010-06-20 Thread Tony Romano
What does the code for this look like, [controller2 haltBgCalculationThread:withStatus];? Are both your threads, thread safe? Are the controllers your controllers or a Cocoa derived one from (NSController, .etc)? -Tony On Jun 19, 2010, at 3:35 PM, John Love wrote: I am having inconsistent

Re: NSTreeController and insertObject:atArrangedObjectIndexPath:

2010-06-19 Thread Tony Romano
conditions it calls both, this is a bug. Sorry for all the details. -Tony On Jun 19, 2010, at 6:22 AM, Clark S. Cox III wrote: You should only need add your object to your model (which needs to me KVO compliant). The tree controller will then notice, in response to the KVO notification that a new

Re: autorelease: how does this work!? (if at all)

2010-06-18 Thread Tony Romano
they were added. The next job will not start until the previous one in the queue is completed. -Tony On Jun 18, 2010, at 8:36 AM, Julien Jalon wrote: Is the compiler/runtime being clever enough to retain it because it is going to be needed in the inner block (if so: very clever!)? Yes

Re: autorelease: how does this work!? (if at all)

2010-06-18 Thread Tony Romano
. -Tony On Jun 18, 2010, at 12:20 PM, Jonny Taylor wrote: First, the objects are retained by dispatch_async as others have mentioned. Second, I'm not sure why you used 2 queues for the tasks in your code, seems overly complex. Async queues are serialized, which means that you can continue

Re: autorelease: how does this work!? (if at all)

2010-06-18 Thread Tony Romano
be some trick I am not groc'ing within the snippet of code. Anyhow, I think the OP got the answer to his original question. -Tony On Jun 18, 2010, at 12:34 PM, Bill Bumgarner wrote: On Jun 18, 2010, at 12:09 PM, Tony Romano wrote: First, the objects are retained by dispatch_async as others

NSTreeController and insertObject:atArrangedObjectIndexPath:

2010-06-18 Thread Tony Romano
doesn't have the new node added from the file system). Anyone experience this before and have a recommendation? TIA, -Tony ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: NSTreeController and insertObject:atArrangedObjectIndexPath:

2010-06-18 Thread Tony Romano
successfully has the data). It still calls both the getter and the setter within this one call. This has to be is a bug and I will file it. It should only call the setter. -Tony On Jun 18, 2010, at 3:53 PM, Tony Romano wrote: Scenario: Adding a new node to a NSOutlineView backed

Re: DnD International No symbol

2010-06-17 Thread Tony Romano
and then the user knows to use NSCursor through clear documentation outlining DnD and cursor management. LOL, i'm not sure where to file a enhancement request. Anyways, thanks -Tony On Jun 17, 2010, at 3:48 PM, Corbin Dunn wrote: On Jun 16, 2010, at 7:19 PM, Tony Romano wrote: Hmm... I'm

Re: DnD International No symbol

2010-06-17 Thread Tony Romano
in the table. That's a clear doc bug which I will file. -Tony On Jun 17, 2010, at 9:01 PM, Andrew Merenbach wrote: I think one possible explanation for the lack of cursor changing with NSDragOperationNone is that [NSCursor operationNotAllowedCursor] appears to have been introduced in 10.6 (Snow

Re: Where to noteHeightOfRowsWithIndexesChanged

2010-06-16 Thread Tony P
somehow inferior to the PC version. It's an iPhone version next though, so I'll definitely have to re-think the UI for that. Thanks again, Tony Pollard On 15 Jun 2010, at 7:22 pm, Corbin Dunn wrote: On Jun 15, 2010, at 10:55 AM, Jens Alfke wrote: On Jun 15, 2010, at 10:51 AM, Jerry

Re: Where to noteHeightOfRowsWithIndexesChanged

2010-06-16 Thread Tony Romano
a methodical process to get all the people in sync or it could cost you money/downtime. -Tony On Jun 16, 2010, at 9:25 AM, Kyle Sluder wrote: On Jun 16, 2010, at 8:17 AM, Tony P to...@neutral.co.uk wrote: Thanks for all the responses folks. On 15 Jun 2010, at 7:22 pm, Corbin Dunn wrote: Do

DnD International No symbol

2010-06-16 Thread Tony Romano
but it is not defined as one of the NSDragOperation... flags. So I am thinking either this is not HIG compliant or it is and I just need to supply my own. I know I have seen other apps do it but it's doesn't been it's HIG compliant. Thoughts/Comments? Thanks! -Tony

Re: DnD International No symbol

2010-06-16 Thread Tony Romano
, the outlineview highlights the drop point. -Tony On Jun 16, 2010, at 7:11 PM, Kyle Sluder wrote: On Wed, Jun 16, 2010 at 6:55 PM, Tony Romano tony...@hotmail.com wrote: Briefly, in a DnD operation all the nodes selected need to be siblings of each other. During validateDrop I check

Where to noteHeightOfRowsWithIndexesChanged

2010-06-15 Thread Tony P
results so far (but still displays blank rows sometimes). There are usually about 200,000 rows, so calculating the actual height for all rows is not an option (since it takes about 19 seconds). Any ideas anyone? Tony ___ Cocoa-dev mailing list (Cocoa

Menu item binding hidden

2010-06-13 Thread Tony Romano
to find anything via a search. TIA, -Tony ___ 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(at)lists.apple.com Help/Unsubscribe/Update

Re: Menu item binding hidden

2010-06-13 Thread Tony Romano
Ok thanks Kyle and Gideon, I wanted to make sure there wasn't another way with a binding that I was over looking. -Tony On Jun 13, 2010, at 7:21 PM, Gideon King wrote: You might like to check out doing it using validateUserInterfaceItem: or validateMenuItem: HTH Gideon On 14/06

Re: NSOutlineView drag and drop problem

2010-06-11 Thread Tony Romano
. -Tony On Jun 10, 2010, at 10:24 PM, Graham Cox wrote: Thanks, but this is not the case. The validateDrop method returns a NSDragOperation value that I compute. That is not the same value that the [draggingInfo draggingSourceOperationMask] returns, though that is certainly one of the many

Re: NSOutlineView drag and drop problem

2010-06-10 Thread Tony Romano
It does. Making a call to draggingSourceOperationMask in your acceptDrop method will give you the operation that is active. No need to cache it. -Tony On Jun 10, 2010, at 11:12 AM, Jens Alfke wrote: On Jun 9, 2010, at 11:12 PM, Graham Cox wrote

NSTreeController method removeObjectAtArrangedObjectIndexPath

2010-06-02 Thread Tony Romano
with an NSOutlineview in this fashion and can shed some light on this? I've spent the better part of the day looking at this. In all cases my internal nodes are correct by looking at them from the debugger. TIA, -Tony ___ Cocoa-dev mailing list (Cocoa-dev

Re: Monster memory leak and I can't figure out why

2010-06-01 Thread Tony Romano
more than you think. -Tony Romano On May 31, 2010, at 6:41 PM, Ken Tozier wrote: Hi I'm trying to write a thumbnailer class that takes a path to a photo and creates a thumbnail at a user specified size. The code creates the thumbnails OK, but there's this monster memory leak

  1   2   >