Re: Maintaining NSCursor outside of app window

2011-01-14 Thread Uli Kusterer
On 14.01.2011, at 01:37, Corbin Dunn wrote: > - (void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint > > Then do something like this (after converting the screen point to window > coords): > >NSPoint windowPoint = [[view window] mouseLocationOutsideOfEventStream]; >NSP

Overriding target and action of backBarButtonItem

2011-01-14 Thread charisse napeÿfffff1as
Hello Guys, I have trouble setting the action for my backbarbutton item. No matter how I set it, my selector does not get called. Here is my code below: UIBarButtonItem *backB = [[UIBarButtonItem alloc] init]; backB.title = @"Back"; backB.action = @selector(disconnect:); self.n

Re: sending a message from an initializer method

2011-01-14 Thread Andreas Grosam
On Jan 14, 2011, at 1:29 AM, Richard Somers wrote: > I often will do something like this. > > - (id)init > { > self = [super init]; > if (self) { > [self prepare...]; > [self prepare...]; > [self prepare...]; > // etc... > } > return self; > } > >

Mutable to-many relationship not observable

2011-01-14 Thread Remco Poelstra
Hi, I've a property digiDevices that's a to-many relationship. I've implemented the value write accesors (in addition to the read ones, which behave perfect): - (void) insertObject:(DigiDevice *)digiDevice inDigiDevicesAtIndex:(NSUInteger)index { [digiDevices insertObject:digiDevice atIn

Determining whether a dictionary is mutable or not

2011-01-14 Thread Tito Ciuro
Hello, Trying to determine whether an NSDictionary is mutable or not fails with these two tests: // Variable info could be NSDictionary or NSMutableDictionary. Assume it's an NSDictionary. BOOL isKindOfClass = [info isKindOfClass:[NSMutableDictionary class]]; BOOL respondsToSelector = [info r

Re: Mutable to-many relationship not observable

2011-01-14 Thread Mike Abdullah
Show us your code that adds the observer. Also, what is the superclass of this class? On 14 Jan 2011, at 10:45, Remco Poelstra wrote: > Hi, > > I've a property digiDevices that's a to-many relationship. I've implemented > the value write accesors (in addition to the read ones, which behave per

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Mike Abdullah
If you want to test if a dictionary is immutable, you are almost certainly doing it wrong. When passed a dictionary in to a method either: A) Make a mutable copy if that's what you need B) -copy it if you want it to be immutable. (This is not inefficient as it sounds because immutable objects im

Re: Mutable to-many relationship not observable

2011-01-14 Thread Remco Poelstra
Hi, I add the observer as follows: [[DigiDevicesManager sharedDigiDevicesManager] addObserver:self forKeyPath:@"digiDevices" options:NSKeyValueObservingOptionOld context:nil]; It's superclass is NSObject and I did not disable automatic notifications. If mutate the array (from inside the

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Tito Ciuro
Hi Mike, Given that the caller can pass a NSDictionary or an NSMutableDictionary, I wanted to test its mutability before calling setObject:forKey:. In order to avoid calling mutableCopy each time, I thought it would be more efficient to test it and then call mutableCopy only when needed. Thank

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2011, at 10:48, Tito Ciuro wrote: > Hello, > > Trying to determine whether an NSDictionary is mutable or not fails with > these two tests: > > // Variable info could be NSDictionary or NSMutableDictionary. Assume it's an > NSDictionary. > > BOOL isKindOfClass = [info isKindOfClass:

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2011, at 11:25, Tito Ciuro wrote: > Hi Mike, > > Given that the caller can pass a NSDictionary or an NSMutableDictionary, I > wanted to test its mutability before calling setObject:forKey:. In order to > avoid calling mutableCopy each time, I thought it would be more efficient to >

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Roland King
On 14-Jan-2011, at 7:25 PM, Tito Ciuro wrote: > Hi Mike, > > Given that the caller can pass a NSDictionary or an NSMutableDictionary, I > wanted to test its mutability before calling setObject:forKey:. In order to > avoid calling mutableCopy each time, I thought it would be more efficient to

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Tito Ciuro
Hi Jonathan, On Jan 14, 2011, at 12:34 PM, jonat...@mugginsoft.com wrote: > On 14 Jan 2011, at 11:25, Tito Ciuro wrote: > >> Hi Mike, >> >> Given that the caller can pass a NSDictionary or an NSMutableDictionary, I >> wanted to test its mutability before calling setObject:forKey:. In order to

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Roland King
On 14-Jan-2011, at 7:36 PM, Roland King wrote: > > On 14-Jan-2011, at 7:25 PM, Tito Ciuro wrote: > >> Hi Mike, >> >> Given that the caller can pass a NSDictionary or an NSMutableDictionary, I >> wanted to test its mutability before calling setObject:forKey:. In order to >> avoid calling muta

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Clark Cox
On Fri, Jan 14, 2011 at 3:34 AM, jonat...@mugginsoft.com wrote: > > > On 14 Jan 2011, at 11:25, Tito Ciuro wrote: > >> Hi Mike, >> >> Given that the caller can pass a NSDictionary or an NSMutableDictionary, I >> wanted to test its mutability before calling setObject:forKey:. In order to >> avoid

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2011, at 11:43, Clark Cox wrote: > On Fri, Jan 14, 2011 at 3:34 AM, jonat...@mugginsoft.com > wrote: >> >> >> On 14 Jan 2011, at 11:25, Tito Ciuro wrote: >> >>> Hi Mike, >>> >>> Given that the caller can pass a NSDictionary or an NSMutableDictionary, I >>> wanted to test its mutabi

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Tito Ciuro
Hi Pablo, On Jan 14, 2011, at 1:35 PM, Pablo Pons Bordes wrote: > Hello, > > To determine if a dictionary is mutable or Inmutable you just need to use the > isKindOfClass method, instead of use respondsToSelector. > > I did a test to reproduce your problem and couldn't reproduce your problem,

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Pablo Pons Bordes
Hello, To determine if a dictionary is mutable or Inmutable you just need to use the isKindOfClass method, instead of use respondsToSelector. I did a test to reproduce your problem and couldn't reproduce your problem, so my conclusion is that actually you are receiving a mutable Dictionary when

Core Data one to many insert question

2011-01-14 Thread Philip Vallone
Hi List, I have an Entity called "CDSites" which has a one-to-many relationship with an Entity called "CDPlacemarks". CDSites is the "Parent" and CDPlacemarks are the "Children". My Applications allows the users to create many CDSites like this: CDSites *cdSites = [NSEntityDescription

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Pablo Pons Bordes
So why I'm not able to reproduce your problem? There is three posible case: 1.- I maid wrong the Test. 2.- You are making wrong "If" statement (maybe an assignment instead of compare ) 3.- Something really estrange happens. good luck Pablo El 14/01/2011, a las 12:44, Tito Ciuro escribió: >

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Roland King
On 14-Jan-2011, at 8:44 PM, Tito Ciuro wrote: > Hi Pablo, > > On Jan 14, 2011, at 1:35 PM, Pablo Pons Bordes wrote: > >> Hello, >> >> To determine if a dictionary is mutable or Inmutable you just need to use >> the isKindOfClass method, instead of use respondsToSelector. >> >> I did a test t

Re: Core Data one to many insert question

2011-01-14 Thread Pablo Pons Bordes
You need to declare some method that core date implement for you, for this situations, to make your life easier XCode help you to declare it and declare those custom class file declarations: - At your Core Date model select the entities you want to make a custom class. - go to Menu File>New File

Re: Core Data one to many insert question

2011-01-14 Thread Philip Vallone
Thanks. I had used X-code to create the subclasses. I see that it created the required methods for adding the "children". Thanks for the help. If I have any issues, I'll post a new question. Regards, Phil On Jan 14, 2011, at 8:07 AM, Pablo Pons Bordes wrote: > You need to declare some meth

Re: data over USB to iPhone

2011-01-14 Thread Thomas Engelmeier
On 13.01.2011, at 20:19, Kyle Sluder wrote: > On Thu, Jan 13, 2011 at 11:12 AM, Reaves, Timothy > wrote: >> That's not correct. There are Apple approved cables to allow you to do >> exactly that (there is a serial cable too). But my understanding is the >> cable itself is not certified by Appl

array contents and objects

2011-01-14 Thread Amy Heavey
I've got a core data app that has 2 entities, product and status, and a relationship between them. I'll be importing and updating some of the data in the app from csv files supplied from an outside source. The 'status' is just given as a string. There are 3 options, Low Stock, Out of Stock,

Re: array contents and objects

2011-01-14 Thread Pablo Pons Bordes
I recommend you to read "Core Data Programming Guide" from Apple Developer web site. And go to "Fetching Managed Objects" this is a very important document you must have if you want to develop with core data. What you will do is to perform a request with a predicate like NSPredicate * aPredica

Re: Overriding target and action of backBarButtonItem

2011-01-14 Thread Matt Neuburg
On Fri, 14 Jan 2011 01:17:58 -0800 (PST), charisse nape?f1as said: >Hello Guys, > >I have trouble setting the action for my backbarbutton item. No matter how I >set >it, my selector does not get called. >Here is my code below: > > >UIBarButtonItem *backB = [[UIBarButtonItem alloc] i

Re: UIEvent timestamp clarification

2011-01-14 Thread Matt Neuburg
On Wed, 12 Jan 2011 18:36:56 -0500, Andrew Coad said: > >Reading through the docs, the approximate flow from a user touching an >interface component (e.g. a button) to the touch event being processed by the >application is: > > - User touches (e.g. a UIButton), a "touch" object is created and en

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Andy Lee
On Jan 14, 2011, at 7:57 AM, Roland King wrote: > Again let me say that if the signature to your method is > > -(void)doSomethingWithADictionary:(NSDictionary*)dictionary; > > you shouldn't be trying to figure out whether that dictionary is mutable and > mutate it. Yup. > If you want i

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-14 Thread Gary L. Wade
> I'm sure you'd agree that when we're learning a new environment, references > and documentation are only > part of the process. If we can't figure out the docs, and lacking an expert > in the next cubicle to ask, > then writing a test app will usually quickly answer our question. This is > whe

Re: Maintaining NSCursor outside of app window

2011-01-14 Thread Corbin Dunn
On Jan 14, 2011, at 1:00 AM, Uli Kusterer wrote: > On 14.01.2011, at 01:37, Corbin Dunn wrote: >> - (void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint >> >> Then do something like this (after converting the screen point to window >> coords): >> >> NSPoint windowPoint = [

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Corbin Dunn
On Jan 14, 2011, at 4:44 AM, Tito Ciuro wrote: > Hi Pablo, > > On Jan 14, 2011, at 1:35 PM, Pablo Pons Bordes wrote: > >> Hello, >> >> To determine if a dictionary is mutable or Inmutable you just need to use >> the isKindOfClass method, instead of use respondsToSelector. >> >> I did a test

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-14 Thread Uli Kusterer
On Jan 11, 2011, at 7:35 AM, Jerry Krinock wrote: > On 2011 Jan 10, at 21:39, Graham Cox wrote: > >> As suggested, to undo a sort, pass the old descriptors to the undo manager >> and when undo is invoked, it restores the old descriptors and once again >> invalidates the cache. > > But that assu

NSSegmentedControl Label

2011-01-14 Thread koko
I would like to programmatically set the label for a section of an NSSegmentedControl which would contain text and a graphic. Is there a recommended manner to accomplish this? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

mouseDown in NSSegmentedControl

2011-01-14 Thread koko
I have sub-classed NSSegmentedControl and set this class to the NSSegmentedControl in IB. I have implemented mouseDown in the sub-class thinking I would get these events. I do not. How does one get mouseDown in an NSSegmentedControl? -koko ___ Co

Re: NSSegmentedControl Label

2011-01-14 Thread Matt Neuburg
On Fri, 14 Jan 2011 11:01:15 -0700, koko said: >I would like to programmatically set the label for a section of an >NSSegmentedControl which would contain text and a graphic. Is there a >recommended manner to accomplish this? The usual way to discover the recommended manner is to read the docu

Re: NSSegmentedControl Label

2011-01-14 Thread koko
Thanks Matt but the documentation is no help whatsoever. I read it. The question remains ... What is the recommended manner to put text and graphic in one segment of an NSSegmentedControl. -koko On Jan 14, 2011, at 1:09 PM, Matt Neuburg wrote: > On Fri, 14 Jan 2011 11:01:15 -0700, koko sa

Re: NSSegmentedControl Label

2011-01-14 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/14/11 12:28 PM, koko wrote: > Thanks Matt but the documentation is no help whatsoever. I read it. > > The question remains ... What is the recommended manner to put text > and graphic in one segment of an NSSegmentedControl. It's not recommended

Re: NSSegmentedControl Label

2011-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2011, at 20:28, koko wrote: > Thanks Matt but the documentation is no help whatsoever. I read it. > > The question remains ... What is the recommended manner to put text and > graphic in one segment of an NSSegmentedControl. > > > Try the docs for NSSegmentedCell. Regards Jonath

Re: NSSegmentedControl Label

2011-01-14 Thread koko
It may not be recommended but I want to do it. Should I get permission from from steven p jobs first? Apple HIG is not the be-all, end-all of UI design. -koko On Jan 14, 2011, at 1:33 PM, Conrad Shultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 1/14/11 12:28 PM, koko wro

Re: NSSegmentedControl Label

2011-01-14 Thread Kyle Sluder
On Fri, Jan 14, 2011 at 12:38 PM, koko wrote: > It may not be recommended but I want to do it.  Should I get permission from > from steven p jobs first? > > Apple HIG is not the be-all, end-all of UI design. No, but it is the design document by which the AppKit implementors write their code. If

RE: NSSegmentedControl Label

2011-01-14 Thread Shawn Bakhtiar
Don't listen to the naysayers... You can do whatever you want. NSSegmentedCell is a good start, as it was recommended. More generically you can implement your own NSCell to really get deep; in either case simply override the draw method, and make sure you are checking the state, and drawing a

Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone

2011-01-14 Thread Deborah Goldsmith
Did you write a bug for this? What is the bug number? Thanks, Deborah Goldsmith Apple Inc. On Jan 10, 2011, at 10:12 AM, Steve Mykytyn wrote: > UIDatePicker (4.2.1) shows differing dates for the modes > > UIDatePickerDate (correct), and > > UIDatePickerDateAndTime (incorrect) > > when th

Re: mouseDown in NSSegmentedControl

2011-01-14 Thread aglee
Did you override mouseDown or mouseDown:? --Andy On Jan 14, 2011, at 03:08 PM, koko wrote: I have sub-classed NSSegmentedControl and set this class to the NSSegmentedControl in IB. I have implemented mouseDown in the sub-class thinking I would get these events. I do not. How does one get m

Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone

2011-01-14 Thread davelist
I'm not the original author of this thread, but I submitted a bug back in August 2010 about these issues. It was marked as a duplicate and I've never heard anything more. Perhaps I don't know how to properly follow duplicates. My bug # is 8320528. Dave On Jan 14, 2011, at 4:34 PM, Deborah Go

Converting NSImage to cmtk yeilds green images

2011-01-14 Thread Ken Tozier
Hi I'm trying to write an NSImage category that converts an image to cmyk . It sort of works, in that it does produce a new image, but all images have a dark green cast to them and look sort of solarized or like negatives. Anyone point out what I'm doing wrong? Thanks for any help - (NSImage

Re: NSUndoManager retain/release of arguments - ad infinitum

2011-01-14 Thread Graham Cox
On 15/01/2011, at 4:50 AM, Uli Kusterer wrote: > Guys, why is sorting like this even an undo-able action in your apps ... ? > That's pointless. Not always pointless. Probably mostly. Depends on the app. Personally I have never bothered to make sorting undoable - I was thinking hypothetically

Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone

2011-01-14 Thread Laurent Daudelin
From what I was told by Apple developer support, you're supposed to add a comment to your duplicate requesting an update for the original ticket. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/ Logiciels Nemesys Software

Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone

2011-01-14 Thread David Reed
Thanks. I should have indicated I did add an additional comment to my bug a month or two later when it wasn't fixed. The only response from Apple in my bug report is the original duplication comment. Dave On Jan 14, 2011, at 5:13 PM, Laurent Daudelin wrote: > From what I was told by Apple dev

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Tito Ciuro
Thanks a lot everyone for the great feedback. I really appreciate it! :-) Cheers, -- Tito On Jan 14, 2011, at 6:39 PM, Corbin Dunn wrote: > > On Jan 14, 2011, at 4:44 AM, Tito Ciuro wrote: > >> Hi Pablo, >> >> On Jan 14, 2011, at 1:35 PM, Pablo Pons Bordes wrote: >> >>> Hello, >>> >>> To d

Re: NSSegmentedControl Label

2011-01-14 Thread koko
IMHO I like your answer ... thanks! -koko On Jan 14, 2011, at 2:17 PM, Shawn Bakhtiar wrote: > Don't listen to the naysayers... You can do whatever you want. > > NSSegmentedCell is a good start, as it was recommended. More generically you > can implement your own NSCell to really get deep; i

Re: NSSegmentedControl Label

2011-01-14 Thread Laurent Daudelin
Please, read this to see where no or little respect to the HIG could take us: http://readthefuckinghig.tumblr.com/ -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/ Logiciels Nemesys Software

Re: NSSegmentedControl Label

2011-01-14 Thread Kyle Sluder
On Fri, Jan 14, 2011 at 1:17 PM, Shawn Bakhtiar wrote: > Don't listen to the naysayers... You can do whatever you want. Sure, but koko asked how he could tell an NSSegmentedCell to draw its image and its text. It's apparent that the authors of NSSegmentedCell did not implement this, because why i

Re: NSSegmentedControl Label

2011-01-14 Thread Sherm Pendley
On Fri, Jan 14, 2011 at 6:35 PM, Kyle Sluder wrote: > > Images-and-text on segmented cells can look atrocious. It can look > like Windows. It can look like someone feels like disrespecting > platform conventions. But sometimes violating the HIG is precisely the > right thing to do. That's why they

Re: NSSegmentedControl Label

2011-01-14 Thread Conrad Shultz
As others (notably Kyle) have pointed out, there is no need to act so defensively. You specifically asked what the "recommended" way to do this is, and I simply pointed out that the approach is NOT recommended. -- Conrad Shultz www.sythetiqsolutions.com On Jan 14, 2011, at 12:38, koko wrote:

Re: NSSegmentedControl Label

2011-01-14 Thread koko
Ouch! Some of us need to lighten up ... it is software engineering not rocket science ... I am not going to make anything ugly ... I want my app to be visually appealing and "intuitive". The intuitive part is what I am trying to get to; it is something pointed out by a number of users. By th

Re: Overriding target and action of backBarButtonItem

2011-01-14 Thread charisse napeÿfffff1as
Hello Matt, Yeah. that's what I also thought. I just needed somebody who knows more to actually confirm it. Anyway, So how can I customize what happens when the user presses the back button? THanks, Charisse From: Matt Neuburg To: charisse nape?f1as

Re: Determining whether a dictionary is mutable or not

2011-01-14 Thread Ken Ferry
I'm not sure this has been made clear: It is intentional that it is difficult to determine whether a dictionary is mutable. That's because you shouldn't do it. Whether a dictionary is mutable _to_you_ is a matter of what's in the header for the method you obtained it from. Suppose that some obj