Re: TreeController and "selection" Binding

2016-02-12 Thread Michael de Haan
> On Feb 11, 2016, at 4:11 PM, Quincey Morris > wrote: >> >> Ideally, I would like to bind from IB the selection of the TreeController to >> the local variable, but I cannot find a way to do this. Is this possible? > > It’s not clear what you’re saying.

Re: TreeController and "selection" Binding

2016-02-12 Thread Michael de Haan
> On Feb 12, 2016, at 2:16 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Feb 12, 2016, at 14:00 , Michael de Haan <m...@comcast.net > <mailto:m...@comcast.net>> wrote: >> >> I could not get from that binding to th

Re: TreeController and "selection" Binding

2016-02-12 Thread Michael de Haan
> On Feb 12, 2016, at 2:52 PM, Quincey Morris > wrote: > > The difference between binding in IB and binding using code (if that’s what > you’ve been doing) is that with code you have a freer choice of binding > targets. To do the equivalent in IB, you

Re: TreeController and "selection" Binding

2016-02-12 Thread Michael de Haan
> On Feb 12, 2016, at 9:16 AM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Feb 12, 2016, at 07:04 , Michael de Haan <m...@comcast.net > <mailto:m...@comcast.net>> wrote: >> >> Ideally, I would like to omit the outl

TreeController and "selection" Binding

2016-02-11 Thread Michael de Haan
I have what I assume is a standard setup. A treeController managing an Outline View. A textView acts as a source for a regex Search. All works as expected. The resulting matches are displayed in the outline view. As I select a row in the outline view, I highlight the matched text in the

Re: Stack View Question

2015-11-12 Thread Michael de Haan
>> >> >>> >>> Because there are 5 buttons in the top and bottom rows, and 3 in the >>> vertical left and right rows, the spacing in the vertical stack views are >>> not as “tight” as I want it to be. >>> >>> What I want is this. Lets call the space between the buttons “Empty Space" >>>

NSUserDefaults Bindings Reset

2015-11-01 Thread Michael de Haan
I have made a test Project to understand resetting UserDefaults. A label’s value is bound to the shared UserDefaults in the UI, and works as expected when the Defaults are updated @IBAction fun changeMeaningOfLife……... let meaning = Int(arc4random() % 99)

Dictionary and Range

2015-10-27 Thread Michael de Haan
I know it is possible to do this, let isolated = Range(start: 20, end: 25) let k_Index = ["isolatedTstm":isolated] But what i really want is this, let foo = <30 and bar = [key:foo] Is that possible? Thanks. ___ Cocoa-dev mailing list

Re: Best Advice for accessing App Delegate's Managed Object Context

2015-10-18 Thread Michael de Haan
Well, there is something to be said for simplifying the code!!! I got rid of all the notification code, and substituted this in each controller that needed access to the managedObjectContect > Just show me how to do that in Swift :) lazy var managedObjectContext:NSManagedObjectContext! = {

Re: Best Advice for accessing App Delegate's Managed Object Context

2015-10-18 Thread Michael de Haan
> > It looks to me like you are instantiating a window controller, not a split > view controller. But that’s a better idea anyhow. Correct… the WindowController “contains” the SplitViewController > >> > > By “context”, do you mean managed object context? correct again. > Alarm

Best Advice?

2015-10-18 Thread Michael de Haan
I am using a separate, second “standAlone" Window to display a SplitViewController. Design is StoryBoard, for an OS X application. From appDelegate, I instantiate the SplitViewController in “applicationDidFinishLaunching" let storyBoard = NSStoryboard(name: "Main", bundle: nil)

Re: Dead Reckoning

2015-10-09 Thread Michael de Haan
Thank you for all your input. I made one small little change to accept time input in seconds. >> let secondsToHours = 2.778E-4 .. let rDistance = ((speed * time * knotsToMeters * secondsToHours) / earthRadius) << > On Oct 9, 2015, at 9:33 PM, Rick Mann

Re: Dead Reckoning

2015-10-09 Thread Michael de Haan
> > I am trying to derive a DR fix from an initialized CLLocation. > > Like this. (Playground) > > let fixTime = NSDate(timeInterval: (1.00 * 60.00 * 60.00 * -1.00), > sinceDate: NSDate()) // one hour ago > let fixLocation = CLLocation(coordinate: >

Dead Reckoning

2015-10-08 Thread Michael de Haan
I am trying to derive a DR fix from an initialized CLLocation. Like this. (Playground) let fixTime = NSDate(timeInterval: (1.00 * 60.00 * 60.00 * -1.00), sinceDate: NSDate()) // one hour ago let fixLocation = CLLocation(coordinate: CLLocationCoordinate2DMake(boatLocation.coordinate.latitude,

Re: Generics Question

2015-09-24 Thread Michael de Haan
Nice… thank you Marco > On Jul 26, 2015, at 4:43 PM, Marco S Hyman wrote: > >> func genericFor(s:String) -> T { >> >> return T(s)! // error. ’T’ cannot be constructed because it has no >> accessible initializers >> } > > At compile time there is no way of determining

Generics Problem

2015-09-19 Thread Michael de Haan
I am calling this function, func createMOforEntityName(entityName:String, context:NSManagedObjectContext, key:String, keyAttribute: U) -> (Bool, T) { guard let mo:T = self.moExistsWith(entityName, key:key, keyAttribute: keyAttribute) else { let

Re: Generics Problem

2015-09-19 Thread Michael de Haan
> On Sep 19, 2015, at 1:46 PM, Jens Alfke wrote: > > >> On Sep 19, 2015, at 11:26 AM, Quincey Morris >> > > wrote: >> >> It looks like Swift is incapable of resolving the specialization of

Re: Generics Question

2015-07-26 Thread Michael de Haan
What you really need to do depends on what you’re really trying to achieve. Sorry, it’s been a long day :-) I am really trying to understand this. So….. given this… and I think this will make sense now, * func intFor(s:String) - Int { return Int(s)! } func

Re: Generics Question

2015-07-26 Thread Michael de Haan
that will return an Int, Double for a given string value, depending upon the input i.e. T On Jul 26, 2015, at 3:44 PM, Alan Westbrook void...@me.com wrote: I think you want genericIntFor() to return Int instead of T Alan On Jul 26, 2015, at 3:10 PM, Michael de Haan  m...@comcast.net

Generics Question

2015-07-26 Thread Michael de Haan
I’m writing a coreData helper which will rely on Generics. Could I get some input? I have synthesized the problem down to this somewhat nonsensical code. From Playground: func intFor(s:String) - Int { return Int(s)! } func genericIntForT(s:String) - T { return

Re: Generics Question

2015-07-26 Thread Michael de Haan
. That’s why I was asking about a more realistic example of the problem you’re trying to solve. Point taken. This was just a “trivial” … well it seems not that trivial…example to deepen my understanding of Generics. So, I thank you, and will repost with a more specific example if and when

Question about enums

2015-07-17 Thread Michael de Haan
I wonder if I can get some input as I seemed to have hit a wall in Swift, 2.0 My App uses structs and enums to hold the bulk of the data needed for it’s default values (probably over 95%). So, for example, enum Foo:String { case Bar = “Bar case Etc = “Etc case Etc_Etc = “Etc

Re: Question about enums

2015-07-17 Thread Michael de Haan
property and that property could grow with customers input. You will still need a way to store the inputs - assuming you want to be able to persist the information. On Jul 17, 2015, at 12:53 PM, Michael de Haan  m...@comcast.net mailto:m...@comcast.net wrote: I wonder if I can get some

Re: Question about enums

2015-07-17 Thread Michael de Haan
? enum Foo:String { case Bar = “Bar case Etc = “Etc case Etc_Etc = “Etc Etc case Custom(String) } On Fri, Jul 17, 2015 at 2:53 PM, Michael de Haan  m...@comcast.net mailto:m...@comcast.net wrote: I wonder if I can get some input as I seemed to have hit a wall in Swift

Re: Question about enums

2015-07-17 Thread Michael de Haan
Could you elaborate on the persistence aspect…as this is what I will be needing. Thanks On Jul 17, 2015, at 2:04 PM, iseecolors iseecol...@rsqrdc.us wrote: As long as you only need one customer defined enum and it is not expected to persist, than this will work. On Jul 17, 2015, at

Re: Question about enums

2015-07-17 Thread Michael de Haan
Quincey and Stephen Thank you for your great input. And..yes..it does compile!!! :-) On Jul 17, 2015, at 1:57 PM, Stephen J. Butler stephen.but...@gmail.com wrote: Or what about this? Tested this time... enum Foo { case Bar case Etc case Etc_Etc case Custom(String)

re Swift 2.0

2015-06-29 Thread Michael de Haan
var currentValue = 1 let newNewGenerator = anyGenerator { ()-Int? in let previousValue = currentValue currentValue *= 2 return ( previousValue 20 ) ? nil : previousValue } let newGeneratedArray = Array( newNewGenerator ) For some reason you have to specify

Swift 2.0 difficulty

2015-06-29 Thread Michael de Haan
Hi All I am looking at Swift 2.0. The compiler has converted the code below to the “latest” Swift syntax. This causes the error shown. I have spent a few days trying to get this to compile. What is confusing to me, is that the code, listed last (func removeAnElemen…..) does compile ( all in

Re: Custom UITableViewCell parent is NIL

2014-04-08 Thread Michael de Haan
On Apr 8, 2014, at 6:16 AM, Steve Christensen puns...@mac.com wrote: On Apr 7, 2014, at 9:32 PM, Michael de Haan m...@comcast.net wrote: It still however leaves me puzzled as to why I cannot implement Swipe to delete. (the 2 usual suspects), ie -(BOOL)tableView:(UITableView *)tableView

Custom UITableViewCell parent is NIL

2014-04-07 Thread Michael de Haan
I wonder if I might get some insight into this issue. I have implemented a custom UITableViewCell in a (test) project with batch deletions, following the guidelines of the sample code MultiSelectTableView. This works as expected. However, swipe to Delete does not work. To debug this, I created

Re: NSSearchField problem

2013-10-13 Thread Michael de Haan
Hi Jerry If I remember correctly, the way the search happens for a recent search is the same as the way the search happens for a typed-in-with-keyboard search, which is that the search field sends its action. Works perfectly. Cannot believe I missed this. I think it's called overthinking!

NSSearchField problem

2013-10-12 Thread Michael de Haan
Hi all I am struggling to solve this problem. I wish to implement a searchField similar to the Find of Xcode's IDE editor, where, for example, Recent Results places the item chose into the SearchField and performs the search with the chosen string. The current setup( in OSx) is a simple

Re: book for n00b

2013-01-16 Thread Michael de Haan
On Jan 16, 2013, at 11:54 AM, Laurent Daudelin laur...@nemesys-soft.com wrote: If the guy doesn't have any programming experience, I would strongly recommend he gets some basic programming training. I'm not sure books on Objective-C books will help non-programmers. -Laurent. --

Re: book for n00b

2013-01-16 Thread Michael de Haan
As far as I recall , yes From Seattle On Jan 16, 2013, at 12:23 PM, Laurent Daudelin laur...@nemesys-soft.com wrote: On Jan 16, 2013, at 12:11, Michael de Haan m...@comcast.net wrote: On Jan 16, 2013, at 11:54 AM, Laurent Daudelin laur...@nemesys-soft.com wrote: If the guy doesn't

best practice

2012-06-21 Thread Michael de Haan
At work, we use 2 large totally separate databases to look up codes needed for coding procedures. I have written a simple app to present the data, using bindings. Implemented a search-field (binding based) and all works well. My question is one of an approach. (There is a paucity for this type

Re: best practice

2012-06-21 Thread Michael de Haan
On Jun 20, 2012, at 11:26 PM, Jens Alfke wrote: On Jun 20, 2012, at 11:00 PM, Michael de Haan wrote: I would like to be able to toggle between the 2 databases using the same interface( i.e. the same tableView and searchField)(The tableView in one would need an extra column). I thought

Re: best practice

2012-06-21 Thread Michael de Haan
Thanks to both of you. Much appreciated. On Jun 20, 2012, at 11:48 PM, Scott Ribe wrote: On Jun 20, 2012, at 11:00 PM, Michael de Haan wrote: I thought perhaps of setting up 2 tableViews/searchFields and simply toggling (hide/show) between the 2 databases. I think that's a fine

An approach sought

2012-03-14 Thread Michael de Haan
I am sure this must be covered somewhere, but my searches come to nought. Using bindings, I wish to persist the state of an app ( for example, a slider's value). Current test app is thus. A slider, whose value is bound to a model float value via an appropriate NSController ( in this case, an

Re: An approach sought

2012-03-14 Thread Michael de Haan
...was not sure if this could be done. And...this at the same time extends my venture into bindings. Again, thanks. On Mar 14, 2012, at 12:02 PM, Seth Willits wrote: On Mar 13, 2012, at 2:28 PM, Michael de Haan wrote: What I wish to have happen, is a situation where model and view AND last user value

Hillegass printing challenge

2010-02-18 Thread Michael de Haan
Hi all, May I ask about an issue I am having adding page numbers to a print out. I implemented the following method: - (void)drawPageBorderWithSize:(NSSize)borderSize { // NSPrintOperation *po = [NSPrintOperation currentOperation]; //NSPrintInfo *pi = [po printInfo]; NSRect

Question about MVC

2009-12-18 Thread Michael de Haan
In Cocoa Design Patterns, Chap 29 re-creates, from scratch, an NSArrayController, dissecting in great detail how it works. The example essentially is a very rudimentary drawing program, which shows rectangles in a view, with a table showing the coordinates of the same. My question relates to

Re: Question about MVC

2009-12-18 Thread Michael de Haan
Thanks Jens, I thought it was something like that. On Dec 18, 2009, at 9:21 AM, Jens Alfke wrote: On Dec 18, 2009, at 7:37 AM, Michael de Haan wrote: So, why would one not simply use an NSMutableArray and simple add or delete model objects. I suspect part of the answer is that assigning

Re: A hillegass challenge

2009-12-04 Thread Michael de Haan
On Dec 4, 2009, at 12:05 AM, Rob Keniger wrote: On 04/12/2009, at 5:55 PM, Seth Willits wrote: My question pertains to knowingly setting an object to NULL and then knowingly sending it a message as an acceptable technique. As general answer: Yep. Happens all the time. As Seth

A hillegass challenge

2009-12-03 Thread Michael de Haan
I would like to ask the group if this is good practice ( I am almost certain it is not best practice :-) ) My question pertains to knowingly setting an object to NULL and then knowingly sending it a message as an acceptable technique. (If this is not done, drawRect will simply show the

question about informal protocols

2009-11-20 Thread Michael de Haan
I am working through an example in Buck/Yacktman's book that uses an informal protocol. In the interface of of a custom class, it is declared as such. #import Cocoa/Cocoa.h @interface MyShapeEditorDocument : NSDocument { ivars } @end @interface

Re: question about informal protocols

2009-11-20 Thread Michael de Haan
The usual way is to NOT implements the NSObject category and test if the delegate implements the method using -respondsToSelector: But this way works too if you don't want to have to test before sending your message. Anyway, informal protocols are deprecated in favor of @protocol with

Re: question about informal protocols

2009-11-20 Thread Michael de Haan
On Nov 20, 2009, at 12:19 PM, David Duncan wrote: On Nov 20, 2009, at 12:09 PM, Michael de Haan wrote: Did not see that it was deprecated, but will take your lead and convert them to that. Does the, in your opinion, optional addition pretty much replace categories as a whole

Re: What exactly does NSController do?

2009-11-20 Thread Michael de Haan
On Nov 20, 2009, at 2:02 PM, Chase Meadors wrote: Thought I'd give the question another try. Any insight appreciated. May I suggest you invest in a book called Cocoa Design Patterns, where that **exact** question is painstakingly answered.___

Question about Style wrt private methods

2009-11-18 Thread Michael de Haan
In the newly released Cocoa design patterns (Buck and Yacktman), the chapter discussing Delegates includes an example, which in it's implementation file, has the following method, which is defined/declared like this: ( I have removed the actual definition) -

Re: Question about Style wrt private methods

2009-11-18 Thread Michael de Haan
On Nov 18, 2009, at 11:15 AM, Jim Correia wrote: On Nov 18, 2009, at 1:49 PM, Jens Alfke wrote: This is unfortunately true. The danger is that if you add an _-prefixed method to your class, it might conflict with a private method declared in a superclass. If this happens your method will

ToolBar Item problem

2009-10-31 Thread Michael de Haan
Hi all, I have reached a dead-end. A search as best I could of the archives and google does not throw light on this. (My favorite cocoabuilder seems to be on vacation :-) ) According to the documentation:

Seemingly Documentation confusion?

2009-10-29 Thread Michael de Haan
I wonder if someone could explain the following. In NSDraggingDestination Protocol Reference (informal protocol), it states: The NSDraggingDestination informal protocol declares methods that the destination object (or recipient) of a dragged image must implement. The methods ( which

Re: Seemingly Documentation confusion?

2009-10-29 Thread Michael de Haan
Will do...thank you. On Oct 29, 2009, at 5:03 AM, I. Savant wrote: On Oct 29, 2009, at 7:58 AM, Michael de Haan wrote: In NSDraggingDestination Protocol Reference (informal protocol), it states: ... The methods ( which include ) - prepareForDragOperation: required method

Question about direct vs accessor....PLEASE IGNORE...WILL NOT HAPPEN AGAIN :-) ..APOLOGIES

2009-10-25 Thread Michael de Haan
Surprisingly, I could find no reference to this issue. In the archives, there seems to be, lately, the consensus ( I hope) that direct ivar access is preferred in 2 methods ie init and dealloc. This would seem to imply that initWithCoder/encodeWithCoder should also use direct ivar access,

2 Questions about the project With and Without bindings

2009-10-23 Thread Michael de Haan
I am going through mmalc's excellent bindings pages...and learning a lot. But, may I ask 2 questions related to this, that I could not find in the archives. 1) When adding a bookmark, the bookmark object is initialized thus: - init { if (self = [super init]) { title

Re: 2 Questions about the project With and Without bindings

2009-10-23 Thread Michael de Haan
Ken and Graham, Thank you both very much. I think all that reading is finally beginning to pay off. Your input is truly very helpful and much appreciated. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: 2 Questions about the project With and Without bindings

2009-10-23 Thread Michael de Haan
On Oct 23, 2009, at 5:47 PM, mmalc Crawford wrote: The bug is actually that, for some reason, the projects aren't marked as using garbage collection. They should be... Hmmm!! :-) None the less...they are **very** instructive and extremely helpful. Thank you for hosting them.

The correct approach? Question about creating an NSMutableDictionary instance.

2009-10-22 Thread Michael de Haan
Let me start by saying I **think** I understand why my first approach did not work, but am interested if my working approach is correct in concept. Background. As a **very long** detour from Hillegass's chapter 18 challenge, I am following along with mmalc's excellent series of Binding

Re: The correct approach? Question about creating an NSMutableDictionary instance.

2009-10-22 Thread Michael de Haan
Graham...firstly thank you. I certainly did not try and make it harder...I **thought** I was making it easier to present what I thought was the crux of the issue. :-) So much for that thought! On Oct 22, 2009, at 6:47 PM, Graham Cox wrote: On 23/10/2009, at 12:27 PM, Michael de Haan

Re: The correct approach? Question about creating an NSMutableDictionary instance.

2009-10-22 Thread Michael de Haan
On Oct 22, 2009, at 7:33 PM, Graham Cox wrote: In words, ( also tried to do it diagrammatically...see below) In the dataSource object ( which in this case is a doc subclass) I have declared an array as an Ivar ( I called it _record_list). To this array, I added the object created in the

Question about Apple's updated Sketch-112 program

2009-10-14 Thread Michael de Haan
Hi All, I think this is an easy issue...for those with more knowledge than I :) but it has had me stumped for a while now. I am puzzled about one of the calls (the invalidateGraphic method) of the setter of the NSArray (_graphics) in the document.m file. The sequence occurs when data

[SOLVED] Re: Question about Apple's updated Sketch-112 program

2009-10-14 Thread Michael de Haan
and the part that I do not get: - (void)invalidateGraphic:(SKTGraphic *)graphic { NSArray *windowControllers = [self windowControllers]; [windowControllers makeObjectsPerformSelector:@selector (invalidateGraphic:) withObject:graphic];} I **think** I see what each line is doing, but,

A question involving properties

2009-10-11 Thread Michael de Haan
May I indulge the group. In doing the Hillegass challenge of Chapter 18 ( creating a doc based app to draw ovals), detoured to get a deeper understanding to Apples Sketch-112, which in turn lead to properties and ivars, which lead to this little demo app to give me some more insight into

Re: A question involving properties

2009-10-11 Thread Michael de Haan
On Oct 11, 2009, at 2:35 PM, Karolis Ramanauskas wrote: OK, perhaps I am misunderstanding you, but if you are simply trying to set the label of the NSTextField you may wanna do this. Well...what I was **really** trying to do was get my head around using properties/ivars correctly :-)

Re: A question involving properties

2009-10-11 Thread Michael de Haan
On Oct 11, 2009, at 3:26 PM, Karolis Ramanauskas wrote: I think your exercise obscured your goal too much. I think you are correct...but in the end, I got what I wanted out of this. The reason I did this though, was that recently there has been a lot of discussion about the correct way

Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Michael de Haan
Quincey, thank you. With your suggestion, and a private email, and lots of reading :-), I have made some progress. On Sep 3, 2009, at 8:54 PM, Quincey Morris wrote: On Sep 3, 2009, at 20:37, Michael de Haan wrote: Now the part that does not work. changeViewDelta as follows: -(IBAction

Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Michael de Haan
On Sep 4, 2009, at 12:38 PM, Quincey Morris wrote: 1) Even though, as Quincey alluded to, I would have expected the outlet view and self to be equivalent, they are not. It seems as if self to changeViewDelta is a different entity from the outlet view. Ah, that's a different kettle of

setNeedsDisplayInRect not triggering drawRect?

2009-09-03 Thread Michael de Haan
I ask with some trepidation, as I am not sure I have done all the research I can, but I seem to have reached a dead end. I am simply playing with Hillegass' chapter on Drawing with NSBezierPath, setting up an NSView with an initial color, then trying to change a part of that view to a

Re: applicationWillTerminate: issue

2009-08-25 Thread Michael de Haan
On Aug 25, 2009, at 8:46 AM, Jason Foreman wrote: On Aug 24, 2009, at 10:26 PM, Michael de Haan wrote: -applicationWillTerminate: doesn't magically get called. NSApplication posts this notification to the default notification center. NSApplication also automatically signs its delegate up

Re: applicationWillTerminate: issue

2009-08-25 Thread Michael de Haan
On Aug 24, 2009, at 6:02 PM, Graham Cox wrote: On 25/08/2009, at 10:33 AM, Michael de Haan wrote: So, 2 quick questions. 1) Is what I am seeing expected behavior or am I doing something wrong. 2) Although not strictly speaking a cocoa question, would better design be to collect all

applicationWillTerminate: issue

2009-08-24 Thread Michael de Haan
May I ask the group the following? In my small application, I save the user's preferences with applicationWillTerminate: The application uses 2 applicationWillTerminate:, one in the app's main class, the other in the app's preference class. What happens is that if the preference class is

Re: applicationWillTerminate: issue

2009-08-24 Thread Michael de Haan
Hi Kyle, FIrstly, thanks for this insight. You should be saving your preferences immediately, as soon as they are changed in the UI. You should not be waiting for your app to quit. That makes much more sense, and solves problem 1. But, just so that I understand your other explanation,

checkbox question

2009-08-22 Thread Michael de Haan
I wonder if someone can just point me in the correct direction. I am at the stage of not really knowing if the error is simply a missed connection, etc or a fundamental misunderstanding. I have a checkbox, which I wish to bind to an iVar in my model ( which is a windowController). What

Re: checkbox question

2009-08-22 Thread Michael de Haan
On Aug 22, 2009, at 5:47 PM, Quincey Morris wrote: On Aug 22, 2009, at 16:16, Michael de Haan wrote: ..or a fundamental misunderstanding. Fundamental misunderstanding. :) That figures! I have a checkbox, which I wish to bind to an iVar in my model ( which

Re: checkbox question

2009-08-22 Thread Michael de Haan
On Aug 22, 2009, at 7:08 PM, Quincey Morris wrote: If you did that, you could add a measurementUnits property to your window controller: + (NSSet*) keyPathsForValuesAffectingMeasurementUnits { return [NSSet setWithObject: @state]; } - (NSString*) measurementUnits { return

Re: File's owner, outlets and methods

2009-08-13 Thread Michael de Haan
On Aug 13, 2009, at 1:59 PM, Dave Carrigan wrote: On Aug 13, 2009, at 1:32 PM, Michael de Haan wrote: The inspector of File's owner in the Custom xib shows, as expected an outlet ( which is connected) as well as the method showPanel which is *not* connected. In fact, I am unable

Re: File's owner, outlets and methods

2009-08-13 Thread Michael de Haan
On Aug 13, 2009, at 6:36 PM, Ken Thomases wrote: On Aug 13, 2009, at 4:24 PM, Michael de Haan wrote: [ **Very** briefly, the set up is as follows. AppController has an outlet (IBOutlet NSPanel *aboutWindow) and a method (-(IBAction) showPanel: (id) sender;) snip. One

Re: File's owner, outlets and methods

2009-08-13 Thread Michael de Haan
On Aug 13, 2009, at 8:26 PM, Ken Thomases wrote: I think I finally get File's owner :-) So, if I understand you correctly, having set File's owner to the appropriate class ( in this case AppController) I set the appropriate **proxy** outlet of File's owner to the object ( in this

KVC and addObject for to-many properties

2009-07-11 Thread Michael de Haan
Hi all, There have been quite a few questions about RaiseMan in the archives, but none have addressed this and the documentation that I have read does not answer this either, that I can find. :-).After implementing Undo/Redo in the app, where, in a nutshell, the contentArray of an

Re: KVC and addObject for to-many properties

2009-07-11 Thread Michael de Haan
Clear as mud? Actually, Yes. :-) Kyle and Quincy, thank you. Michael. ___ 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

MVC....brief question

2009-07-07 Thread Michael de Haan
Hi all, I have just completed my first little cocoa app. Please, one brief question. The app follows ( or tries to) the MVC model, using bindings. ( A view, a single NSObjectController, and a model) I also used the method + (NSSet *)keyPathsForValuesAffectingBmi /* bmi is model Ivar */

Re: MVC....brief question

2009-07-07 Thread Michael de Haan
On Jul 7, 2009, at 7:16 AM, Keary Suska wrote: On Jul 7, 2009, at 6:31 AM, Michael de Haan wrote: + (NSSet *)keyPathsForValuesAffectingBmi /* bmi is model Ivar */ { return [ NSSet setWithObjects:@weight, @height, nil]; } My question. I included the above method in the model

Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Michael de Haan
On 29 Jun 2009, at 15:23, Michael de Haan wrote: May I indulge the group with an issue I have been trying to understand for a few days. I have tried to read the extensive literature and correspondence to the group, but so far have not seen an answer that is specific to this question. Given

Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Michael de Haan
On Jul 1, 2009, at 8:45 AM, Keary Suska wrote: It might well be possible that I am thinking about the bindings incorrectly...and in fact all one needs in this case is to bind the view( textfield and slider) to the controller with the correct keypath, and that the relationship of a

NSObjectController, content outlet and content object question

2009-06-29 Thread Michael de Haan
May I indulge the group with an issue I have been trying to understand for a few days. I have tried to read the extensive literature and correspondence to the group, but so far have not seen an answer that is specific to this question. Given this simple appwhich keeps a slider and

Re: NSObjectController, content outlet and content object question

2009-06-29 Thread Michael de Haan
Quincey Morris wrote: On Jun 29, 2009, at 15:23, Michael de Haan wrote: Given this simple appwhich keeps a slider and textField's value synchronized. 1) View consisting of a slider and a textField 2) Model (Foo) with a single property number 3) NSObjectController I am able to use 2

Re: RE : a newbie question

2008-11-11 Thread Michael de Haan
On Nov 11, 2008, at 9:21 AM, Etienne Guérard wrote: You should derive your classes from NSObject, not from Object. You normally don't have to #include objc/Object.h. Where did you find such an example? It is from Steve Kochan's book ...which is basically an introduction to Objective C.

Re: RE : RE : a newbie question

2008-11-11 Thread Michael de Haan
On Nov 11, 2008, at 12:16 PM, Etienne Guérard wrote: Maybe it's an illustrative example, not a real one. Anyway you'd better stick to NSObject. Object is used to implement the metaclass class hierachy inside the ObjC runtime. You normally don't play with it. ;) thanks for your input. I

Re: a newbie question

2008-11-11 Thread Michael de Haan
Paul...thank you for that info. I was not aware there is a specific OBJ-C mailing list, but will go there, for a few chapters, at any rate!! :-) Michael. On Nov 11, 2008, at 12:44 PM, Paul Bruneau wrote: On Nov 11, 2008, at 3:16 PM, Etienne Guérard wrote: Maybe it's an illustrative

advice needed please

2008-11-10 Thread Michael de Haan
I am repeating a post that I posted on the obj C group...realized that the traffic there is very low. Hi all, May I ask the group the following...perhaps a little OT...if so, I apologize. I am just starting off in Obj C...have a basic understanding of C. Bought Kochan's book (Programming