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" wrote: >That's not the F

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 R

Finder context menu behavior

2011-06-24 Thread Tony Romano
Hopefully my explanation is clear 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.appl

Re: Automatically mirroring folders

2011-06-20 Thread Tony Romano
the are Kqueues, but they have limits. Not as robust as I've seen elsewhere. HTH, Tony Romano On 6/20/11 12:53 AM, "Matt Gough" wrote: >Can you not make use of: > >kFSEventStreamCreateFlagIgnoreSelf >"Ignore events generated by this client. For example, an appli

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

2011-06-20 Thread Tony Romano
Google for Heapshot analysis. Tony Romano On 6/20/11 12:28 AM, "Bing Li" 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?

Re: Weird behavior of -URLByAppendingPathComponent:

2011-06-19 Thread Tony Romano
RLAppendingPathComponent: "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

Re: Synthesised properties and additional actions

2011-06-19 Thread Tony Romano
u are writing the setter anyways. Tony Romano On 6/19/11 11:02 AM, "Dave DeLong" 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 accesso

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" wrote: >>From the sample code in ClockContr

Re: After Autoreleasing Still Getting Leaked

2011-06-16 Thread Tony Romano
Romano On 6/16/11 12:29 PM, "Jens Alfke" wrote: > >On Jun 15, 2011, at 7:01 PM, Tony Romano wrote: > >> TCP does NOT guarantee you will get the WHOLE PACKET on one receive >>call. >> BEFORE you PROCESS any data, you need to know that you have ALL the >>data.

Re: FSEvents - handling kFSEventStreamEventFlagRootChanged flag

2011-06-16 Thread Tony Romano
will. HTH, Tony Romano On 6/16/11 3:33 AM, "Ajay Sabhaney" 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 di

Re: After Autoreleasing Still Getting Leaked

2011-06-15 Thread Tony Romano
u are listening :-). Tony Romano On 6/15/11 2:20 PM, "Scott Ribe" 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 o

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" 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 >

Re: Memory Management for an Array

2011-06-13 Thread Tony Romano
, you have a bona-fide growth. Tony Romano On 6/13/11 7:31 AM, "Bing Li" 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

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" wrote: >

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" 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

Synthesize getter in a NSThread

2011-05-21 Thread Tony Romano
I am running into an issue using a synthesized getter in a thread. Observing memory consumed by the application in Activity Monitor, memory continues to grow ~200k per sample until the OS gives an Out Of Memory warning. If I code my own getter, the app behaves as expected. I have striped it down

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" wrote: > >On Mar 16, 2011, at 8:37 AM, Matt Gough wrote: > >> I&#x

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
do I 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 com

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

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.

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: 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
I assume you are letting the control actually highlight the selected rows? If you are, then all the highlight/un-highlights are handled automatically. Are u doing any sort of mouse tracking and highlighting code to determine which items are selected? Can you provide more info like just the cod

Re: NStoolbarItem, custom view, setAction:

2010-08-09 Thread Tony Romano
wrote: > > On Aug 9, 2010, at 5:37 PM, Tony Romano wrote: > > [...] >> >> >> Looking at the documentation for NSToolbarItem setAction:, it has a little >> note: "For a custom view item, this method calls setAction: on the view if >> it responds

NStoolbarItem, custom view, setAction:

2010-08-09 Thread Tony Romano
I'm trying to add a toolbar item that has a custom view. I suspect there is a bug with the NSToolbarItem setAction: method if I choose to use a basic custom view(derived from NSView). In my mouse down, calling [NSApp sendAction:[_toolbarItem1 action] to:[_toolbarItem1 target] from:_toolbarItem1

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 change

Re: NSPanel, changing the look of the min button

2010-08-03 Thread Tony Romano
me.origin.y +=1; [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 ha

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:

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
st my original 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 wrote: >> Honestly guys, I have no devious motives here ! :-) I am not trying to take >> any

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
reciate the feedback! -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 >

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
ntly being 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 wrote: >> Changing the argument to the c

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
bezel 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 wrote: > >> NSButton *minButton = [[self window] >> standardWindowButton:NSMiniaturizableWindowMask]

Re: NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
58 PM, John Joyce wrote: > > On Aug 2, 2010, at 4:47 PM, Tony Romano wrote: > >> I have an NSPanel and I want to change the look of the min button and >> completely hide the resize button. The min button I want to make into a >> bezel style of a disclosure triangle.

NSPanel, changing the look of the min button

2010-08-02 Thread Tony Romano
I have an NSPanel and I want to change the look of the min button and completely hide the resize button. The min button I want to make into a bezel style of a disclosure triangle. I am using this line of code to access the min button but it returns nil in my controllers' windowDidLoad. NSBu

Re: drawingRectForBounds not being called

2010-07-31 Thread Tony Romano
hould 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; > >

Re: drawingRectForBounds not being called

2010-07-30 Thread Tony Romano
, 2010 at 3:38 PM, Tony Romano 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

drawingRectForBounds not being called

2010-07-30 Thread Tony Romano
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 it is not being called. 2. Using F-Script, verified

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 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 li

Re: redraw problem

2010-07-29 Thread Tony Romano
blue 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,

redraw problem

2010-07-29 Thread Tony Romano
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 I am referring to. The solid blue lines are the new lines after they have moved. The greyish lines are what's being left behind. http://dl.dropbox.com/u/5

Re: Debugger hangs?

2010-07-21 Thread Tony Romano
There is an issue the XCode front end has accessing variables for display. The formatters are used not only for the variable window but also others areas such as tool-tips. I filed a bug against this a few weeks ago(Bug# 8128556) To me the wrong approach is to turn off the formatters, this ma

Re: NSTextView retain count and HICocoaView problems

2010-07-15 Thread Tony Romano
The reason dealloc is not being called is because you still have a retain count > 0. In cases like this, personally, I always assume my code is at fault. Once I have exhausted all known techniques trying to resolve the discrepancy then I escalate it. Your best bet is to use Instruments, forc

NSUserDefaultsController and a document app.

2010-07-15 Thread Tony Romano
I have a document based cocoa app. I am using a NSUserDefaultsController to bind the properties of the document to defaults values. This all works. Since the controller defaults are 'shared', one side effect is every document window inherits the defaults even though the object for each docum

Re: NSResizableWindowMask and view update

2010-07-12 Thread Tony Romano
at 4:54 PM, Kyle Sluder wrote: > On Mon, Jul 12, 2010 at 4:41 PM, Tony Romano wrote: >> During the setStyleMask, the view is sent a drawRect message which is >> expected. But the values in the rect are not flipped and are not the view >> bounds. > > So? The rect argument

NSResizableWindowMask and view update

2010-07-12 Thread Tony Romano
I have a document based cocoa app with each document window having it's own window controller and view(the view is flipped). I have an option to turn on/off the resize grip and I set the mask using setStyleMask. All this works fine. During the setStyleMask, the view is sent a drawRect message

Re: Using NSImage to render the view

2010-07-01 Thread Tony Romano
the view's 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&#x

Using NSImage to render the view

2010-07-01 Thread Tony Romano
I have a view who's bounding rectangle has been normalize to make drawing a grid easier. It' bounds is set to ~1x1. Currently I can draw the grid and what ever curve I want just fine. What I am trying to do is draw into a NSImage and render it in the view and cache the image so I can also sa

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

2010-07-01 Thread Tony Romano
NSFileManager's mountedVolumeURLsIncludingResourceValuesForKeys:options will give you the names of the volumes. Use this plus the path to build your own version of the a display string. Remember to use the localized names. However, as Mike suggested, if you are displaying this in the UI, u

Re: inference of block return type

2010-06-28 Thread Tony Romano
? The link to Blocks Programming Topics posted by Tony Romano doesn't seem to include it, although it alludes to its existence. That page does link to Apple's submission to the standard committee which does show that syntax, but it seems like the sort of thing that ought to be on apple.

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 the inferen

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
Sat, Jun 26, 2010 at 8:51 PM, Tony Romano wrote: >> OP posted: "This would seem to imply that a __block variable *can* be a >> *fixed* length >> array. But when I try to write into such an array inside a block, I get a >> compile error, "cannot access __bloc

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
ng 3.2.2 prints out char 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/coc

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 wrote: > On Sat, Jun 26, 2010 at 8:51 PM, Tony Romano wrote: >> OP posted: "This would seem to imply that a __block variable *can* be a

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
I listed below, I 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

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
rray is not accessible outside of the scope of the block. > Matt was asking about: > > __block char array1[5]; > NSBlockOperation * foo = [NSBlockOperation blockOperationWithBlock:^{ > array1[0] = 'T'; > } > > Dave > > On Jun 26, 2010, at 8:48 PM, Tony

Re: C arrays as __block variables

2010-06-26 Thread Tony Romano
hmmm. Your saying this doesn't work? NSBlockOperation * foo = [NSBlockOperation blockOperationWithBlock:^{ __block char array1[5]; array1[0] = 'T'; }]; It works fine for me. Are you saying something different? -

Re: NSMenuDelegate menuDidClose called before NSMenuItem's action?

2010-06-25 Thread Tony Romano
What I do is create an object that represents the data you need for your action. During menuNeedsUpdate, instantiate an instance of the object that will be used later and then call [menuItemName setRepresentedObject:objectYouCreated] where menuItemName is the menuItem object you need to associ

Re: raising NSException between Controllers

2010-06-19 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
KVO > notification that a new item was added. > > You should rarely, if ever, be direcly adding objects to the controller layer > like this. > > Sent from my iPhone > > On Jun 18, 2010, at 18:53, Tony Romano wrote: > >> Scenario: Adding a new node to a NSO

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 b

NSTreeController and insertObject:atArrangedObjectIndexPath:

2010-06-18 Thread Tony Romano
Scenario: Adding a new node to a NSOutlineView backed by a NSTreeController. 1. Create a new internal object add add it to the data store(file system). This will be my representedObject in the treecontroller 2. Compute the path and call insertObject:atArrangedObjectIndexPath: the treecontrolle

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

2010-06-18 Thread Tony Romano
st 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 object

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

2010-06-18 Thread Tony Romano
I did notice the inner block was running on a second q, that's what my comment is about. I guess the first block what's really in questioned, how big is the images?? If it will block, then put it in the same block as the write. I'm assuming you want he image transformed prior to the write. -

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

2010-06-18 Thread Tony Romano
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 to add to the queue and the jobs will be done in order which t

Re: DnD International No symbol

2010-06-17 Thread Tony Romano
hat case, > I'm unsure as to the best way and should probably leave it to other > CocoaDevvers to assist you. > > Cheers, > Andrew > > On Jun 17, 2010, at 5:27 PM, Tony Romano wrote: > >> Gotta Love Corbin, works as advertised. >> >> What

Re: DnD International No symbol

2010-06-17 Thread Tony Romano
them 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

Re: DnD International No symbol

2010-06-16 Thread Tony Romano
Move, 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 wrote: >> Briefly, in a DnD operation all the nodes selected need to be siblings of >> each other. During validateDrop I check for this

DnD International No symbol

2010-06-16 Thread Tony Romano
Briefly, in a DnD operation all the nodes selected need to be siblings of each other. During validateDrop I check for this and it calculates it just fine. However, I need to set the DnD image to something indicating this is not allowed, I thought using the International NO symbol made sense bu

Re: Where to noteHeightOfRowsWithIndexesChanged

2010-06-16 Thread Tony Romano
You can't be cavalier about the UI. The Windows version of the application could be in an enterprise setting where lots of users are already accustom to how it works today. Good or bad, consistency outweighs uniqueness. Changing something on an enterprise scale needs to go through a methodica

Re: Menu item binding hidden

2010-06-13 Thread Tony Romano
t; > Gideon > > On 14/06/2010, at 11:23 AM, Tony Romano wrote: > >> Binding a menuitem's hidden attribute to the selection doesn't work in the >> case of a context menu because the selection happens as it changes and >> before the menu is displayed. There

Menu item binding hidden

2010-06-13 Thread Tony Romano
Binding a menuitem's hidden attribute to the selection doesn't work in the case of a context menu because the selection happens as it changes and before the menu is displayed. There is no state. Other than adding an ivar and binding the hidden state to it, is there another way? Can't seem to

Re: NSOutlineView drag and drop problem

2010-06-11 Thread Tony Romano
all I can do. > > --Graham > > > > > On 11/06/2010, at 6:27 AM, Tony Romano wrote: > >> It does. Making a call to draggingSourceOperationMask in your acceptDrop >> method will give you the operation that is active. No need to cache it. >> >&g

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: > >> In –outlineView:acceptDrop:item:c

NSTreeController method removeObjectAtArrangedObjectIndexPath

2010-06-02 Thread Tony Romano
Overview: I am implementing DnD using the NSOutlineview as my UI and the NSTreeController as my "store front" to the file system. If none of the files exist at the drop target both move and copy operations work fine. The case where there is a file in the target that conflicts with one of the fi

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

2010-06-01 Thread Tony Romano
not called 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&

Re: six things I wasn't able to do with Cocoa

2010-05-28 Thread Tony Romano
To see if a file is hidden, I use on the URL(NSURL Class) for the file, resourceValuesForKeys and pass in the array of properties you are looking for. In the case of a hidden file, use NSURLIsHiddenKey. You should be able to make a file hidden as well by using the set counter part. Check out

Re: How to filter the NSOpenPanel with "Recommended Applications"

2010-05-27 Thread Tony Romano
Adding to what others have said. 1. Determine a list of applications that can work with the file type. Use Launch Services (LSGetApplicationURLs for URLs). 2. In the your open panel delegate, implement: shouldEnableURL and return YES if the application is on the list 3. You may also have an ap

Re: removeObjectAtArrangedObjectIndexPath EXC_BAD_ACCESS

2010-05-27 Thread Tony Romano
Thanks Nick. On May 27, 2010, at 2:21 PM, Nick Zitzmann wrote: > > On May 27, 2010, at 2:58 PM, Tony Romano wrote: > >> Below is some code that handles mount and unmount notifications for volumes. >> During an unmount, I want to remove the item from the NSTreeController&

removeObjectAtArrangedObjectIndexPath EXC_BAD_ACCESS

2010-05-27 Thread Tony Romano
s the correct item that contains my object that represents the volume. Here is the call stack and the code. Any ideas as to why it is crashing here? Platform: Mac OS X10.6.3, XCode 3.2.2 TIA, -Tony Romano call stack; #0 0x7fff87392160 in objc_msgSend_vtable2 () #1 0x7fff81c2e4

NSOutlineView Assert

2010-05-25 Thread Tony Romano
Does anyone have info on this assert: *** Assertion failure in -[MacOutlineView _expandItemEntry:expandChildren:startLevel:], /SourceCache/AppKit/AppKit-1038.29/TableView.subproj/NSOutlineView.m:969 The MacOutlineView is my class and I get this on occasion post a drag/drop. If I can get some

Re: (solved?) baseURL problem with +fileURLWithPath:

2010-05-18 Thread Tony Romano
First, the first 2 characters need to be // and not / for it to be a valid resource specifier. The 10.6 Overview states it will fail to create a NSURL. Look at the class reference. Why the base is set to your binary maybe just a bug in 10.5. So you don't go nuts, just temp fix the string and

Re: NSTreeController and remove:

2010-05-16 Thread Tony Romano
-Tony On May 15, 2010, at 8:25 AM, Mike Abdullah wrote: > As he stated, -remove: does work, but its result is deferred. > > On 15 May 2010, at 03:56, Tony Romano wrote: > >> Thanks Quincey. >> >> removeObjectAtArrangedObjectIndexPath works but remove: still does n

Re: NSTreeController and remove:

2010-05-14 Thread Tony Romano
. -Tony On May 14, 2010, at 4:55 PM, Quincey Morris wrote: > On May 14, 2010, at 15:39, Tony Romano wrote: > >> I have a NSOutlineView bound to a NSTreeController in class mode(i.e. each >> NSTreeNode represents my Node object). Everything up to now is working >> fine.

NSTreeController and remove:

2010-05-14 Thread Tony Romano
I have a NSOutlineView bound to a NSTreeController in class mode(i.e. each NSTreeNode represents my Node object). Everything up to now is working fine. I am trying to remove a single node in the outline view by calling [outlineView remove:self] as a test. The documents are pretty simple and t

Re: Debugger Variable window

2010-04-16 Thread Tony Romano
yes, just a typo. Thanks On Apr 16, 2010, at 9:38 PM, Rob Ross wrote: > > On Apr 16, 2010, at 6:06 PM, Tony Romano wrote: > >>> MyObjectA >>> { >>> NSURL url; >>> } > > > Is this just a typo? Shouldn't you be writing:

Fwd: Debugger Variable window

2010-04-16 Thread Tony Romano
Adding to Coco devs as well. Begin forwarded message: > From: Tony Romano > Date: April 16, 2010 4:50:10 PM PDT > To: Xcode Users > Subject: Debugger Variable window > > Today is spring cleaning and I've ignored this problem for too long :-) I've > searched

Re: ObjC question

2010-04-10 Thread Tony Romano
many thanks! -tony On Apr 10, 2010, at 4:41 PM, Kevin Brock wrote: > On Apr 10, 2010, at 2:38 PM, Tony Romano wrote: > >> Using the sample below, how do I get the instance of the class in which I >> am contained WITHOUT passing it as a parameter or using hacky sizeof t

Re: ObjC question

2010-04-10 Thread Tony Romano
5 PM, Seth Willits wrote: > On Apr 10, 2010, at 2:38 PM, Tony Romano wrote: > >> Using the sample below, how do I get the instance of the class in which I >> am contained WITHOUT passing it as a parameter or using hacky sizeof tricks >> in the method Foo:method? Thanks p

ObjC question

2010-04-10 Thread Tony Romano
Using the sample below, how do I get the instance of the class in which I am contained WITHOUT passing it as a parameter or using hacky sizeof tricks in the method Foo:method? Thanks people! If this is not the correct alias for this type of question, apologizes in advance. @interface Foo :

Re: Best way to selectively show objects in a tree controller/outlineview

2010-03-31 Thread Tony Romano
Thanks Joanna, my data is not Core Data and I haven't had the opportunity to use it much. I did some research and it is definitely on my list of things to learn. Not sure why NSTreeController does not support predicate filters... Funny, Finder has a hidden preference to show or hide hidden fil

Re: Best way to selectively show objects in a tree controller/outlineview

2010-03-31 Thread Tony Romano
After some research, NSTreeController does not support predicates. subclass'ing looks like the way to go. I'll look into to-many properties as well. Thanks so much! -tony On Mar 30, 2010, at 8:51 PM, Kyle Sluder wrote: > On Tue, Mar 30, 2010 at 8:35 PM, Tony Romano wrote: &

Best way to selectively show objects in a tree controller/outlineview

2010-03-30 Thread Tony Romano
Based on a user preference, I want to be able to selectively show/not show items contained in the tree controller by an outline view. For example, suppose the tree controller has these items: A,B,C,D,D,E,F,G,H. The outline view will normally display all of the items. Now suppose the user sets

Re: NSTreeController, NSBrowser image setting

2010-03-24 Thread Tony Romano
pport icons and I am able to set images for each item. I will file a bug. If someone feels different, please let me know. Thanks, -tony On Mar 24, 2010, at 1:58 AM, Tony Romano wrote: >> From: Tony Romano >> Date: March 24, 2010 1:57:04 AM PDT >> To: Cocoa Developers >&

Fwd: NSTreeController, NSBrowser image setting

2010-03-24 Thread Tony Romano
> From: Tony Romano > Date: March 24, 2010 1:57:04 AM PDT > To: Cocoa Developers > Subject: Re: NSTreeController, NSBrowser image setting > > Thanks Ken, that was somewhat helpful. However, I am still having trouble > mapping the arguments passed via(- (void)browser

NSTreeController, NSBrowser image setting

2010-03-23 Thread Tony Romano
I'm using a NSTreeController and bindings to contain the data for a NSBrowser. Data from my objects is being displayed fine. I want to add an image to the entries in the browser. From what I gather, I need to implement the willDisplayCell delegate method. The question I have is how do I get

EventLoop

2010-03-08 Thread Tony Romano
I have an application that updates the image on a cell. Sometimes I present a modal sheet right after I setImage. This code is executing in an action sent from the NSMatrix containing the cells. The behavior I am seeing is the sheet rendering occurs then the image is updated. I suspect since

Re: No Methods being called in my subclassed NSArrayController

2010-02-11 Thread Tony Romano
The Reload All Class files did it!. Thanks! On Feb 11, 2010, at 4:46 PM, Jerry Krinock wrote: > > On 2010 Feb 11, at 13:25, Tony Romano wrote: > >> Thanks for the reply Fritz. >> >> It shows NSArrayController and it is greyed out. It list two options in the >&

Re: No Methods being called in my subclassed NSArrayController

2010-02-11 Thread Tony Romano
t that the "Prepares Content" is checked on the attributes page). I'm sure it is something silly I am doing. -tony On Feb 11, 2010, at 11:27 AM, Fritz Anderson wrote: > On 11 Feb 2010, at 1:20 PM, Tony Romano wrote: > >> Environment: >> >> 1. C

  1   2   >