Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread dangerwillrobinsondanger
> On Apr 8, 2016, at 7:32 PM, Graham Cox wrote: > > By exposing the bindings that an object supports and creating an Interface > Builder palette, you can make instances of your own classes bindable in > Interface Builder.” > > If this information is still correct,

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Nivek Research
For anyone interested I decided to implement a subclass of NSObjectController. Each NSMatrix object is removed from the NIB and replaced with individual NSRadioButtons. I then add an NSObjectController instance to the NIB for each NSMatrix replaced and set its class to RadioGroupController. I

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 10:32 PM, Graham Cox wrote: > > Your controller might, and could effect the binding in code, using -[NSObject > bind:toObject:withKeyPath:options:] and an outlet to the group view. As work > goes, that’s pretty minimal, and affects only the

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
no understanding of a custom view and its properties. > Ideally I would also like one that can mostly be configured from IB as one > would do today with NSMatrix. Well, you can stick with NSMatrix. But unless Apple come up with something like this type of group view that you can bind to (if

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Nivek Research
Hi Graham, I believe the part you are missing is the ability to use bindings and ideally bindings setup in IB. The bulk of Sean McBride’s code simulates the binding behavior of NSMatrix (i.e., keeping a model property in sync with the visual display and vice versa) and his code does this only

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 8:44 PM, Graham Cox wrote: > > Off the top of my head I can imagine how this code would look and with due > respect to Sean, it would be a lot less complicated than RRRadioBinder. OK, here’s what I had in mind. Super simple, tested and works, though

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 7:55 PM, Nivek Research <nivek.resea...@gmail.com> wrote: > > The code Sean McBride provided shows the lengths one has to go to in order to > approximately replace the binds offered by NSMatrix. Again, I am not opposed > to the work, but it does s

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Nivek Research
Reworking the view controller to have a bunch of outlets to buttons is what I am trying to avoid. The original implementation simply bound the radio group (NSMatrix) either to a numeric property or to an object property on the model. The code Sean McBride provided shows the lengths one has

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread dangerwillrobinsondanger
> On Apr 8, 2016, at 3:37 PM, Shane Stanley wrote: > > But that doesn't help with the problem of bindings for selectedIndex, does it? The point is you create a different property that gets set by the action method. Bind to that property. It reduces code but

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread dangerwillrobinsondanger
It's hard to find. asciiwwdc site makes it discoverable. As far as I can tell it was only there (so in a video) but might be in some release notes though those often don't show up in searches. The programming guide docs are generally woefully out of date for controls that don't come inside of

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Graham Cox
> On 8 Apr 2016, at 4:37 PM, Shane Stanley wrote: > > But that doesn't help with the problem of bindings for selectedIndex, does it? > Well, it provides you with a behaviour that is then trivial to leverage to get the bindings behaviour you need - just make a

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-08 Thread Shane Stanley
On 8 Apr 2016, at 9:23 AM, Graham Cox wrote: > > If you have a bunch of “naked” radio buttons, all having the same target and > selector (but presumably different tags, so you can distinguish them), they > will automatically act as a group. But that doesn't help with

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Graham Cox
> On 8 Apr 2016, at 5:36 AM, Nivek Research <nivek.resea...@gmail.com> wrote: > > I have a number of NSMatrix instances that group radio buttons. Most bind the > selectedIndex or selectedTag bindings available on NSMatrix to a numeric > value in a model ob

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Jeff Szuhay
>> I have a number of NSMatrix instances that group radio buttons. Most >> bind the selectedIndex or selectedTag bindings available on NSMatrix to >> a numeric value in a model object. The others bind the contentObjects >> and selectedObject binding available on NSMatrix. As NS

Re: Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Sean McBride
On Thu, 7 Apr 2016 15:36:51 -0400, Nivek Research said: >I have a number of NSMatrix instances that group radio buttons. Most >bind the selectedIndex or selectedTag bindings available on NSMatrix to >a numeric value in a model object. The others bind the contentObjects >and selectedOb

Alternatives to NSMatrix that uses bindings similar to NSMatrix's bindings

2016-04-07 Thread Nivek Research
I have a number of NSMatrix instances that group radio buttons. Most bind the selectedIndex or selectedTag bindings available on NSMatrix to a numeric value in a model object. The others bind the contentObjects and selectedObject binding available on NSMatrix. As NSMatrix is informally

tooltips on NSMatrix cells

2014-02-05 Thread Graham Cox
Hi, I have tooltips on cells in a NSMatrix. These have always worked fine, but now I'm compiling using the 10.9 SDK, they no longer work. I've always simply set these in IB. Now, I find that if I ask the matrix for the tooltips for each of its ells in -awakeFromNib (as a test) they're all nil

Re: tooltips on NSMatrix cells

2014-02-05 Thread Scott Ribe
On Feb 5, 2014, at 5:20 PM, Graham Cox graham@bigpond.com wrote: Anyone else noticed this? Is this just a bug in the latest IB (XCode 5.0.2) or are tooltips for NSMatrix cells no longer supported? Yes. Apparently no longer supported--in fact, it's not an Xcode thing, go grab yourself

Re: tooltips on NSMatrix cells

2014-02-05 Thread Graham Cox
On 6 Feb 2014, at 11:29 am, Scott Ribe scott_r...@elevated-dev.com wrote: Yes. Apparently no longer supported--in fact, it's not an Xcode thing, go grab yourself an older build of your app and check the tooltips on 10.9 (or 10.8 for that matter)... Hi Scott, My older builds show the

Re: tooltips on NSMatrix cells

2014-02-05 Thread Graham Cox
On 6 Feb 2014, at 11:42 am, Graham Cox graham@bigpond.com wrote: XCode 5.0 or 5.0.1 (a bit hard to say for certain). Something changed in XCode 5.0.2 it seems. Checking the Xcode info embedded in the info.plist, it's definitely OK for 5.0.1, and broken in 5.0.2. --Graham

Re: tooltips on NSMatrix cells

2014-02-05 Thread Scott Ribe
On Feb 5, 2014, at 5:42 PM, Graham Cox graham@bigpond.com wrote: My older builds show the tooltips fine on 10.9 (compiled against 10.8 SDK with Xcode 4.6.x). That's weird, because mine do not. (Compiled against 10.6 SKD with Xcode 3.2.6.) -- Scott Ribe scott_r...@elevated-dev.com

NSMatrix used as menu item's view appears wrong

2013-05-28 Thread Steve Mills
/ggzuq19o1ziy8av/menu-item-view-wrong.png Obviously, the top part is wrong and the top part is how it's supposed to look. I can flick my scrollwheel/trackpad and it will correct the placement of the view within the menu item. The view set on the menu item is an NSMatrix containing NSButtonCells

Re: NSMatrix used as menu item's view appears wrong

2013-05-28 Thread Uli Kusterer
: It selects an item number beyond your NSMatrix, and scrolls it into view, thus scrolling your matrix off-screen. Could that be it? I admit I would expect a little continuation arrow at the bottom of your menu in that case, though. Cheers, -- Uli Kusterer The Witnesses of TeachText are everywhere

Re: NSMatrix used as menu item's view appears wrong

2013-05-28 Thread Steve Mills
On May 28, 2013, at 18:08:55, Uli Kusterer witness.of.teacht...@gmx.net wrote: My guess is this is what's happening in your case: It selects an item number beyond your NSMatrix, and scrolls it into view, thus scrolling your matrix off-screen. Could that be it? I admit I would expect a little

Placing Cells in an NSMatrix

2012-04-04 Thread Peter Teeson
Xcode 4.3, Lion 10.7.3 Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed from NSButton the X origins of column 0 cells seem to be 1.0 point inside the Matrix bounds. So if I want to stroke the Matrix bounds with a line width of e.g. 4.0 points it draws over the left

Re: Placing Cells in an NSMatrix

2012-04-04 Thread Fritz Anderson
On 4 Apr 2012, at 2:20 PM, Peter Teeson wrote: Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed from NSButton the X origins of column 0 cells seem to be 1.0 point inside the Matrix bounds. So if I want to stroke the Matrix bounds with a line width of e.g. 4.0

Re: Placing Cells in an NSMatrix

2012-04-04 Thread Peter Teeson
On 2012-04-04, at 5:02 PM, Fritz Anderson wrote: On 4 Apr 2012, at 2:20 PM, Peter Teeson wrote: Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed from NSButton the X origins of column 0 cells seem to be 1.0 point inside the Matrix bounds. So if I want

Re: Placing Cells in an NSMatrix

2012-04-04 Thread Peter Teeson
On 2012-04-04, at 6:52 PM, Peter Teeson wrote: On 2012-04-04, at 5:02 PM, Fritz Anderson wrote: On 4 Apr 2012, at 2:20 PM, Peter Teeson wrote: Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed from NSButton the X origins of column 0 cells seem to be 1.0 point

Re: Placing Cells in an NSMatrix

2012-04-04 Thread Erik Stainsby
Anderson wrote: On 4 Apr 2012, at 2:20 PM, Peter Teeson wrote: Given a 3 x 3 Matrix which is a sub-class of NSMatrix with Cells sub-classed from NSButton the X origins of column 0 cells seem to be 1.0 point inside the Matrix bounds. So if I want to stroke the Matrix bounds with a line width

NSMatrix, NSForm - addRow - why above and not below?

2012-03-13 Thread Grandinetti Philip
I'm running into a strange behavior with NSForm (and also NSMatrix). (1) Using interface builder (in Xcode 4.3.1) I place an NSForm in a window. I add a NSButton and wire it to an IBAction that sends addRow to the NSForm. - (IBAction) addRow:(id)sender { [form addRow]; [form sizeToCells

Re: NSMatrix, NSForm - addRow - why above and not below?

2012-03-13 Thread Keary Suska
On Mar 13, 2012, at 8:55 AM, Grandinetti Philip wrote: I'm running into a strange behavior with NSForm (and also NSMatrix). (1) Using interface builder (in Xcode 4.3.1) I place an NSForm in a window. I add a NSButton and wire it to an IBAction that sends addRow to the NSForm. - (IBAction

Re: NSMatrix, NSForm - addRow - why above and not below?

2012-03-13 Thread Fritz Anderson
On 13 Mar 2012, at 12:49 PM, Keary Suska wrote: It is a bit deceptive, but the problem is not what you think. The row is in fact added at the bottom, but when the view is resized it is sized from the bottom left corner, instead of the top left, which is intuitive for humanity but not

Re: NSMatrix, NSForm - addRow - why above and not below?

2012-03-13 Thread Grandinetti Philip
behavior with NSForm (and also NSMatrix). (1) Using interface builder (in Xcode 4.3.1) I place an NSForm in a window. I add a NSButton and wire it to an IBAction that sends addRow to the NSForm. - (IBAction) addRow:(id)sender { [form addRow]; [form sizeToCells]; } The problem

Is it possible to use Radio Group(NSMatrix) in a different way?

2011-10-17 Thread Bill David
to implement it. But as radio group must have all options(radio buttons) close to each other, I tried to use multiple Radio Groups(NSMatrix) to implement it as I need only one option selected at the same time, i.e. use a radio group for each option and use code to ensure only one option selected each

Initializing Radio buttons in an NSMatrix problem

2011-08-01 Thread John James
Using Lion: I have a NSMatrix 1 row 3 cols. at Startup I can not get the first radio button to show an indication; works fine if user clicks on any one. Relavent code (called from awakeFromNib): (framesPersec is an outlet for the NSMatrix with tags 1,2,3 respectively) - (void) initFramespersec

Re: Initializing Radio buttons in an NSMatrix problem

2011-08-01 Thread Fritz Anderson
On 1 Aug 2011, at 7:47 AM, John James wrote: Using Lion: I have a NSMatrix 1 row 3 cols. at Startup I can not get the first radio button to show an indication; works fine if user clicks on any one. Relavent code (called from awakeFromNib): (framesPersec is an outlet for the NSMatrix

Re: IB 3x plug-in: How to add custom control which is NSMatrix with custom controls inside?

2011-05-10 Thread Laurent Daudelin
to do it in IB. 07-May-11 01:50, Lee Ann Rucker пишет: On May 6, 2011, at 8:34 AM, Vyacheslav Karamov wrote: Hi All! I have to support rather old project, so I had to rewrite IB 2x palette in order to open project's NIBs. In old IB 2x pallete code several instances of NSMatrix with custom

Re: NSMatrix bindings

2011-03-24 Thread Ken Thomases
On Mar 24, 2011, at 2:51 AM, Christian Ziegler wrote: so I tried it the way Ken described it. However if I start the app, the Matrix is empty. I created the Matrix and all Cells with their titles in IB, assuming that these objects will be created after the nib was loaded. The

Re: NSMatrix bindings

2011-03-19 Thread Christian Ziegler
On Mar 18, 2011, at 10:14 PM, Ken Thomases wrote: On Mar 18, 2011, at 3:45 AM, Christian Ziegler wrote: I'm having hard times figuring out how to bind an NSMatrix properly. I got an NSMatrix with NSButtonCells (checkboxes) and I want to somehow bind to my model which of these checkboxes

NSMatrix bindings

2011-03-18 Thread Christian Ziegler
Hi all! I'm having hard times figuring out how to bind an NSMatrix properly. I got an NSMatrix with NSButtonCells (checkboxes) and I want to somehow bind to my model which of these checkboxes are selected. What should work is binding the content objects of the NSMatrix to an ArrayController

Re: NSMatrix bindings

2011-03-18 Thread Ken Thomases
On Mar 18, 2011, at 3:45 AM, Christian Ziegler wrote: I'm having hard times figuring out how to bind an NSMatrix properly. I got an NSMatrix with NSButtonCells (checkboxes) and I want to somehow bind to my model which of these checkboxes are selected. What should work is binding

Setting a discontinuous selection in NSMatrix

2011-01-18 Thread James Bucanek
Greetings, I have an NSMatrix view that's driving me nuts. It's mode is set to NSListModeMatrix, which allows the user to click, shift+click, command+click, and drag to create arbitrary selections of cells. I can get the set of selected cells by sending -selectedCells. However, I can find

Re: Setting a discontinuous selection in NSMatrix

2011-01-18 Thread Sherm Pendley
On Tue, Jan 18, 2011 at 9:45 PM, James Bucanek subscri...@gloaming.com wrote: I have an NSMatrix view that's driving me nuts. It's mode is set to NSListModeMatrix, which allows the user to click, shift+click, command+click, and drag to create arbitrary selections of cells. I can get the set

Re: Setting a discontinuous selection in NSMatrix

2011-01-18 Thread James Bucanek
James Bucanek mailto:subscri...@gloaming.com wrote (Tuesday, January 18, 2011 7:45 PM -0700): However, I can find no way of programmatically setting an arbitrary selection. Everything I've tried (-selectCell:, -selectCellAtRow:column:, even -[NSCell setState:]), either doesn't update the

Re: Setting a discontinuous selection in NSMatrix

2011-01-18 Thread James Bucanek
Sherm Pendley mailto:sherm.pend...@gmail.com wrote (Tuesday, January 18, 2011 8:01 PM -0500): Try -setSelectionFrom:to:anchor:highlight: Sherm, You're right: -setSelectionFrom:to:anchor:hightlight: is the only way to do it. I tried the suggestion documented in -selectedCells and it

NSMatrix selectedRow, selectedColumn

2010-08-21 Thread koko
Below is the implementation of an NSMatrix subclass. What I do not understand is the NSLog output from -mouseDown. No matter which cell I click I always get the following, i.e row and column are always -1. 2010-08-21 11:16:48.705 Customize It[965:813] mouse down 2010-08-21 11:16:48.706

Re: NSMatrix selectedRow, selectedColumn

2010-08-21 Thread Graham Cox
On 21/08/2010, at 7:19 PM, k...@highrolls.net wrote: - (void)mouseDown:(NSEvent *)theEvent { NSLog(@r %d c %d, [self selectedRow], [self selectedColumn]); } Since you've completely overridden the standard -mouseDown: event handling, NSMatrix is unable to process the click

Re: NSMatrix selectedRow, selectedColumn

2010-08-21 Thread koko
overridden the standard -mouseDown: event handling, NSMatrix is unable to process the click into a selected row and column, Try calling super's implementation prior to logging the result. It's also possible that the result is not available until mouseUp. --Graham

Re: Deselect keyboard focus of an NSMatrix cell

2010-07-25 Thread Jochen Moeller
Hello Kyle, you are right, I did not call -endEditingFor: because in the example given in the reference this method is only called when -makeFirstResponder: returns NO. But in my case -makeFirstResponder:view returns YES, so the view (custom content view or text field object) should have the

Re: Deselect keyboard focus of an NSMatrix cell

2010-07-24 Thread Jochen Moeller
Hi, so it is programmatically still not possible to give the key focus to a view with -makeFirstResponder: when a text field cell is selected in a matrix. Therefore I submitted a bug report with Bug ID# 8231732. My workaround is to replace the matrix by single text field objects. Regards,

Re: Deselect keyboard focus of an NSMatrix cell

2010-07-24 Thread Kyle Sluder
On Jul 24, 2010, at 3:03 PM, Jochen Moeller jo.moel...@online.de wrote: Hi, so it is programmatically still not possible to give the key focus to a view with -makeFirstResponder: when a text field cell is selected in a matrix. Therefore I submitted a bug report with Bug ID# 8231732. I

Deselect keyboard focus of an NSMatrix cell

2010-07-22 Thread Jochen Moeller
editable NSTextFieldCell objects in an NSMatrix I found no way to do that. The -makeFirstResponder: method seems not to respond. I tried this: 1. Same as above. 2. Additional a custom content view which returned YES for -acceptsFirstResponder and -canBecomeKeyView. 3. Additional modifying

Re: Deselect keyboard focus of an NSMatrix cell

2010-07-22 Thread Kyle Sluder
isFieldEditor]. When using editable NSTextField objects I can achieve this in the action method with:    [ window makeFirstResponder:[ window contentView ]]; But when using editable NSTextFieldCell objects in an NSMatrix I found no way to do that. The -makeFirstResponder: method seems

Re: Deselect keyboard focus of an NSMatrix cell

2010-07-22 Thread Jochen Moeller
the NSMatrix but doesn't. Am 22.07.2010 um 22:26 schrieb Kyle Sluder: Jochen Moeller wrote: The -makeFirstResponder: method seems not to respond. -makeFirstResponder: returns a BOOL. See the documentation for -[NSWindow endEditingFor:] for what to do when -makeFirstResponder: returns

NSMatrix setState and setSelectionFrom

2010-07-02 Thread koko
while(index != NSNotFound) { for(i=0;icount;i++) { BMatrixCell *bmxc = [cells objectAtIndex:i]; int cmp = bfn.GetFileName().CompareNoCase(bmxc- mBFilename.GetFileName()); if(cmp == 0)

Connect action to NSMatrix

2010-04-09 Thread koko
I guess I could do this in code but I am wondering why I cannot connect an action to a NSMatrix in IB? I have done this before with an NSMAtrix of radio buttons. This is an NSMatirx of check boxes. When I drag from the action in the HUD to the NSMAtrix all that cam be selected

alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Eric Boo
Hi All, I have an NSView in which I'm placing an NSMatrix, with the number of columns modifiable by the user. The problem is that I need to have cells of differences sizes in the NSMatrix so perhaps NSMatrix is not suitable for me. The user will be able to drag stuff (text, images etc

Re: alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Steven Degutis
I'm placing an NSMatrix, with the number of columns modifiable by the user. The problem is that I need to have cells of differences sizes in the NSMatrix so perhaps NSMatrix is not suitable for me. The user will be able to drag stuff (text, images etc) into each cell, resulting in differing

Re: alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Eric Boo
. (Especially that new one with the artwork.) -Steven On Wed, Feb 17, 2010 at 6:17 AM, Eric Boo eric...@gmail.com wrote: Hi All, I have an NSView in which I'm placing an NSMatrix, with the number of columns modifiable by the user. The problem is that I need to have cells of differences sizes

Re: alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Matt Neuburg
On Wed, 17 Feb 2010 19:17:51 +0800, Eric Boo eric...@gmail.com said: Hi All, I have an NSView in which I'm placing an NSMatrix, with the number of columns modifiable by the user. The problem is that I need to have cells of differences sizes in the NSMatrix so perhaps NSMatrix is not suitable

Re: NSMatrix -renewRows:columns: doesn't change cell count

2009-11-03 Thread Matt Neuburg
On Mon, 02 Nov 2009 19:28:28 -0800, Matt Neuburg m...@tidbits.com said: If I say: [myMatrix renewRows:5 columns:5]; and then later: [myMatrix renewRows:3 columns:3]; int i = [[myMatrix cells] count]; // i is 25 Is this a bug? Well, I have submitted it as one to Apple. We shall see what we

NSMatrix -renewRows:columns: doesn't change cell count

2009-11-02 Thread Matt Neuburg
If I say: [myMatrix renewRows:5 columns:5]; and then later: [myMatrix renewRows:3 columns:3]; int i = [[myMatrix cells] count]; // i is 25 Is this a bug? I know that renewRows:columns: doesn't release cells (the docs tell me so), but I do expect that the cells method will report the cells that

Re: Creating NSMatrix of NSImageCells

2009-10-12 Thread PCWiz
I ended up using an NSCollectionView, which was much easier to implement. Thanks for the advice! On 2009-10-11, at 4:58 PM, Graham Cox wrote: On 12/10/2009, at 7:20 AM, PCWiz wrote: I need to create an NSMatrix with NSImageCells bound to an array controller. So the content

Creating NSMatrix of NSImageCells

2009-10-11 Thread PCWiz
I need to create an NSMatrix with NSImageCells bound to an array controller. So the content of the NSMatrix is bound to an NSArray (so there are as many NSImageCells in the matrix as there are objects in the array), then the image path of the NSImageCells are bound to a key called iconPath

Re: Creating NSMatrix of NSImageCells

2009-10-11 Thread Graham Cox
On 12/10/2009, at 7:20 AM, PCWiz wrote: I need to create an NSMatrix with NSImageCells bound to an array controller. So the content of the NSMatrix is bound to an NSArray (so there are as many NSImageCells in the matrix as there are objects in the array), then the image path

Programmatically creating a NSMatrix with a prototype cell question

2009-06-20 Thread David Hoerl
Create a NSTextFieldCell and customize it. Create a NSMatrix using the prototype init version, and display it. All the custom formatting is gone - all cells are vanilla NSTextFieldCells. Loop through the matrix, and set each cell to a copy of the cell I used as a prototype, using the putCell

Re: programmatically creating a NSMatrix with a prototype cell

2009-06-20 Thread Bertil Holmberg
:)]; [colorCell autorelease]; // Initial size of the buttons matrix float mSize = 37 * squares - 2; // Create the matrix of tri-state color capable buttons protoMatrix = [[NSMatrix alloc] initWithFrame:NSMakeRect(20, 60, mSize, mSize

Re: NSMatrix of NSButtonCells prototype bindings not applied to instances in matrix

2009-04-13 Thread Ron Lue-Sang
On Apr 6, 2009, at 19:35 , Ben Golding wrote: I've been trying to create a calendar matrix of days which are clickable to select a day in the month. It's a something of a classic example of using NSMatrix from what I've read but I'm trying to use bindings to hook it up. I am using

NSMatrix of NSButtonCells prototype bindings not applied to instances in matrix

2009-04-06 Thread Ben Golding
I've been trying to create a calendar matrix of days which are clickable to select a day in the month. It's a something of a classic example of using NSMatrix from what I've read but I'm trying to use bindings to hook it up. I am using an NSArrayController holding an array

Binding NSMatrix to user Defaults

2009-03-23 Thread Vijay Kanse
Hello List, I created NSMatrix contains two radio buttons. I am binding its selected index with shared user defaults. Now i want to make UI such that when user make first radio button ON it should enable one other radio button Matrix. and when user make second radio button OFF It should disable

Subclassing NSMatrix to tile with hexagons

2009-02-10 Thread Matthew Anderson
Hello All -- I'm trying to subclass NSMatrix to lay cells out in a hexagonal tiling instead of a proper grid (as a foundation for a game with a hexagonally tiled board). It seemed an appropriate base class, as I still index cell locations with rows and columns. Cells are constrained

Re: NSMatrix, scroll wheel and tool tips

2009-02-04 Thread David Blanton
I am at a loss as there appears to be nothing in NSMatrix or NSScroller that would deal with this behavior. Thanks for you comments. On Feb 3, 2009, at 4:28 PM, Graham Cox wrote: On 4 Feb 2009, at 4:45 am, David Blanton wrote: I have an NSMatrix (sub-classed) of NSImage cells. I set

NSMatrix, scroll wheel and tool tips

2009-02-03 Thread David Blanton
I have an NSMatrix (sub-classed) of NSImage cells. I set the appropriate tool tip for each cell. When scrolling the matrix using the knob or scroll buttons the tool tips are fine. When scrolling the matrix using the wheel on the mouse the tool tips are incorrect. Touching the knob after

Re: NSMatrix, scroll wheel and tool tips

2009-02-03 Thread Graham Cox
On 4 Feb 2009, at 4:45 am, David Blanton wrote: I have an NSMatrix (sub-classed) of NSImage cells. I set the appropriate tool tip for each cell. When scrolling the matrix using the knob or scroll buttons the tool tips are fine. When scrolling the matrix using the wheel on the mouse

Can I replace NSMatrix contents in the action method

2008-12-26 Thread Jeffrey Scofield
I have an application that was crashing mysteriously. After much effort I boiled it down to a fairly small example, reproduced below. In the example, there's an NSMatrix containing 9 NSButtonCells. When the user clicks on one of the buttons, all of the button cells are replaced with newly

Custom button cells for NSMatrix

2008-10-20 Thread norio
Hi, I'm trying to make a custom cell object for NSMatrix which behaves like radio button, this is, when you press the second cell, the second cell is highlighting still. Would you tell me which method I need to override? Thank you. Norio

Re: Custom button cells for NSMatrix

2008-10-20 Thread Ricky Sharp
This is actually quite difficult. I can send you details later today. In my case, I needed accessibility and mimic the Aqua radio buttons in terms of all their behaviors. I ended up subclassing NSMatrix and NSActionCell. I could not get a subclass of NSButtonCell in an NSMatrix to work

Re: Custom button cells for NSMatrix

2008-10-20 Thread Benjamin Dobson
Highlighting each cell in a matrix will let you change the image for it. On 20 Oct 2008, at 12:19:04, norio wrote: Hi, I'm trying to make a custom cell object for NSMatrix which behaves like radio button, this is, when you press the second cell, the second cell is highlighting still

Re: Custom button cells for NSMatrix

2008-10-20 Thread Ricky Sharp
On Oct 20, 2008, at 6:23 AM, Ricky Sharp wrote: This is actually quite difficult. I can send you details later today. In my case, I needed accessibility and mimic the Aqua radio buttons in terms of all their behaviors. I ended up subclassing NSMatrix and NSActionCell. I could not get

Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell

2008-09-16 Thread Oleg Krupnov
Thanks Graham. I have checked your DrawKit demo and indeed everything seems identical except that your code works and mine does not :) Well, I ended up with copy/pasting the XIB of your tool palette and its associated window controller and then completely replacing your code with mine. Guess

Can't get to work setDoubleAction on NSMatrix with NSButtonCell

2008-09-15 Thread Oleg Krupnov
I've read all the docs and the archives of this list, but I can't seem to find what's wrong with my code: (in MyWindowController) @interface MyWindowController : NSWindowController { IBOutlet NSMatrix* matrix; } @end @implementation MyWindowController - (void)windowDidLoad

Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell

2008-09-15 Thread Graham Cox
On 16 Sep 2008, at 6:01 am, Robert Martin wrote: I wonder whether Button Cells are built to provide double-click actions (seems kind of weird if they do). Well, it works for me. In my case I have a palette of tool buttons. The single-click selects the tool, but the double-click provides

Re: NSMatrix mouse puzzle

2008-09-04 Thread D.K. Johnston
Thanks for your reply. The index variable is actually i: I forgot to change it when pasting the code into the email. So it does terminate after 10 seconds. The reason I want a delay is that the user is supposed to have 10 seconds only to look at the data displayed in the matrix. Then it's

Re: NSMatrix mouse puzzle

2008-09-04 Thread Graham Cox
On 4 Sep 2008, at 4:14 pm, D.K. Johnston wrote: The reason I want a delay is that the user is supposed to have 10 seconds only to look at the data displayed in the matrix. Then it's cleared. (It's a memory test, to prevent drunks from starting a computer.) I was looking at NSTimer, but

NSMatrix mouse puzzle

2008-09-03 Thread D.K. Johnston
I've got a matrix of buttons in a window that I want to disable for a short period, while data is being displayed. So I wrote something like this: [theMatrix setEnabled:NO]; // wait 10 seconds NSUInteger i = 0, resume = time( nil ) + 10; while( i

Re: NSMatrix mouse puzzle

2008-09-03 Thread Graham Cox
On 4 Sep 2008, at 2:40 pm, D.K. Johnston wrote: // wait 10 seconds NSUInteger i = 0, resume = time( nil ) + 10; while( i resume ) index = time( nil ); Don't do this! This is not a good way to wait for a period of time, even if waiting for a

DnD in NSMatrix

2008-06-29 Thread Micha Fuhrmann
Dear all, I'm subclassing NSMatrix to enable DnD in a 10.4 NSBrowser. The dragout is fine, but I'm having trouble registering for drag ins. From my understanding I need to need to call -registerForDraggedTypes: in the NSMatrix's -initWithFrame: subclass method The trouble is I cannot

Re: Binding the enabled property of a NSMatrix instance to wether or not a multiple selection on a array controller is made.

2008-06-20 Thread Eloy Duran
if I need to explain it differently? Simple recap: I want a NSMatrix to be disabled when the selection of the NSArrayController it's bound to returns a multiple selection. What I will often do in these cases is bind enabled to a keypath that I know will always be non-nil, and use the NSIsNotNil

Re: Binding the enabled property of a NSMatrix instance to wether or not a multiple selection on a array controller is made.

2008-06-19 Thread Eloy Duran
Hi, Just wanted to check if I need to explain it differently? Simple recap: I want a NSMatrix to be disabled when the selection of the NSArrayController it's bound to returns a multiple selection. Cheers, Eloy On Jun 18, 2008, at 12:23 PM, Eloy Duran wrote: Hi list, I have

Re: Binding the enabled property of a NSMatrix instance to wether or not a multiple selection on a array controller is made.

2008-06-19 Thread Keary Suska
6/19/08 3:30 AM, also sprach [EMAIL PROTECTED]: Just wanted to check if I need to explain it differently? Simple recap: I want a NSMatrix to be disabled when the selection of the NSArrayController it's bound to returns a multiple selection. What I will often do in these cases is bind enabled

Binding the enabled property of a NSMatrix instance to wether or not a multiple selection on a array controller is made.

2008-06-18 Thread Eloy Duran
Hi list, I have a NSArrayController and a form (collection of controls) that displays attributes for a individual object in the array controller. One attribute is bound to a NSMatrix (radio buttons) with the Selected Index binding. This works great. But now I want to disable the NSMatrix

Where to set values for initWithFrame:..... in my NSMatrix subclass

2008-05-07 Thread P Teeson
Using Mac OS X.4.11, Xcode 2.5 on PPC In my project I have sub-classed both NSMatrix (e.g FooMatrix) and NSButtonCell (e.g. FooButtonCell). The designated initialiser for FooMatrix is -(id)initWithFrame:(NSRect)frameRect mode:(int)aMode cellClass:(Class)classId

Trouble using NSMatrix with radiobuttons and using NSPopUp buttons

2008-05-05 Thread John Joyce
(sorry for the repost, I forgot to change the subject line before) I'm struggling and maybe tired, but how do you set the state of and NSMatrix with radio buttons and NSPopUpButton ? Does it go in windowDidLoad or should it be in awakeFromNIB ? This is in a Preference window for my app. I'm

Re: Trouble using NSMatrix with radiobuttons and using NSPopUp buttons

2008-05-05 Thread Graham Cox
Assign a tag to each individual cell and use -selectItemWithTag: G. On 5 May 2008, at 10:16 pm, John Joyce wrote: For the radio button matrix, I am totally lost and I don't understand how to set the state of it. Does the matrix need IBOutlets for each cell too?

Re: Trouble using NSMatrix with radiobuttons and using NSPopUp buttons

2008-05-05 Thread Graham Cox
I made an error in my mail, it should have been - selectCellWithTag: (it was very late). But maybe you spotted that? Assuming that's not it, there must be something else wrong, as this works for me. Is the outlet to the NSMatrix actually set? Is it pointing to the right object

Re: NSMatrix Content Binding

2008-04-14 Thread Keary Suska
on 4/13/08 8:57 PM, [EMAIL PROTECTED] purportedly said: I have a matrix of radio buttons that I'm trying to bind-ify. The two options in the matrix should shown with the titles: Mac OS Extended Mac OS Extended Journaled The *values* of these two items should be: HFS+ Journaled HFS+

Re: NSMatrix Content Binding

2008-04-14 Thread Keary Suska
on 4/13/08 8:57 PM, [EMAIL PROTECTED] purportedly said: I have a matrix of radio buttons that I'm trying to bind-ify. The two options in the matrix should shown with the titles: Mac OS Extended Mac OS Extended Journaled The *values* of these two items should be: HFS+ Journaled HFS+

Re: NSMatrix Content Binding

2008-04-14 Thread Seth Willits
On Apr 14, 2008, at 8:07 AM, Keary Suska wrote: Is there a way to do what I want to do? If changing your array to an array of dictionaries is not acceptable, you could use a custom NSValueTransformer. An array of dictionaries wouldn't work though. Since it'd use the entire dictionary

NSMatrix Content Binding

2008-04-13 Thread Seth Willits
Howdy, I have a matrix of radio buttons that I'm trying to bind-ify. The two options in the matrix should shown with the titles: Mac OS Extended Mac OS Extended Journaled The *values* of these two items should be: HFS+ Journaled HFS+ Then what I'd

Re: NSMatrix

2008-03-26 Thread Dave Hersey
On Mar 26, 2008, at 11:52 AM, Matthew Miller wrote: Could some please explain in simple terms how to create a NSMatrix which distributes cells in rows based on the input of a table and takes away the cells when it is not needed. Thank you very much! P.S. I am new to cocoa so please don't

  1   2   >