Re: Strange behavior of view based NSTableView with NSTextView

2015-07-18 Thread Jonathan Mitchell
> On 18 Jul 2015, at 14:37, Nick wrote: > > > here. Could you suggest me what am i doing wrong? > Thanks > > > if([[tableColumn identifier] isEqualToString:@"FirstColumn"]) { > > NSTableCellView *tableCellView = [tableView makeViewWithIdentifier: > @"FirstColumnCellView" owner:tableV

Strange behavior of view based NSTableView with NSTextView

2015-07-18 Thread Nick
Hello I am trying to debug a problem in NSTableView but i can't figure out what is the cause. Basically I have a View-based NSTableView (the view is NSTextView), and I would like to be able to add and remove rows to the table using buttons, and also allow the user to edit the textview that is a cel

Re: NSSplitView strange behavior

2013-08-13 Thread Seth Willits
On Aug 13, 2013, at 6:43 AM, Vincent CARLIER wrote: > I experience some strange behavior with NSSplitView. > ... > Anyone experienced something like this ? > Is there a better way to do what I'm trying to do ? Make your life easier and try AGNSSplitViewDelegate or (so I'

NSSplitView strange behavior

2013-08-13 Thread Vincent CARLIER
Hi list, I experience some strange behavior with NSSplitView. Let me explain what I'm trying to do : The split view contains 3 subviews (2 dividers), and has a delegate that controls it. It is an horizontal split view. Let number those 3 views from top to bottom 0, 1 and 2. The upper di

Strange behavior with App Sandbox and CoreData Document

2012-05-23 Thread Marco Dall'Antonia
Hi all, I'm making some tests with a new from scratch CoreData Document based application in Mac OS X 10.7.4 with autosave enabled and Sandbox. (I must "sandboxing" an existing application for the AppStore upload). All works fine with binary or xml type but not with SQLite. Step 1 - I can creat

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread claw
store best regards Le 10 févr. 2011 à 16:19, WT a écrit : > Hello list, > > a little while ago I posted a question regarding some strange behavior by an > NSFetchedResultsController (under the same subject line as this message). > Since then I've narrowed the problem

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread WT
On Feb 10, 2011, at 7:28 PM, Quincey Morris wrote: > On Feb 10, 2011, at 12:59, WT wrote: > >> So, why doesn't it sort them correctly when it's accessing the "indexOrName" >> stored value? > > You *cannot* have an attribute that's both a derived property and a stored > property at the same tim

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread WT
(Apologies if this message reaches you in duplicate. The first time I sent it, it was flagged as 10 KB too large.) I spoke too soon... Forcing -indexOrName to be invoked at entity creation time ensures that the corresponding attribute has the correct value but the fetched results controller s

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread Quincey Morris
On Feb 10, 2011, at 12:59, WT wrote: > So, why doesn't it sort them correctly when it's accessing the "indexOrName" > stored value? You *cannot* have an attribute that's both a derived property and a stored property at the same time. The two things are mutually contradictory. What you've actua

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread WT
Your statement that I need to get the values of "indexOrName" stored in the store led me to write the odd-looking line of code below cdCountry.indexOrName = cdCountry.indexOrName; when the entities are created and it fixes the problem in the test project. I'm now more convinced than ever that C

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread WT
On Feb 10, 2011, at 3:54 PM, Quincey Morris wrote: > Perhaps you're assuming that Core Data will internally call the above getter > to figure out what to put into the store. It doesn't work that way. Most > likely your store contains nil values for the "indexOrName" attribute. (I'm > assuming y

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread Quincey Morris
On Feb 10, 2011, at 07:19, WT wrote: > The test project's core data model has a single entity, "CountryCD", with the > attributes "name", "index", "selected" (representing a boolean), and a > transformable attribute "indexOrName" which returns the entity's index if > it's selected or its name i

Re: [iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread WT
f times > > why not trying to use an Hash Table in order to use weak reference with > NSHashTable ??instead of each time ask core data to update all the entire > store > > best regards > > > > > Le 10 févr. 2011 à 16:19, WT a écrit : > >> H

[iOS] Strange behavior of NSFetchedResultsController

2011-02-10 Thread WT
Hello list, a little while ago I posted a question regarding some strange behavior by an NSFetchedResultsController (under the same subject line as this message). Since then I've narrowed the problem down a bit more and now have a test project to show it. Here's what the goa

[iOS] Strange behavior of NSFetchedResultsController

2011-02-03 Thread WT
Hello list, I'm experiencing a strange behavior on the part of NSFetchedResultsController and I can't seem to find why, although I suspect it's something utterly simple that I'm just not seeing. Here's the setup. I have a list of some 20 keys the user can choose from t

Strange behavior of applicationShouldHandleReopen delegate

2010-02-24 Thread yogin bhargava
Hi All, I have the following delegate being implemented in my app. - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag { [mainApplicationWindow makeKeyAndOrderFront: self]; return NO; } This delegate is called when i close my window and cl

Re: Strange Behavior

2010-02-07 Thread Matt Neuburg
On or about 2/7/10 9:46 AM, thus spake "MARC BLATT" : > Thanks to all. Not one of my better days. Forgot to save. :( It used to be that when you had unsaved changes IB, Xcode would propose to save for you when you built the project. But this feature has been missing for a while, and I regard its

Re: Strange Behavior

2010-02-07 Thread MARC BLATT
Thanks to all. Not one of my better days. Forgot to save. :( On Feb 7, 2010, at 5:27 AM, Alastair Houghton wrote: > On 6 Feb 2010, at 00:44, MARC BLATT wrote: > >> I have the following code in viewWillAppear: for my iPhone dev project >> (iPhone Development SDK Book, Chapter 4, p.63): > > [sni

Re: Strange Behavior

2010-02-07 Thread MARC BLATT
Thanks to all. Not one of my better days. Forgot to save. :( On Feb 7, 2010, at 9:05 AM, Matt Neuburg wrote: > On Fri, 5 Feb 2010 16:44:40 -0800, MARC BLATT said: >> self.summaryLabel.text = self.movie.summary; >> NSLog(@"%@ sold %@ because %@", self.movie.title, > [formatter stringFromNumber:sel

Re: Strange Behavior

2010-02-07 Thread Matt Neuburg
On Fri, 5 Feb 2010 16:44:40 -0800, MARC BLATT said: > self.summaryLabel.text = self.movie.summary; > NSLog(@"%@ sold %@ because %@", self.movie.title, [formatter stringFromNumber:self.movie.boxOfficeGross], self.movie.summary); > NSLog(@"%@ sold %@ because %@", self.titleLabel.text, self.boxOffice

Re: Strange Behavior

2010-02-07 Thread Alastair Houghton
On 6 Feb 2010, at 00:44, MARC BLATT wrote: > I have the following code in viewWillAppear: for my iPhone dev project > (iPhone Development SDK Book, Chapter 4, p.63): [snip] > NSLog(@"%@ sold %@ because %@", self.movie.title, [formatter > stringFromNumber:self.movie.boxOfficeGross], se

Strange Behavior

2010-02-06 Thread MARC BLATT
I have the following code in viewWillAppear: for my iPhone dev project (iPhone Development SDK Book, Chapter 4, p.63): - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.titleLabel.text = self.movie.title; NSNumberFormatter *formatter = [[

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Folks; Thanks for all of the guidance! I have found the issue. It turns out that [localDict copy] is what was being sent to the setBaseSetting. In dealing with the static analyzer's warnings I must have made this change and then had failed to back it out… MY BAD Removed this and all is w

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Kyle Sluder
On Sun, Sep 20, 2009 at 12:42 PM, Steve Cronin wrote: > essentially it is: "Essentially" isn't good enough; actual copy-paste is necessary to ensure you're doing it correctly. >        NSMutableDictionary *localDict = [NSMutableDictionary > dictionaryWithCapacity:70]; This is good. > - (void)

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Kyle; In order to answer your request, I've gone back through the code that generates myBaseSettings essentially it is: NSMutableDictionary *localDict = [NSMutableDictionary dictionaryWithCapacity:70]; [localDict setObject:[self generateInterestingValue1] forKey:@"interestingKey"];

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Jason Foreman
On Sep 20, 2009, at 1:54 PM, Steve Cronin wrote: Kyle; Thanks for such a speedy response. (and on a Sunday afternoon too!) That code is a fairly complex set of interlocking methods. Why would the construction of this NSMutableDictionary have anything to do with this error? Because the er

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Kyle; Thanks for such a speedy response. (and on a Sunday afternoon too!) That code is a fairly complex set of interlocking methods. Why would the construction of this NSMutableDictionary have anything to do with this error? Steve On Sep 20, 2009, at 1:51 PM, Kyle Sluder wrote: On Sep 20,

Re: MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Kyle Sluder
On Sep 20, 2009, at 11:35 AM, Steve Cronin wrote: I have an instance variable which is an NSMutableDictionary * myBaseSettings You need to post the code that creates this dictionary. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

MutableDictionary setValue:forKeyPath - strange behavior

2009-09-20 Thread Steve Cronin
Folks; I have recently converted to XC & IB 3.2 I've updated my project to be a 3.2 project using a baseSDK of 10.6 with deployment target of 10.4 I've run the static analyzer and have no analyzer issues as well as no compiler nor IB warnings I'm feeling good about this but now code that wo

scaleUnitSquareToSize strange behavior Scaling a UI

2009-09-08 Thread Joshua Strickon
I am trying to build a ui where I have an NSView with a variety of subviews that are programatically added from nib files similar to the CocoaSlides demo. I need to be able to zoom in and out. Essentially I have little boxes of cocoa controls. I have tried all sorts of solutions with am

Re: [iPhone] (SOLVED) Strange behavior with modal view controllers

2009-06-17 Thread WT
Hi Michael, thanks for replying to my message. I'm not 100% certain, but I believe this delegate method is new in iPhone OS 3.0 (couldn't find it in the 2.2.1 docs). The project you put together also specifies the iPhone 3.0 SDK. I don't believe it is kosher to speak of these things on the

Re: [iPhone] Strange behavior with modal view controllers

2009-06-17 Thread Michael Babin
On Jun 17, 2009, at 5:43 AM, WT wrote: Is there any known reason whatsoever why presentModalViewController would do absolutely nothing? Possibly, depending on the meaning of "known". In any case, let's investigate further using the sample project you put together (referenced in a follow-u

[iPhone] (follow-up) Strange behavior with modal view controllers

2009-06-17 Thread WT
Hello again, I've since created a small project that shows exactly the problem I described. It's a 32 Kb download, found here: http://www.restlessbrain.com/ModalVCTrouble.zip For this small project, I stripped off all animations and any irrelevant code, so it's the smallest project I can c

[iPhone] Strange behavior with modal view controllers

2009-06-17 Thread WT
Hi there, I'll ask the question first, then I'll explain why I'm asking it. Is there any known reason whatsoever why presentModalViewController would do absolutely nothing? In an iPhone game app I'm working on, I have a tab-bar with 5 items, 2 of which are managed by the SettingsViewContro

NSMenuItem with CustomView - strange behavior

2009-06-07 Thread Peter Krajcik
Hello, I ma trying to mimic a grey color look of menus like in Apple Pro Apps. I found a way how to change a background color of menu (top and bootom caps) and using custom View in NSMenuItem I can do what I need in NSView in a place of NSMenuItem (background, text, image). I am using this me

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Ben Trumbull
On 2009 Feb 25, at 17:11, Ben Trumbull wrote: bug numbers ? Ben, I will definitely file bug(s) after I get this sorted out. But in the interim... The problem is easily stated in terms of DepartmentAndEmployees. I have views which want to know when various object properties change. For one e

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 17:11, Ben Trumbull wrote: bug numbers ? Ben, I will definitely file bug(s) after I get this sorted out. But in the interim... The problem is easily stated in terms of DepartmentAndEmployees. I have views which want to know when various object properties change.

re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Ben Trumbull
Well, that was easy to test and indeed I found that you found a bug in my idea. The only way to fix it would be if we Apple had given us a - didUnturnIntoFault method, but they did not. So, it looks like, for observing changes to the properties of managed objects --- * Using NSManagedObjectCon

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 7:52 PM, Jerry Krinock wrote: Note that a fetch will not return deleted objects that might still be on the undo stack, so I also call removeSelfFromObserveredObjects from the managed object's dealloc method. Oooo, dealloc is not recommended for overriding. I th

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 16:39, Dave Fernandes wrote: Well, as I mentioned I have stuck with KVO. I don't see why you need to remove observers when turning into a fault. You only need to remove observers before the object disappears. Ah, good point. I was using -didTurnIntoFault since -[NSManag

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Quincey Morris
On Feb 25, 2009, at 14:16, Jerry Krinock wrote: How can I get this? According to the documentation, a to-many relationship is ordinarily modified by mutating the mutable set proxy. So there is no always-invoked accessor to override. Implement the set-mutation accessor methods in your NSMa

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 8:31 AM, Jerry Krinock wrote: So, it looks like, for observing changes to the properties of managed objects --- * Using NSManagedObjectContextObjectsDidChangeNotification is no good since it doesn't give you specific information on the current change which a

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 16:19, Dave Fernandes wrote: Yes, the one fetched from the persistent store may still be a fault if you have not tried to access any attributes yet. Further testing shows that it does become a fault if I change an attribute and then delete the Employee. That's ^changing

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 3:51 PM, Jerry Krinock wrote: Dave's earlier comment on this contains some assumptions that are suspect. I don't know of any guarantee that deleting an object causes the object to first be faulted out and/or to receive a 'didTurnIntoFault' message, but perhaps it's so

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 2:24 PM, Quincey Morris wrote: On Feb 25, 2009, at 05:31, Jerry Krinock wrote: On 2009 Feb 24, at 20:02, Dave Fernandes wrote: ... I'm only just getting familiar with the idiosyncrasies of Leopard, however, in Tiger didTurnIntoFault might be called many times, but awa

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
Well, now that I've convinced myself that NSManagedObjectContextObjectsDidChangeNotification does not give enough information, and that there is no way to reliably maintain a KVO observer of a managed object, I was going to bite the bullet and implement custom setters for all the properties

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 11:24, Quincey Morris wrote: I'm not making any absolute assertions here, but this doesn't seem right to me. If 'awakeFromFetch' isn't called when an object is faulted in, then transient properties (for example) could never be worth a damn. I couldn't see anything in the

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Quincey Morris
On Feb 25, 2009, at 05:31, Jerry Krinock wrote: On 2009 Feb 24, at 20:02, Dave Fernandes wrote: ... I'm only just getting familiar with the idiosyncrasies of Leopard, however, in Tiger didTurnIntoFault might be called many times, but awakeFromInsert or awakeFromFetch was only called once

Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 24, at 20:02, Dave Fernandes wrote: I can't say I have the ideal solution, and I am also using KVO, but one might want to heed Ben Trumbull's warning before going down this path... Complex KVO observer actions need to be carefully constrained. If they simply grow organicall

Re: Strange behavior of observeValueForKeyPath:ofObject:change:context:

2009-01-06 Thread Quincey Morris
On Jan 6, 2009, at 10:44, WT wrote: It just occurred to me, though, that the KVO mechanism *could* do something special for dependent keys, namely, pass the original change dictionary on to the observer of the dependent key. After all, it does know that it's dealing with a dependent key. As

Re: Strange behavior of observeValueForKeyPath:ofObject:change:context:

2009-01-06 Thread WT
It just occurred to me, though, that the KVO mechanism *could* do something special for dependent keys, namely, pass the original change dictionary on to the observer of the dependent key. After all, it does know that it's dealing with a dependent key. As it is, once I get the notification

Re: Strange behavior of observeValueForKeyPath:ofObject:change:context:

2009-01-06 Thread WT
Hi Quincey, thank you for your reply. In this scenario, typically the dependent property doesn't have a useful value -- all you care about is the notification. Yes, that's my intention. If you *are* trying to maintain a genuine value for the "displayNeeded" property, then we need to see t

Re: Strange behavior of observeValueForKeyPath:ofObject:change:context:

2009-01-06 Thread Quincey Morris
On Jan 6, 2009, at 06:55, WT wrote: The reason for the comparison between the old and new values should be obvious, namely, I don't want to redraw the screen unless the value of the original key has in fact changed. Now, here's the problem: when I run my app, both the old and new values a

Strange behavior of observeValueForKeyPath:ofObject:change:context:

2009-01-06 Thread WT
Hello, in the app I'm writing, I have a custom view with several KVO- compliant properties which, when changed, should cause the view to redraw itself. I've then set up a dependent key (displayNeeded) and have my custom view KV-observe changes to that key. When a change happens, I call set

Re: memcpy strange behavior

2008-03-20 Thread Jean-Daniel Dupas
Le 20 mars 08 à 16:04, Dave Carrigan a écrit : On Mar 20, 2008, at 6:48 AM, Sherm Pendley wrote: On Thu, Mar 20, 2008 at 9:25 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: Hi I'm using memcpy to copy a file's sector to my struct. But its skipping one UInt16 in between and copying the next va

Re: memcpy strange behavior

2008-03-20 Thread Dave Carrigan
On Mar 20, 2008, at 6:48 AM, Sherm Pendley wrote: On Thu, Mar 20, 2008 at 9:25 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: Hi I'm using memcpy to copy a file's sector to my struct. But its skipping one UInt16 in between and copying the next value in the struct's corresponding field. I've checke

Re: memcpy strange behavior

2008-03-20 Thread Sherm Pendley
On Thu, Mar 20, 2008 at 9:25 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: > Hi > I'm using memcpy to copy a file's sector to my struct. > But its skipping one UInt16 in between and copying the next value in > the struct's corresponding field. > I've checked the read sector and its correctly read. My

memcpy strange behavior

2008-03-20 Thread Nick Rogers
Hi I'm using memcpy to copy a file's sector to my struct. But its skipping one UInt16 in between and copying the next value in the struct's corresponding field. I've checked the read sector and its correctly read. My struct is also in order. Listing: memcpy(&myStruct, sector, sizeof(myStruct)