Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

NSTableColumn 101 Questions

 
Goto page 1, 2
   Macintosh computer (Home) -> Programmer Help RSS
Next:  two assembler source with not same architecture i..  
Author Message
slashlos

External


Since: Nov 13, 2005
Posts: 132



(Msg. 1) Posted: Tue Jan 29, 2008 1:40 pm
Post subject: NSTableColumn 101 Questions
Archived from groups: comp>sys>mac>programmer>help (more info?)

In IB for a given column, there are check boxes for visibility (Hidden)
but no such property programmatically, i.e., you can't under program
control make a column visible or hidden?

Also I find that marking a column's editable property doesn't prevent
interacting with the column (i.e., a popup cell still functions). While
I can intercept the value change later, how can I disable the control?
In my case I have various columns with popups, matrix etc. cells neither
which are custom.
--
/los "I was a teenage net-random."

 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Tom Harrington

External


Since: Aug 19, 2003
Posts: 1469



(Msg. 2) Posted: Tue Jan 29, 2008 1:51 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
slashlos wrote:

> In IB for a given column, there are check boxes for visibility (Hidden)
> but no such property programmatically, i.e., you can't under program
> control make a column visible or hidden?

Does NSTableColumn's -setHidden: not work for you?

> Also I find that marking a column's editable property doesn't prevent
> interacting with the column (i.e., a popup cell still functions). While
> I can intercept the value change later, how can I disable the control?
> In my case I have various columns with popups, matrix etc. cells neither
> which are custom.

I suspect you need to set editability on the NSCell subclass you're
using for that column.

--
Tom "Tom" Harrington
Independent Mac OS X developer since 2002
http://www.atomicbird.com/

 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Gregory Weston1

External


Since: Oct 03, 2004
Posts: 2243



(Msg. 3) Posted: Tue Jan 29, 2008 3:59 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
slashlos wrote:

> In IB for a given column, there are check boxes for visibility (Hidden)
> but no such property programmatically, i.e., you can't under program
> control make a column visible or hidden?

What SDK version? There are such methods in 10.5. Before that I think
you had to remove the columns you wanted hidden at runtime (which meant
keeping track of which ones those were in the defaults DB).


G
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
slashlos

External


Since: Nov 13, 2005
Posts: 132



(Msg. 4) Posted: Tue Jan 29, 2008 4:28 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Tom Harrington wrote:
> In article ,
> slashlos wrote:
>
>> In IB for a given column, there are check boxes for visibility (Hidden)
>> but no such property programmatically, i.e., you can't under program
>> control make a column visible or hidden?
>
> Does NSTableColumn's -setHidden: not work for you?

this method doesn't appear to be there which is why I asked; the .h file
for the class doesn't have this seemingly omitted method.

>> Also I find that marking a column's editable property doesn't prevent
>> interacting with the column (i.e., a popup cell still functions). While
>> I can intercept the value change later, how can I disable the control?
>> In my case I have various columns with popups, matrix etc. cells neither
>> which are custom.
>
> I suspect you need to set editability on the NSCell subclass you're
> using for that column.

OK, in tableView willDisplayCell:cell:tableColumn:row delegate method
this which did the trick:

[cell setEnabled:[tableColumn isEditable]];

--
/los "I was a teenage net-random."
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Tom Harrington

External


Since: Aug 19, 2003
Posts: 1469



(Msg. 5) Posted: Tue Jan 29, 2008 4:28 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
slashlos wrote:

> Tom Harrington wrote:
> > In article ,
> > slashlos wrote:
> >
> >> In IB for a given column, there are check boxes for visibility (Hidden)
> >> but no such property programmatically, i.e., you can't under program
> >> control make a column visible or hidden?
> >
> > Does NSTableColumn's -setHidden: not work for you?
>
> this method doesn't appear to be there which is why I asked; the .h file
> for the class doesn't have this seemingly omitted method.

OK, then it would have helped to say what version of Mac OS X you're
working on. This method was added in Mac OS X 10.5; if you're using an
earlier version then it won't be there.

--
Tom "Tom" Harrington
Independent Mac OS X developer since 2002
http://www.atomicbird.com/
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
slashlos

External


Since: Nov 13, 2005
Posts: 132



(Msg. 6) Posted: Tue Jan 29, 2008 4:37 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston wrote:
> In article ,
> slashlos wrote:
>
>> In IB for a given column, there are check boxes for visibility (Hidden)
>> but no such property programmatically, i.e., you can't under program
>> control make a column visible or hidden?
>
> What SDK version? There are such methods in 10.5. Before that I think
> you had to remove the columns you wanted hidden at runtime (which meant
> keeping track of which ones those were in the defaults DB).
>
>
> G

This issue was in 2.4, 2.5 and 3.0; originally as a workaround I did do
just that; initially saved the column, dropped it when I needed to, and
restored it before the window went away as its state would / could be
incorrectly saved otherwise.

Ideally I would love to just hide the column and trash this workaround
but it seems not (was hoping it was fixed in 3.0)

--
/los "I was a teenage net-random."
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Gregory Weston1

External


Since: Oct 03, 2004
Posts: 2243



(Msg. 7) Posted: Tue Jan 29, 2008 5:34 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
slashlos wrote:

> Gregory Weston wrote:
> > In article ,
> > slashlos wrote:
> >
> >> In IB for a given column, there are check boxes for visibility (Hidden)
> >> but no such property programmatically, i.e., you can't under program
> >> control make a column visible or hidden?
> >
> > What SDK version? There are such methods in 10.5. Before that I think
> > you had to remove the columns you wanted hidden at runtime (which meant
> > keeping track of which ones those were in the defaults DB).
>
> This issue was in 2.4, 2.5 and 3.0;

Those are XCode versions. I meant to ask which OS X versions you're
targeting. 10.5 has methods to set/test the hidden status of columns.
Before that you need to roll your own solution.

The first non-beta release of Mac OS X was in March 2001. It took nearly
7 years (not counting the whole history of NeXTstep) for this OS to add
to NSBezierPath a replacement for a functionality that Steve Jobs had
insisted Bill Atkinson put into what became QuickDraw in May 1981.

Sometimes the make you slap yourself across the head.

I wonder if they used my code as the basis for the replacement; I posted
it to one of the dev lists in March 2006 and it looks like more than a
few people adopted it. (I see the precise algorithm with my comments
intact in a random published source archives.)

G
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
slashlos

External


Since: Nov 13, 2005
Posts: 132



(Msg. 8) Posted: Tue Jan 29, 2008 6:13 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston wrote:

> Those are XCode versions. I meant to ask which OS X versions you're
> targeting. 10.5 has methods to set/test the hidden status of columns.
> Before that you need to roll your own solution.

Hmmm I'm on Leopard 10.5.1; have I missed an update?
--
/los "I was a teenage net-random."
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Gregory Weston1

External


Since: Oct 03, 2004
Posts: 2243



(Msg. 9) Posted: Tue Jan 29, 2008 6:49 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
slashlos wrote:

> Gregory Weston wrote:
>
> > Those are XCode versions. I meant to ask which OS X versions you're
> > targeting. 10.5 has methods to set/test the hidden status of columns.
> > Before that you need to roll your own solution.
>
> Hmmm I'm on Leopard 10.5.1; have I missed an update?

Nope. What I suspect is that while you're building on 10.5.x, you're
linking against an older SDK.

<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/
Classes/NSTableColumn_Class/Reference/Reference.html#//apple_ref/doc/uid/
20000119-SW4>
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
slashlos

External


Since: Nov 13, 2005
Posts: 132



(Msg. 10) Posted: Tue Jan 29, 2008 8:49 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston wrote:
> In article ,
> slashlos wrote:
>
>> Gregory Weston wrote:
>>
>>> Those are XCode versions. I meant to ask which OS X versions you're
>>> targeting. 10.5 has methods to set/test the hidden status of columns.
>>> Before that you need to roll your own solution.
>> Hmmm I'm on Leopard 10.5.1; have I missed an update?
>
> Nope. What I suspect is that while you're building on 10.5.x, you're
> linking against an older SDK.

OK, I'll bite; do I un-install, install xcode 3.0 or what to fix this?
--
/los "I was a teenage net-random."
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
slashlos

External


Since: Nov 13, 2005
Posts: 132



(Msg. 11) Posted: Tue Jan 29, 2008 8:53 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston wrote:
> In article ,
> slashlos wrote:
>
>> Gregory Weston wrote:
>>
>>> Those are XCode versions. I meant to ask which OS X versions you're
>>> targeting. 10.5 has methods to set/test the hidden status of columns.
>>> Before that you need to roll your own solution.
>> Hmmm I'm on Leopard 10.5.1; have I missed an update?
>
> Nope. What I suspect is that while you're building on 10.5.x, you're
> linking against an older SDK.

Hmmm is the issue I have IB running in 2.x compat mode? It sounds like
there's a similar mode for xcode or I have some s/w update to perform?
--
/los "I was a teenage net-random."
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
noreply

External


Since: Dec 02, 2004
Posts: 191



(Msg. 12) Posted: Wed Jan 30, 2008 1:12 am
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gregory Weston wrote:

> It took nearly 7 years (not counting the whole history of NeXTstep) for
> this OS to add to NSBezierPath a replacement for a functionality that
> Steve Jobs had insisted Bill Atkinson put into what became QuickDraw in
> May 1981.
>
> Sometimes the make you slap yourself across the head.

I'm still waiting for NSFile or NSAlias, but I guess round rects were
_soooo_ much more important this time around Wink Darn Steve Jobs!

Maybe in 3 years time Sad

patrick
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Paul Russell

External


Since: Dec 16, 2003
Posts: 288



(Msg. 13) Posted: Wed Jan 30, 2008 7:25 am
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

slashlos wrote:
> Gregory Weston wrote:
>> In article ,
>> slashlos wrote:
>>
>>> Gregory Weston wrote:
>>>
>>>> Those are XCode versions. I meant to ask which OS X versions you're
>>>> targeting. 10.5 has methods to set/test the hidden status of
>>>> columns. Before that you need to roll your own solution.
>>> Hmmm I'm on Leopard 10.5.1; have I missed an update?
>>
>> Nope. What I suspect is that while you're building on 10.5.x, you're
>> linking against an older SDK.
>
> OK, I'll bite; do I un-install, install xcode 3.0 or what to fix this?

No, no need for any drama, it's just a project setting - "Base SDK Path"
aka SDKROOT.

Paul
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Gregory Weston1

External


Since: Oct 03, 2004
Posts: 2243



(Msg. 14) Posted: Wed Jan 30, 2008 9:04 am
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
noreply RemoveThis @mail.invalid (Patrick Machielse) wrote:

> Gregory Weston wrote:
>
> > It took nearly 7 years (not counting the whole history of NeXTstep) for
> > this OS to add to NSBezierPath a replacement for a functionality that
> > Steve Jobs had insisted Bill Atkinson put into what became QuickDraw in
> > May 1981.
> >
> > Sometimes the make you slap yourself across the head.
>
> I'm still waiting for NSFile or NSAlias, but I guess round rects were
> _soooo_ much more important this time around Wink Darn Steve Jobs!
>
> Maybe in 3 years time Sad

What would you want them to do? There may already be something in Cocoa
that handles what you expect of NSFile, and there's a 3rd-party class
called NDAlias floating around.

<http://homepage.mac.com/nathan_day/pages/source.xml>

For what it's worth, working with aliases and files is, IMO, much easier
than getting roundrects "right."

G
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
slashlos

External


Since: Nov 13, 2005
Posts: 132



(Msg. 15) Posted: Wed Jan 30, 2008 3:13 pm
Post subject: Re: NSTableColumn 101 Questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Paul Russell wrote:

> No, no need for any drama, it's just a project setting - "Base SDK Path"
> aka SDKROOT.
>
> Paul

thanks; that did the trick.
--
/los "I was a teenage net-random."
 >> Stay informed about: NSTableColumn 101 Questions 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
diskarb questions - Does anyone have any good docs or idea of the best way to make sure that when you tell the Disk arbitration server to unmount a firewire/external drive- that it will really do it? We have found that it is flaky... We are trying a few things, but if..

Quicktime Questions... - Hi there, I try to connect a simple custom progress-bar to a quicktime Movie, so if the movie plays the progressbar positin gets up and if the movie is at the end the progressbar is filled. But: With witch callback (or waht else) i can make the movie to...

NSOutlineView - some questions - Hello NG, I have a NSOutlineView as part of a NSSplitVIew like in mail app. 1. I want to update the root- or parent- cell in dependence of the children. If all of the children have been red the parent item is displayed in lightgray color. So the item....

beginner's questions - I love my mac! I can do anything on that I can do on a PC except for programming it. when I used Windows (i still shutter at the name) I could make applications via Visual Basic. It was an easy and friendly language. When I switched to the Mac though,...

Re: beginner's questions - <font color=purple> ;></font> <font color=purple> ;> There aren't any and that's the problem. The Objective-C books out</font> <font color=purple> ;> there assume you know C and while Blair ...
   Macintosh computer (Home) -> Programmer Help All times are: Pacific Time (US & Canada)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]