Finding Out When my NSSplitView has Moved

2009-09-03 Thread Peter Zegelin
I need to find out when my split view has moved so I can configure some buttons to reflect the change but I am finding it difficult to get that info. The splitview is a subclass of BWToolkit/BWSplitView. I have tried getting the notification NSSplitViewDidResizeSubviewsNotification but that

Re: Problem with Core Midi on 10.6

2009-09-04 Thread Peter Zegelin
V2 audio units (type is 'aumd' for a music device audio unit) have been available since 10.2 Bill On Aug 29, 2009, at 5:06 AM, Peter Zegelin wrote: Good news is I installed 10.6 this afternoon and found the error straight away. I had the ComponentDescription fields filled in in

Re: Finding Out When my NSSplitView has Moved

2009-09-04 Thread Peter Zegelin
6:27 PM, Peter Zegelin wrote: I need to find out when my split view has moved so I can configure some buttons to reflect the change but I am finding it difficult to get that info. The splitview is a subclass of BWToolkit/BWSplitView. Just observe either of the subviews and watch for frame-c

iTunes/iPhoto like Database using CoreData?

2009-09-10 Thread Peter Zegelin
Hi, My carbon application has an iTunes like database to store MIDI files. It uses SQLlite as the database. I am thinking that I might converts the whole thing to CoreData when I rewrite the app in Cocoa so I was wondering if there are any examples that would be a suitable starting point

Handling a File Drag to my Window

2009-09-22 Thread Peter Zegelin
I want to us e the whole window of my application as the drop target for files dragged onto it from the Finder but there are a couple of things I can't seem to figure out: I would like to show some sort of visual feedback. I tried subclassing the content view of the window thinking it woul

Re: Handling a File Drag to my Window

2009-09-22 Thread Peter Zegelin
Thanks to both of you I now have it working. I didn't know that a view didn't automatically show a drag hilite. I've only ever coded drag and drop for a table, where it does (IIRC). Peter On 23/09/2009, at 12:48 PM, Peter Zegelin wrote: I want to us e the whole window of my

Re: Problem with NSTableView in NSSplitView

2009-11-24 Thread Peter Zegelin
Martin, I have had the same problem and managed to fix it, but bear in mind I am a beginner so my solution may not be the best or even correct. I believe the problem is caused by the tableview being effectively 'turned inside out' if it is inset and the splitview is closed. If there is

I am Getting 2 Preferences Files

2010-03-14 Thread Peter Zegelin
menu. I have noticed that Preview, TextEdit and probably a few other apps from Apple also generate this file so is the new normal? thanks! Peter Zegelin www.fracturedsoftware.com Rondo - MIDI for your Mac MacSimAVR - AVR simulator for OSX___ Cocoa-dev

Dynamically Updating Column Titles in NSTableView with Mouse Events

2010-07-19 Thread Peter Zegelin
rtz Debug shows no updating in the header area either. NOTE: The column headers do update if I set a breakpoint at [itsTableView displayIfNeeded] or move the splitter that the table is in. Thanks for any advice, Peter Zegelin www.fracturedsoftware.com __

Re: Dynamically Updating Column Titles in NSTableView with Mouse Events

2010-07-19 Thread Peter Zegelin
Wow that was quick! [[table headerView] setNeedsDisplay:YES]; works great. Thanks to Jeff and Graham for replying. On 20/07/2010, at 12:20 PM, Jeff Gilbert wrote: > Hi Peter, > > On Jul 19, 2010, at 8:54 PM, Peter Zegelin wrote: > >> I am trying to dynamically update the

Saving Bookmark Data to XML File

2012-01-05 Thread Peter Zegelin
I am trying to save a bookmark into an xml file but am having difficulty converting the bookmark to and from an NSString. Below is my code. I have temporarily put it all in the NSDocument readFromURL method: - (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **

Re: Saving Bookmark Data to XML File

2012-01-06 Thread Peter Zegelin
Yes, that was it - thank you. I ended up using GTMStringEncoding from code.google.com On 06/01/2012, at 6:09 PM, Jens Alfke wrote: > > On Jan 5, 2012, at 11:00 PM, Peter Zegelin wrote: > >> I am trying to save a bookmark into an xml file but am having difficulty >> co

Keeping Multiple Identical Tables in Synch - Weird SortDescriptor Binding Problem

2011-02-19 Thread Peter Zegelin
creation of the sort descriptor in the shared object and it still sorts on all columns. Does anyone know what may be going on and what is the correct way to do synchronised sorting via bindings? thanks! Peter Zegelin http://www.fracturedsoftware.com Rondo - MIDI for your mac MacSimAVR - AVR

Re: NSScroller: Hiding the knob

2011-04-20 Thread Peter Zegelin
> Does anyone know what to do? > > Thanks for any advice in advance > > Kurt Sutter kind regards, Peter Zegelin http://www.fracturedsoftware.com Rondo - MIDI for your mac MacSimAVR - AVR microcontroller simulator for OS X ___ Cocoa-de

NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
Hello, I have come across what seems to be a weird situation and can't really think of a good solution. I'm relatively new to Cocoa so its probably just a simple misunderstanding. I have a subclass of NSViewController that also acts as the delegate for the NSTableView that it controls. T

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
On 26/06/2009, at 11:54 AM, Keary Suska wrote: On Jun 25, 2009, at 7:33 PM, Peter Zegelin wrote: I have come across what seems to be a weird situation and can't really think of a good solution. I'm relatively new to Cocoa so its probably just a simple misunderstanding.

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
On 26/06/2009, at 11:55 AM, Kyle Sluder wrote: On Thu, Jun 25, 2009 at 6:33 PM, Peter Zegelin wrote: Unfortunately my numberOfRowsInTableView is being called 'before' awakeFromNib, so initially numColumns = 0 and I get an error (myDataSize/numColumns will be infinite). So set

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
On 26/06/2009, at 12:40 PM, Quincey Morris wrote: On Jun 25, 2009, at 19:14, Peter Zegelin wrote: Well I guess the question then becomes 'where is earlier'! I tried overloading NSViewController::loadView and it also gets called 'after' the first call to numberOfRowsIn

Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView

2009-06-25 Thread Peter Zegelin
On 26/06/2009, at 1:24 PM, Quincey Morris wrote: After all, the non-band-aid way is almost as easy: - (id) initWithNibName: (NSString*) nibNameOrNil bundle: (NSBundle*) nibBundleOrNil { self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]; if (!self)

Drawing the background of a single row in NSTableView

2009-07-01 Thread Peter Zegelin
Hi, I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but it seems like a bit of a hack so I'm wondering if there is a better way. I've also checked various examples but most want to dr

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Peter Zegelin
On 01/07/2009, at 6:12 PM, Quincey Morris wrote: On Jul 1, 2009, at 00:26, Peter Zegelin wrote: I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but it seems like a bit of a hack so

Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Peter Zegelin
On 01/07/2009, at 6:55 PM, Dado Colussi wrote: On Wed, Jul 1, 2009 at 9:26 AM, Peter Zegelin wrote: I need to draw the background of a single row in a tableview. This row is not the selected row, and it changes often. I have more or less got it working but it seems like a bit of a

Re: Drawing the background of a single row in NSTableView

2009-07-02 Thread Peter Zegelin
On 02/07/2009, at 11:57 AM, Adam R. Maxwell wrote: On Jul 1, 2009, at 6:40 PM, Graham Cox wrote: On 02/07/2009, at 10:09 AM, Peter Zegelin wrote: Problem with this is there is no obvious concordance ( that I can see) between a row and its rectangle. Wouldn't scrolling affect all

Setting the width of a segment to 0 in NSSegmentedControl doesn't work so well

2009-08-05 Thread Peter Zegelin
My application has a dynamic segmented control, where the user can specify that each segment has an icon, text, or both. However I am having trouble correctly resizing a segment. According to the docs, calling - (void)setWidth:(CGFloat)width forSegment:(NSInteger)segment with 0 for the widt

Displaying svg image with WebKit - scaling issues

2009-08-22 Thread Peter Zegelin
Hi, I would like to display a simple svg image in my app using webkit. Unfortunately I also need to be able to scale the image to the size of the view. The webview class has makeTextLarger and makeTextSmaller which works, but limits the scaling to about 10 'steps'. Apparently you can do

Re: Displaying svg image with WebKit - scaling issues

2009-08-22 Thread Peter Zegelin
Too Easy! Works perfectly in the MiniBrowser demo project. Many thanks! Peter On 23/08/2009, at 1:15 AM, Jean-Daniel Dupas wrote: Le 22 août 2009 à 16:27, Peter Zegelin a écrit : Hi, I would like to display a simple svg image in my app using webkit. Unfortunately I also need to be

How to Convert "#FF00FF" String Specifying RGB Color to 32 bit int

2009-08-26 Thread Peter Zegelin
Hi, I have some xml where an rgb color value is specified via a "#XXYYZZ" type string. The xml is being read in via NSXMLParser. I can't seem to find an easy Cocoa way to convert this value to an unsigned int. I need an unsigned int rather than an NSColor as the value is used in C+ + code.

Re: How to Convert "#FF00FF" String Specifying RGB Color to 32 bit int

2009-08-27 Thread Peter Zegelin
at 9:50 AM, Peter Zegelin wrote: Hi, I have some xml where an rgb color value is specified via a "#XXYYZZ" type string. The xml is being read in via NSXMLParser. I can't seem to find an easy Cocoa way to convert this value to an unsigned int. I need an unsigned int rather th

Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-14 Thread Peter Zegelin
simpler way to do this. Thanks for any help! kind regards, Peter Zegelin www.fracturedsoftware.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Re: Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-14 Thread Peter Zegelin
:image]; (I'm using GC). thanks! On 15/08/2010, at 2:08 PM, Quincey Morris wrote: > On Aug 14, 2010, at 20:28, Peter Zegelin wrote: > >> I would like the view to just have a large and resizable question mark in >> the middle but am not sure how to create one. None of t

Re: Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-15 Thread Peter Zegelin
geNamed:@"Question Mark"]]; > > Semantically, it's very similar, but the above will not actually read the > file from disk until the image data is needed. Perhaps your app can start up > faster as a result. > > -Ken > > On Sat, Aug 14, 2010 at 9:55 PM, Peter Ze

Modifying the Window Menu

2010-08-18 Thread Peter Zegelin
. Any hints/ code etc. gratefully accepted. thanks and cheers, Peter Zegelin http://www.fracturedsoftware.com Rondo - MIDI for your mac MacSimAVR - AVR microcontroller simulator for OS X___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Modifying the Window Menu

2010-08-20 Thread Peter Zegelin
On Aug 18, 2010, at 5:56 PM, Peter Zegelin wrote: > >> My app allows the user to create a number of sub windows for each document. > > >> >> I would prefer the layout to be more like Xcode where the sub windows of a >> project are added below the m

2 Beginner Bindings Questions

2010-11-02 Thread Peter Zegelin
I have two instances of the same tableview and controller that I am keeping synchronised via bindings to a common array. I have this working, in that I can add items via a button in one view and the other view instantly updates. Same with deleting selected items using [arrayController delete] v

Re: 2 Beginner Bindings Questions

2010-11-03 Thread Peter Zegelin
On 03/11/2010, at 5:49 PM, Quincey Morris wrote: > On Nov 2, 2010, at 23:08, Peter Zegelin wrote: > >> I am having great difficulty showing the same selection of items using >> bindings. I would basically like to select rows in one table and have the >> select

Re: 2 Beginner Bindings Questions

2010-11-03 Thread Peter Zegelin
On 03/11/2010, at 8:02 PM, Peter Zegelin wrote: >>> >>> My other question is related. I would like to enable the delete button only >>> if there is a selection in the table. Again, I have tried binding the >>> enabled property of the button to the controll

NSTableColumn Binding Question

2010-11-29 Thread Peter Zegelin
binding to something or do I need to do this in code? thanks and cheers! Peter Zegelin http://www.fracturedsoftware.com Rondo - MIDI for your mac MacSimAVR - AVR microcontroller simulator for OS X ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: NSTableColumn Binding Question

2010-12-01 Thread Peter Zegelin
Thanks Jonathan, I thought this would be the case and your suggestion works well. On 30/11/2010, at 8:53 PM, jonat...@mugginsoft.com wrote: > > > On 30 Nov 2010, at 01:12, Peter Zegelin wrote: > >> Hi All, >> >> I have successfully bound most of the columns

Problem Binding to UserDefaults

2010-12-01 Thread Peter Zegelin
he selected row via the control, then the results are *not* saved. The new value is correct while the app is running but never saved. Can anyone suggest what I may be doing wrong? thanks! Peter Zegelin http://www.fracturedsoftware.com Rondo - MIDI for your mac MacSimAVR - AVR microcontroller s

Re: Problem Binding to UserDefaults

2010-12-04 Thread Peter Zegelin
zip If someone could take a quick look I'd be really grateful. On 03/12/2010, at 2:19 AM, Jerry Krinock wrote: > > On 2010 Dec 01, at 21:10, Peter Zegelin wrote: > >> However, if I change the displayType of the selected row via the control, >> then the results are *n

Re: Problem Binding to UserDefaults

2010-12-05 Thread Peter Zegelin
Found the problem! I hadn't checked the 'Handles Content as Compound Value' checkbox in the Array Controller Bindings. Switching this on and all now works. On 05/12/2010, at 12:01 PM, Peter Zegelin wrote: > That doesn't appear to be the problem as adding and deleting i

Detecting MouseUp in NSSplitview

2010-12-29 Thread Peter Zegelin
I would like to detect when a user has finished dragging on a splitview divider but unfortunately just adding: - (void)mouseUp:(NSEvent *)theEvent{ [super mouseUp:theEvent]; } to my NSSplitview subclass doesn't seem to work as it never gets called. I get the mouseDown event but not the

Re: Detecting MouseUp in NSSplitview

2010-12-30 Thread Peter Zegelin
to get the mouseUp event I would have to handle the divider drag myself, which is probably more complicated than it looks. Further suggestions welcome! On 30/12/2010, at 4:38 PM, Kyle Sluder wrote: > On Wed, Dec 29, 2010 at 9:30 PM, Peter Zegelin > wrote: >> I would like to

Re: Detecting MouseUp in NSSplitview

2010-12-30 Thread Peter Zegelin
Thanks Graham, Now I get it. Works great. On 30/12/2010, at 10:39 PM, Graham Cox wrote: > > On 30/12/2010, at 8:54 PM, Peter Zegelin wrote: > >> So it looks like NSSplitView is sufficiently different ( ie it has to move a >> divider ) that to get the mouseUp

iTunes like Fast Forward and Rewind Buttons

2012-03-15 Thread Peter Zegelin
I need to implement something akin to the iTunes Fast Forward or Rewind buttons, where a quick mouse click has a different action to when the button is pressed for a longer time. I also need to link this action to a short or long press of an arrow key on the keyboard. Before I have a go myself d

ObjC Question - labeled arguments

2008-05-21 Thread Peter Zegelin
New(ish) here. After all the talk about the best way to learn Cocoa I thought I'd better brush up on my obj-c. I've been able to get an amazing distance without really understanding a lot as I am mainly using Cocoa as a gui around some C++ code and have been able to get a long way just by

Re: ObjC Question - labeled arguments

2008-05-21 Thread Peter Zegelin
On 22/05/2008, at 3:09 PM, Andrew Farmer wrote: On 21 May 08, at 21:48, Peter Zegelin wrote: After all the talk about the best way to learn Cocoa I thought I'd better brush up on my obj-c. I've been able to get an amazing distance without really understanding a lot as I am ma

Re: ObjC Question - labeled arguments

2008-05-21 Thread Peter Zegelin
On 22/05/2008, at 3:15 PM, mmalc crawford wrote: On May 21, 2008, at 9:48 PM, Peter Zegelin wrote: So my question is - is there a way to include the first label? I note that the examples in the ObjectiveC manual seem to leave the first one out also: [myRect setWidth:10.0 :15.0

Re: ObjC Question - labeled arguments

2008-05-21 Thread Peter Zegelin
xtLocation) Also I appreciate how labeled parameters would make everything much more readable - that's why I was trying to figure out how it worked and hence my question. thanks again to all who responded, Peter On 22/05/2008, at 3:44 PM, Graham Cox wrote: On 22 May 2008, at

Re: ObjC Question - labeled arguments

2008-05-22 Thread Peter Zegelin
Um - hangs head in embarrassment. It compiles but indeed it doesn't work (unrecognized selector ). After I got it to compile I thought Aha! not realizing the confusion my little question about labeled arguments would cause. Sorry about that - I'm flabbergasted that I have got so far with so

Re: using Undo with portable C++ data model

2008-06-06 Thread Peter Zegelin
On 07/06/2008, at 12:16 PM, John Richetta wrote: I have some core engine code that is written in C++, with the intent of keeping it portable. I only have a Cocoa implementation of my outer application, at present, so it's been a slightly academic exercise, but so far, most of the code in

Re: Stopping actions mid stream

2008-07-06 Thread Peter Zegelin
I agree with you but here is JoelOnSoftware saying virtually the complete opposite. http://www.joelonsoftware.com/items/ 2008/07/01.html. Fortunately most of his commenters disagree. On 06/07/2008, at 10:21 PM, Graham Cox wrote: The preferred way to do this is to prevent the user clicking th

Re: Stopping actions mid stream

2008-07-06 Thread Peter Zegelin
ways we've gone backwards. G. On 6 Jul 2008, at 11:41 pm, Peter Zegelin wrote: I agree with you but here is JoelOnSoftware saying virtually the complete opposite. http://www.joelonsoftware.com/items/2008/07/01.html . Fortunately most of his commenters disagree. On 06/07/2008, at 10:21 PM, Gr

Re: Stopping actions mid stream

2008-07-06 Thread Peter Zegelin
[NSMenuItem setToolTip:] look fine to do this. Now, just chek if this methods works even when the item is disabled. Le 6 juil. 08 à 16:31, Peter Zegelin a écrit : Some of the commenters suggest a tool tip over the disabled menu explaining why it is disabled, which sounds reasonable. As a newby here

Re: Calculating accurate bounds of stroked paths

2008-07-08 Thread Peter Zegelin
Graham, Since no-one else has replied and I'm going to have to figure out this myself, I thought I'd take a stab at it. I've uploaded some screen shots http://www.fracturedsoftware.com/downloads/Stroke20.tiff and http://www.fracturedsoftware.com/downloads/Stroke30.tiff of a simple poly l

Re: Calculating accurate bounds of stroked paths

2008-07-08 Thread Peter Zegelin
in(45) = .707 and sin(90) = 1. Therefore at 11.5deg the extension is 5x, at 45deg it is 1.414x and at 90 it is 1x (which is what you would expect). I redid my 45deg picture and I do indeed get an extension of ~1.41x Sorry for confusion. hth, peter On 09/07/2008, at 2:56 PM, Peter Zegelin

Re: Calculating accurate bounds of stroked paths

2008-07-08 Thread Peter Zegelin
en more! Peter On 09/07/2008, at 3:40 PM, Peter Zegelin wrote: Actually Graham I think I got it a bit wrong. I was working by induction and it just happened that the two data points more or less worked. My picture at 45 deg wasn't actually 45 deg (I did it on sight). However I belie

Re: Calculating accurate bounds of stroked paths

2008-07-08 Thread Peter Zegelin
Cool I got it right - finally! Its on page 154 of the spec (174 in PDF viewer) section 4.3. Me in another post "I believe the fully correct answer to calculate the extension is: (strokeWidth/2)/ sin(angle/2);" Peter On 09/07/2008, at 4:02 PM, Chris Suter wrote: "The miter limit help

Re: Calculating accurate bounds of stroked paths [SOLVED]

2008-07-09 Thread Peter Zegelin
On 09/07/2008, at 5:24 PM, Graham Cox wrote: You will need to also take into account of the line width (as I'm sure you do) so I think the combined offset would be best expressed as: max(w / 2, ml * w / 2) where ml is the mitre limit. That's right, and precisely what I'

Modifying the clip view before scrolling.

2008-04-02 Thread Peter Zegelin
I have a custom view inside a scrollview and need to modify the clip view before a user begins to scroll as I have some custom rulers built into my view. Is there any way of being notified when a user is about to scroll? I tried overriding the mousedown of the scrollview but was only able t

Using existing SQLite database with core data?

2008-04-06 Thread Peter Zegelin
I have an existing database application that uses sqlite but was not created using Core Data. Is there any reasonable way to get core data to use an existing database and 'reverse engineer' the entities and relationships to create its model? thanks! Peter __

Problems with Split Views?

2008-04-06 Thread Peter Zegelin
I am quite new to Cocoa and have been experimenting with split views in Interface Builder. It's basically 3 vertical splits with each end view also split in half horizontally. It seems to do more or less what I want. However looking around for example projects I get the impression that the

Re: Using existing SQLite database with core data?

2008-04-07 Thread Peter Zegelin
Thanks everyone - I'm quite new to this and naively assumed it might be doable. I can see now why it can't. Peter On 07/04/2008, at 12:09 PM, Peter Zegelin wrote: I have an existing database application that uses sqlite but was not created using Core Data. Is there any reasona

Constraining a NSSlider to Certain Values

2008-04-07 Thread Peter Zegelin
I'm trying to constrain the value of an NSSlider (while it is being dragged) depending on the state of a modifier key and being totally new to Cocoa am getting nowhere really fast! For a start, I don't seem to be able to find a way to test for a modifier key during the actual drag. Can a

Re: Constraining a NSSlider to Certain Values

2008-04-07 Thread Peter Zegelin
On 07/04/2008, at 9:14 PM, Allison Newman wrote: I'm no expert, but you might want to look at mouseDownFlags in NSCell. Alternatively, you can recover the modifiers from the NSEvent given in mouseDown in your control. Or, you could wait until someone that knows what they are actually tal

Re: Constraining a NSSlider to Certain Values

2008-04-07 Thread Peter Zegelin
On 07/04/2008, at 9:07 PM, Jean-Daniel Dupas wrote: Le 7 avr. 08 à 12:14, Peter Zegelin a écrit : I'm trying to constrain the value of an NSSlider (while it is being dragged) depending on the state of a modifier key and being totally new to Cocoa am getting nowhere really fast!

Re: Constraining a NSSlider to Certain Values

2008-04-07 Thread Peter Zegelin
On 07/04/2008, at 10:46 PM, Jean-Daniel Dupas wrote: Le 7 avr. 08 à 14:10, Peter Zegelin a écrit : On 07/04/2008, at 9:07 PM, Jean-Daniel Dupas wrote: Le 7 avr. 08 à 12:14, Peter Zegelin a écrit : I'm trying to constrain the value of an NSSlider (while it is being dragged) dependi

Re: Constraining a NSSlider to Certain Values

2008-04-07 Thread Peter Zegelin
On 08/04/2008, at 12:41 AM, Jean-Daniel Dupas wrote: Le 7 avr. 08 à 16:03, Peter Zegelin a écrit : On 07/04/2008, at 10:46 PM, Jean-Daniel Dupas wrote: Le 7 avr. 08 à 14:10, Peter Zegelin a écrit : On 07/04/2008, at 9:07 PM, Jean-Daniel Dupas wrote: Le 7 avr. 08 à 12:14, Peter

Re: Constraining a NSSlider to Certain Values

2008-04-07 Thread Peter Zegelin
I have managed to get my slider working the way I want it to by overriding mousedown and mousedragged, however there is still one small detail. I cant see how to make the slider knob show its 'pushed' image while the slider is being dragged. Does anyone know how to do this? thanks! Pet

Re: Problems with Split Views?

2008-04-07 Thread Peter Zegelin
NSSplitView. I continue to use Rainer's implementation every time I need a split view. Hope that helps, Ben On Apr 6, 2008, at 10:21 PM, Peter Zegelin wrote: I am quite new to Cocoa and have been experimenting with split views in Interface Builder. It's basically 3 vertical splits w

Re: Constraining a NSSlider to Certain Values

2008-04-08 Thread Peter Zegelin
I have managed to get my slider working the way I want it to by overriding mousedown and mousedragged, however there is still one small detail. I cant see how to make the slider knob show its 'pushed' image while the slider is being dragged. Does anyone know how to do this? thanks! Pet

Beginner TableView Questions

2008-04-09 Thread Peter Zegelin
I have an NSTableView with several columns of checkboxes. Each of my columns has an identifier. I also have an NSObjectController subclass acting as both data source and delegate. I can populate the table with some data. However I am stuck on how to know when a checkbox has been clicked on

Re: Beginner TableView Questions

2008-04-09 Thread Peter Zegelin
it will be called when the checkbox changes state - will be the value of the checkbox as an NSNumber and 's identifier will tell you which column it was part of, and the rowIndex tells you the row. -- S.O.S. On 9 Apr 2008, at 5:43 pm, Peter Zegelin wrote: I have an NSTableView

Re: Getting My NSTableView Delegate to Respond to Cut:Copy:Paste and Other Messages

2008-04-18 Thread Peter Zegelin
On 18/04/2008, at 4:53 PM, Jens Alfke wrote: On 17 Apr '08, at 10:46 PM, Peter Zegelin wrote: Is there some way of getting the delegate to respond to these messages? Nope. Unfortunately, everyone has to do what you did (subclass NSTableView) just to make the table follow t

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Peter Zegelin
On 18/04/2008, at 10:28 PM, Graham Cox wrote: On 18 Apr 2008, at 10:19 pm, Scott Thompson wrote: On Apr 17, 2008, at 4:28 AM, Heinrich Giesen wrote: Sorry, pressed the wrong button. And: if the bezier path shall always be drawn 1 pixel wide, independent of resolution and scaling the l

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Peter Zegelin
On 18/04/2008, at 11:06 PM, Graham Cox wrote: On 18 Apr 2008, at 11:01 pm, Peter Zegelin wrote: Weird - I just set the stroke width of my selection rectangle to 0 and didn't get anything. Peter What function is drawing? I'm not sure this works with NSFrameRectWithWidth

Implementing a Slightly Unusual NSTableView

2008-04-19 Thread Peter Zegelin
I have a tableview representing the layers of a drawing application. The tableview has several columns of checkboxes, some status columns and an editable text column for the layer name. The rows of the tableview are selectable (multiple selection) so they can be reordered and cut, copied a

Re: Implementing a Slightly Unusual NSTableView

2008-04-20 Thread Peter Zegelin
iew and the checkbox cell: hope this is useful, G. On 19 Apr 2008, at 8:05 pm, Peter Zegelin wrote: I have a tableview representing the layers of a drawing application. The tableview has several columns of checkboxes, some status columns and an editable text column for the layer name. The

Re: Implementing a Slightly Unusual NSTableView

2008-04-20 Thread Peter Zegelin
nd thanks for your help, Peter G. On 20 Apr 2008, at 5:06 pm, Peter Zegelin wrote: Hi Graham, This is great - worked like a charm first time. Many, many thanks! The only thing I think I need to do now is to get the TableView to become first responder when I don't click on a

Re: Implementing a Slightly Unusual NSTableView

2008-04-21 Thread Peter Zegelin
Thanks Graham - I have updated my code as well. I also think I solved the focus problem. Tried most of the responder methods without luck so I took a different tack. I realized that I would only have 3 views that could grab the focus so I created a global variable 'currentResponder' (will

Using an NSTableHeaderView as a Custom View

2008-04-28 Thread Peter Zegelin
I would like to use the gradiant image found in the standard NSTableHeaderView as the background image of my own view. I thought I could just create a subclass of NSTableVIew and draw my own stuff after letting the view draw itself first, however just a NSTableHeaderView on its own crashes

View Getting MouseUp Without Corresponding MouseDown

2008-04-28 Thread Peter Zegelin
't get the message in my other view so its not really a problem - I just want to make sure nothing is wrong. thanks! Peter Zegelin www.fracturedSoftware.com - MIDI for your Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: View Getting MouseUp Without Corresponding MouseDown

2008-04-28 Thread Peter Zegelin
- (void)rulerView:(NSRulerView *)aRulerView handleMouseDown:(NSEvent *)theEvent; ?? G. On 29 Apr 2008, at 12:05 pm, Peter Zegelin wrote: I have a view that creates a 'Tool' on MouseDown and then releases it on MouseUp. This view also has siblings (my own rulers) that are hidden and s

Re: View Getting MouseUp Without Corresponding MouseDown

2008-04-29 Thread Peter Zegelin
Thanks for that - makes sense I guess! Peter On 29/04/2008, at 2:26 PM, Rob Petrovec wrote: FYI, same thing happens in Carbon. Its technically a feature for Drag support. --Rob On Apr 28, 2008, at 8:51 PM, Peter Zegelin wrote: Hi Graham, I don't think so as they are my own r

Converting From Simple to Doc Based App - Problems with Menus

2008-04-30 Thread Peter Zegelin
would appreciate some advice. Should I really have the menu in the Document nib? I tried that and got some funny extra menus at the beginning of the menubar. Should I have my main menu in the doc nib and just a basic one in the 'MainMenu' nib? thanks! Peter Zegelin __

Re: Converting From Simple to Doc Based App - Problems with Menus

2008-04-30 Thread Peter Zegelin
cific view). hth, G. On 1 May 2008, at 3:15 pm, Peter Zegelin wrote: Being new to Cocoa I started my project with a Simple Cocoa Application template. I have now converted to a Doc Based template by adding all my code and adding my delegates and substituting my window in the Document nib.

How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Peter Zegelin
I would like my application to have a 'Visit Website..' menu but I can't figure out how to get the users default web browser to open and automatically send it to my website. I would also like to be able to automatically fire up their email client and fill in the address and subject (for bug

Re: How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Peter Zegelin
16 PM, Michael Vannorsdel wrote: Checkout NSWorkspace's openURL:. NSWorkspace is there to help your program when dealing with external programs and functionality. On May 1, 2008, at 9:02 PM, Peter Zegelin wrote: I would like my application to have a 'Visit Website..' menu

Re: How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Peter Zegelin
Thanks all - that was it. It was an encoding problem and it is now working perfectly. Peter ___ 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-

Updating a Static Text and Slider From High Priority Thread While Resizing a Window

2008-10-18 Thread Peter Zegelin
x27;t updating. Is there any way to get these items to update under these circumstances? I tried calling [label setNeedsDisplay] but that just caused a crash. thanks! Peter Zegelin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Updating a Static Text and Slider From High Priority Thread While Resizing a Window

2008-10-19 Thread Peter Zegelin
n loop and only updates the window when it actually changes size. Interestingly an app such as GarageBand also stops updating its GUI if a song is playing and you click and hold on the resize widget. Peter On 19/10/2008, at 1:36 PM, Andrew Merenbach wrote: On Oct 18, 2008, at 7:27 PM, Andr

Re: Updating a Static Text and Slider From High Priority Thread While Resizing a Window [SOLVED]

2008-10-19 Thread Peter Zegelin
Actually I just found an old thread: 'Problem redrawing views while window resize button is held' and the suggestion was to use [window displayIfNeeded]; to force a window update. This works, so problem solved. Thanks again, Peter On 20/10/2008, at 2:33 PM, Peter Zegelin wrot

Automatically replacing part of text in a text label

2009-03-15 Thread Peter Zegelin
I have some text labels in a registration dialog that contain the application name eg "xxx Demonstration" "Thank you for purchasing xxx" and so on. I would like this registration dialog to be general enough that I can use it in multiple applications. Is there a simple way to replace the x

Re: Automatically replacing part of text in a text label

2009-03-16 Thread Peter Zegelin
On 16/03/2009, at 6:52 PM, Mark Ritchie wrote: On 16-Mar-09, at 2:20 AM, Peter Zegelin wrote: I would like this registration dialog to be general enough that I can use it in multiple applications. Is there a simple way to replace the xxx with the actual application name at runtime? At the

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Peter Zegelin
On 16/03/2009, at 5:20 PM, Peter Zegelin wrote: OK - thanks everyone. Just as I was about to wire things up in IB I realised that a subclass of NSTextField would be the best way. Turns out its a one liner in awakeFromNib. - (void)awakeFromNib { [self setStringValue:[[self

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Peter Zegelin
age] mutableString]; [warranty replaceOccurrencesOfString:@"" withString: [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] options:NSLiteralSearch range:NSMakeRange(0, [warranty length])]; Peter On 18/03/2009, at 2:17 PM, Michael Ash wrote: On Tue, Mar 17

Weird NSTableView with checkboxes issue

2009-03-18 Thread Peter Zegelin
I have an NSTableView in a sheet window. It has one column and a valid dataSource and delegate. There are 128 rows. If I populate the view with Textcells, sliders or popup button cells the tableview scrolls normally, but if I populate the listbox with checkbox cells the scrolling becomes e

Re: Weird NSTableView with checkboxes issue

2009-03-18 Thread Peter Zegelin
works fine. -- From: "Peter Zegelin" Sent: Thursday, March 19, 2009 1:12 PM To: "Cocoa Development" Subject: Weird NSTableView with checkboxes issue I have an NSTableView in a sheet window. It has one column and a valid dataSource and delegate. There are 128

Using NSValueTransformer to convert NSImage to NSData

2009-03-24 Thread Peter Zegelin
I am trying to bind an NSImageView to my shared user defaults so that when a user drops an image onto the control it is automatically scaled and saved to the users preferences file. I have made a subclass of NSValueTransformer to convert NSImage <> NSData for saving to the defaults but am h

Re: Using NSValueTransformer to convert NSImage to NSData

2009-03-24 Thread Peter Zegelin
On 25/03/2009, at 1:18 AM, I. Savant wrote: On Tue, Mar 24, 2009 at 8:39 AM, Peter Zegelin wrote: [value description] gives just a string <> with nothing obvious in it. This is basic Cocoa 101: I know. I was expecting the class description to show som

  1   2   >