why LSSharedFileListInsertItemURL function can't work?

2012-11-20 Thread songhf
Hi all,

In my code below i used LS functions to do something, but i can't get the 
result what i wanted.  Somebody can tell me  which i missed ?
thank you!

First I  generate a IconRef variable and used in 
LSSharedFileListInsertItemURL():

IconRef iconRef = NULL;  

CFURLRef tCFURLRef = CFBundleCopyResourceURL( myCFBundleRef, CFSTR( 
Application ), CFSTR( icns ), NULL );
status = RegisterIconRefFromFSRef( '', 'icns', tFSRef, iconRef );

LSSharedFileListItemRef item = LSSharedFileListInsertItemURL(favorite_items,
   
kLSSharedFileListItemBeforeFirst, CFSTR(), iconRef,
   
(__bridge CFURLRef)url, NULL, NULL);

The result is insert a item to Finder slider, but the item icon does not 
showing what i specified. what's wrong?

And  the code below does not  take effective too.
OSStatus er = LSSharedFileListItemSetProperty(
  item,
  kLSItemDisplayName,
   CFTypeRef(CFSTR(some title)));

thanks again.
___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


MacOS: Selecting from Multiple tables in the same window

2012-11-20 Thread Joseph Ayers
In MacOS 10.8 I have a window that contains two NSTableViews
clipListTable and
tablesTable


In the data model. tablesTable has a to-many relationship with the selection of 
clipListTable

In the window controller awakeFromNib I set the window controller to be the 
delegate of the two tables

- (void) awakeFromNib
{
   [super awakeFromNib];
[[self tablesTable] setDelegate:self];
[[self clipListTable] setDelegate:self];
}

The window controller has a delegate procedure tableViewSelectionDidChange:

#pragma mark - NSTableViewDelegate methods

- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
id tableCandidate;
tableCandidate = [aNotification object];
DLog(@ tableCandidate %@, tableCandidate);
DLog(@ clipListTable %@, [self clipListTable]);
DLog(@ tablesTable %@, [self tablesTable]);

if (tableCandidate == [self clipListTable]) {   //Change in 
clipListTable
  NSArray *selectedObjects = [[self videoClipArrayController] 
selectedObjects];
  if ([selectedObjects count] == 1) {
 VideoClip *clip = [selectedObjects lastObject];// There should 
only be one...always.
  }
   }
else if (tableCandidate == [self tablesTable]) {//Change in 
tablesTable
NSArray *selectedObjects = [[self tableArrayController] 
selectedObjects];
if ([selectedObjects count] == 1) {
  Table *tab = [selectedObjects lastObject];// There should only be 
one...always.
}
}
}

If i select a row in the clipListTable, the log reads:
2012-11-17 10:29:38.760 Roboplasm[82172:303] -[MediaWindowController 
tableViewSelectionDidChange:]  tableCandidate NSTableView: 0x1006f20b0
2012-11-17 10:29:39.727 Roboplasm[82172:303] -[MediaWindowController 
tableViewSelectionDidChange:]  clipListTable NSTableView: 0x105407260
2012-11-17 10:29:48.089 Roboplasm[82172:303] -[MediaWindowController 
tableViewSelectionDidChange:]  tablesTable NSTableView: 0x1006f20b0

and the Change in tablesTable branch gets executed

If I select  a row in the tablesTable, the log reads
2012-11-17 10:32:29.463 Roboplasm[82172:303] -[MediaWindowController 
tableViewSelectionDidChange:]  tableCandidate NSTableView: 0x1006f20b0
2012-11-17 10:32:30.131 Roboplasm[82172:303] -[MediaWindowController 
tableViewSelectionDidChange:]  clipListTable NSTableView: 0x105407260
2012-11-17 10:32:30.807 Roboplasm[82172:303] -[MediaWindowController 
tableViewSelectionDidChange:]  tablesTable NSTableView: 0x1006f20b0

and the Change in tablesTable branch also gets gets executed. In other words 
aNotification always reports the tablesTable as the tableCandidate no matter 
what table i click on in the window. 

How can I respond to a selection in the clipList Table?

Thanks,


Joseph Ayers, Professor
Department of Biology and
Marine Science Center
Northeastern University
East Point, Nahant, MA 01908
Phone (781) 581-7370 x309(office), x335(lab)
Boston: 444 Richards Hall (617) 373-4044
Cellular (617) 755-7523, FAX: (781) 581-6076
eMail: lobs...@neu.edu 
http://www.neurotechnology.neu.edu/
http://robobees.seas.harvard.edu/
http://cyberplasm.net/














___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting a .icns file from IconRef data

2012-11-20 Thread Ken Thomases
On Nov 19, 2012, at 12:36 PM, Mike Abdullah wrote:

 On 17 Nov 2012, at 04:09, Ken Thomases k...@codeweavers.com wrote:
 
 You should be aware that a bug was introduced to Snow Leopard with its last 
 major update (10.6.8), such that the CGImageDestination API produces corrupt 
 ICNS files.  So, if you are maintaining compatibility with that version of 
 the OS, you probably want to use the Icon Family API instead, even though 
 it's obsolete and deprecated.
 
 Have a radar number we can dupe?

I'm never sure I understand the point of referencing somebody else's Radar 
number, but...

I submitted rdar://problem/9798341 which was closed as a duplicate of 
rdar://problem/9711622.

I also submitted a related bug, rdar://problem/9798414, which is about crashes 
whenever apps try to obtain the icon for a file and the icon is corrupt in this 
way.  It affects (or, at least, affected at the time) the Finder, the Dock, 
anything which uses open or save panels, path controls, etc.  That was closed 
as a duplicate of rdar://problem/9672474.

Regards,
Ken


___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Dumb question about unit testing

2012-11-20 Thread William Squires
  In other words, you bootstrapped the process, right? You generated a class 
that had encodeWithCoder:, wrote out the results, then went back and coded 
initWithCoder:, using the written out stuff to pull it back in? That's what I 
was thinking, too. I was just wondering if there was some way to make an app 
that could create/edit these saved objects directly at the binary level so I 
could make sure of the intermediate results from option #1!
  Otherwise, if the test failed, how would you know which half failed, the 
initWithCoder: part, or the encodeWithCoder: part? I think I'll do #2. Thanks 
for the help!

On Nov 19, 2012, at 12:18 PM, Sean McBride wrote:

 On Sun, 18 Nov 2012 21:26:09 -0600, William Squires said:
 
 What's the recommended procedure for (unit) testing the initWithCoder:
 and encodeWithCoder: methods of a class that conforms to NSCoding protocol?
 
 I do two things: 1) a test that encodes then immediately decodes, then 
 compares the original with the copy. 2) I create files on disk with 
 serialized data, then build new objects from them by deserializing.  If/when 
 your format changes, you then have a collection of old formats to test too.
 
 Cheers,
 
 --
 
 Sean McBride, B. Eng s...@rogue-research.com
 Rogue Researchwww.rogue-research.com
 Mac Software Developer  Montréal, Québec, Canada
 
 


___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Getting a .icns file from IconRef data

2012-11-20 Thread Mike Abdullah

On 20 Nov 2012, at 12:53, Ken Thomases k...@codeweavers.com wrote:

 On Nov 19, 2012, at 12:36 PM, Mike Abdullah wrote:
 
 On 17 Nov 2012, at 04:09, Ken Thomases k...@codeweavers.com wrote:
 
 You should be aware that a bug was introduced to Snow Leopard with its last 
 major update (10.6.8), such that the CGImageDestination API produces 
 corrupt ICNS files.  So, if you are maintaining compatibility with that 
 version of the OS, you probably want to use the Icon Family API instead, 
 even though it's obsolete and deprecated.
 
 Have a radar number we can dupe?
 
 I'm never sure I understand the point of referencing somebody else's Radar 
 number, but...
 
 I submitted rdar://problem/9798341 which was closed as a duplicate of 
 rdar://problem/9711622.
 
 I also submitted a related bug, rdar://problem/9798414, which is about 
 crashes whenever apps try to obtain the icon for a file and the icon is 
 corrupt in this way.  It affects (or, at least, affected at the time) the 
 Finder, the Dock, anything which uses open or save panels, path controls, 
 etc.  That was closed as a duplicate of rdar://problem/9672474.

Thanks Ken, it allows me to file duplicates for them to show Apple we care.


___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: MacOS: Selecting from Multiple tables in the same window

2012-11-20 Thread Kyle Sluder
On Sat, Nov 17, 2012, at 07:36 AM, Joseph Ayers wrote:
 In MacOS 10.8 I have a window that contains two NSTableViews
 clipListTable and
 tablesTable
 
 
 In the data model. tablesTable has a to-many relationship with the
 selection of clipListTable

What does this mean? Table views cannot have to-many relationships. Do
you mean that you have set up NSController instances using bindings in a
master-detail pattern? Or are you just saying that you're trying to
implement such an arrangement?

--Kyle Sluder
___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


removeObserver with keyPath nil

2012-11-20 Thread Gordon Apple
What¹s the story on removeObserver:self forKeyPath:nil, called in dealloc?
Supposedly, this works.  The docs don¹t say you can¹t use nil.  However, I
have run into at least one place where did not work.  We converted from GC
to ARC and have a bunch of these.  I have seen statements that it worked
under GC, but possibly not otherwise.

___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Notification for if User changes Finder Label on File

2012-11-20 Thread Michael Starke
Sorry for asking this question again, but i did not find any more 
details about how to improve what I want to achive or if the way i do it 
is the only way to go.


Therfore I'm politly asking again.

Situation is, that I need to watch a file (Volume to be precise) for any 
changes the user makes to it's label. Currently I have a FSEventStream 
callback that watches the volume path and I react to 
kFSEventStreamEventFlagItemXattrMod since this gets modified on a Label 
change.


Is there a more elegant way to look for this speical change or am I on 
the right track?


-Michael
--
___m i c h a e l   s t a r k e
   geschäftsführer
   HicknHack Software GmbH
   www.hicknhack-software.com

___k o n t a k t
   +49 (170) 3686136
   cont...@hicknhack.com

___H i c k n H a c k   S o f t w a r e   G m b H
   geschäftsführer - maik lathan | andreas reischuck | michael starke
   bayreuther Straße 32
   01187 dresden
   amtsgericht dresden HRB 30351
   sitzt - dresden
___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Notification for if User changes Finder Label on File

2012-11-20 Thread Jean-Daniel Dupas
You can use the libdispatch to monitor file changes (using 
DISPATCH_SOURCE_TYPE_VNODE).

You can also use a kqueue to look for change on a specific file.  If you want a 
Cocoa wrapper, there is the well known UKKQueue class available on the net.

Both solutions are far more efficient if you have to monitor only a couple of 
files.

Le 20 nov. 2012 à 19:21, Michael Starke michael.sta...@hicknhack-software.com 
a écrit :

 Sorry for asking this question again, but i did not find any more details 
 about how to improve what I want to achive or if the way i do it is the only 
 way to go.
 
 Therfore I'm politly asking again.
 
 Situation is, that I need to watch a file (Volume to be precise) for any 
 changes the user makes to it's label. Currently I have a FSEventStream 
 callback that watches the volume path and I react to 
 kFSEventStreamEventFlagItemXattrMod since this gets modified on a Label 
 change.
 
 Is there a more elegant way to look for this speical change or am I on the 
 right track?
 
 -Michael
 -- 
 ___m i c h a e l   s t a r k e
   geschäftsführer
   HicknHack Software GmbH
   www.hicknhack-software.com
 
 ___k o n t a k t
   +49 (170) 3686136
   cont...@hicknhack.com
 
 ___H i c k n H a c k   S o f t w a r e   G m b H
   geschäftsführer - maik lathan | andreas reischuck | michael starke
   bayreuther Straße 32
   01187 dresden
   amtsgericht dresden HRB 30351
   sitzt - dresden
 ___
 
 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-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org
 
 This email sent to devli...@shadowlab.org

-- Jean-Daniel





___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: removeObserver with keyPath nil

2012-11-20 Thread Fritz Anderson
On 20 Nov 2012, at 11:16 AM, Gordon Apple g...@ed4u.com wrote:

 What¹s the story on removeObserver:self forKeyPath:nil, called in dealloc?
 Supposedly, this works.  The docs don¹t say you can¹t use nil.  However, I
 have run into at least one place where did not work.  We converted from GC
 to ARC and have a bunch of these.  I have seen statements that it worked
 under GC, but possibly not otherwise.

Could you clarify what you mean by supposedly, this works? If the 
documentation says you can't do it, then Apple does not suppose it works, and 
Apple is the only one whose suppositions matter. At one time, you liked the 
undocumented behavior you got, but that doesn't guarantee Apple will always 
deliver it.

The documentation of this method for the collection classes explicitly forbids 
the use of nil. 

The documentation for NSKeyValueObserving forbids it only implicitly: nil 
can't be a relative key path that the observer has registered. If it were 
permitted, the documentation would say what the method would do if you passed 
nil. I assume that means the use of nil is undefined at best, and they forgot 
to say so. (Or it's defined, and they forgot to document it — but your 
experience proves that isn't so.) 

Documentation bug filed.

— F

-- 
Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- 
http://x4u.manoverboard.org/


___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Dumb question about unit testing

2012-11-20 Thread Graham Cox

On 21/11/2012, at 12:55 AM, William Squires wsqui...@satx.rr.com wrote:

 I was just wondering if there was some way to make an app that could 
 create/edit these saved objects directly at the binary level so I could make 
 sure of the intermediate results from option #1!


The Property List Editor utility that comes with Developer Tools can do this 
(or it used to - not sure if it's still part of the distribution). You can also 
set up the archiver to write the file in XML format which makes it easier to 
edit by hand afterwards (though for a given object graph, the XML version will 
be much larger than the binary version).

--Graham


___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


The timestamp service is not available

2012-11-20 Thread Graham Cox
I'm getting an error from codesign:  The timestamp service is not 
available.Command /usr/bin/codesign failed with exit code 1

Huh? I rebooted and still get the problem. I can't get any work done. What 
gives?

--Graham



___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: The timestamp service is not available

2012-11-20 Thread Todd Heberlein

On Nov 20, 2012, at 8:15 PM, Graham Cox graham@bigpond.com wrote:

 I'm getting an error from codesign:  The timestamp service is not 
 available.Command /usr/bin/codesign failed with exit code 1
 
 Huh? I rebooted and still get the problem. I can't get any work done. What 
 gives?

There is a similar thread in the Xcode group. Best guess seems to be that an 
Apple Network Time Protocol server is having troubles.

Todd

___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


enhancing NSTextView for optionally-hidden text

2012-11-20 Thread Kurt Bigler
NSTextView does exactly what I need in my apps non-editable text view which 
functions something like a log, except for one needed function which I can best 
envision in the form of a text attribute hidden, akin to hidden text features 
I used to use in the *past* in MS Word, in which it was possible to select a 
document-wide option to show or hide hidden text.


(This was something I did in Word pre-OSX.  I can not see a way to show hidden 
text in the currrent Word that I have from Office 2008.  The current version 
still has a hidden attribute and permits including hidden text when printing. 
 Word for all I know may not use any native OSX text functionality, so it may 
not be very indicative of what to expect is possible.)


In any case what I want is a hidden attribute which can be enabled/disabled 
for an entire text view.  I can not find any such functionality in the 
NSTextView documentation, nor any hint of it in the standard text attributes.


Given how this view is used, for appending only in the style of an uneditable 
text log permitting user selections and Copy, the easiest way I can think to 
implement it is to maintain two text views, one with hidden text included, and 
one without, and simply swap the two views to implement show/hide of hidden text.


Is there a better way?  I would rather not get deep into a highly-structured 
text document kind of model in order to achieve something like this (assuming 
that even helps).


-Kurt Bigler
___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Can't seem to present modal storyboard scene

2012-11-20 Thread Rick Mann
Hi. I've got a part of my storyboard that has a UINavigationController and a 
UIViewController in that. It's triggered by tapping a button with a modal segue.

But I also want to display it sometimes at application start (it's release 
notes). So, I do this:

UIStoryboard* sb = [UIStoryboard storyboardWithName: @MainStoryboard 
bundle: nil];
UINavigationController* nc = (UINavigationController*) [sb 
instantiateViewControllerWithIdentifier: @releaseNotes];
ReleaseNotesController* controller = [nc.viewControllers objectAtIndex: 
0];
controller.delegate = self;
[self.window.rootViewController presentModalViewController: nc 
animated: true];

All the controllers come back with good values, and are the right class. But 
nothing ever shows up. The rootViewController is a tab bar controller, and it 
does show up.

Is there something I'm missing?

Thanks!

-- 
Rick




___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting a .icns file from IconRef data

2012-11-20 Thread Ken Thomases
On Nov 20, 2012, at 9:11 AM, Mike Abdullah wrote:

 On 20 Nov 2012, at 12:53, Ken Thomases k...@codeweavers.com wrote:
 
 I'm never sure I understand the point of referencing somebody else's Radar 
 number ...
 
 Thanks Ken, it allows me to file duplicates for them to show Apple we care.

You're welcome, but it almost seems better to me that you file an original bug 
report without reference to the duplicate.  The Apple folks are more likely to 
evaluate your report on its own, rather than simply thinking to themselves Oh, 
this is already known to be a duplicate.  Set its status as such and stop 
reading.  Perhaps, on considering your specific report, they might not deem it 
an exact duplicate for some reason.  Given the relative vagueness of our 
discussion here, maybe we're talking about two separate but related things.  
Even if they do determine it's a duplicate, they had to spend more time 
considering the issue before deciding that, so I suspect it accumulates 
additional weight in their consciousness.  That is, your vote will count for 
more.

But that's all speculation about other people's psychology, so not worth much.

Cheers,
Ken


___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: enhancing NSTextView for optionally-hidden text

2012-11-20 Thread Quincey Morris
On Nov 20, 2012, at 21:03 , Kurt Bigler kkbli...@breathsense.com wrote:

 Given how this view is used, for appending only in the style of an uneditable 
 text log permitting user selections and Copy, the easiest way I can think to 
 implement it is to maintain two text views, one with hidden text included, 
 and one without, and simply swap the two views to implement show/hide of 
 hidden text.
 
 Is there a better way?  I would rather not get deep into a highly-structured 
 text document kind of model in order to achieve something like this (assuming 
 that even helps).

Perhaps better than two views would be two attributed string properties (of the 
object that knows when the log changes). In one, you'd either mark the hideable 
text with the (unique?) attribute that indicates the hideability in the 
display, or with an custom attribute.

One string property would return the whole attributed string. The other would 
be a derived property that takes the whole string, and constructs a display 
string which in turn is either the same whole string (if hideable text is 
turned on) or a reduced string (if not, by enumerating the attributes). 
Assuming you took care to make the derived property KVO-compliant, then you 
could simply bind the text field to the derived property.

This may not sound like an improvement on your original idea, but it 
centralizes the necessary code (in the whole string setter, perhaps), and 
avoids the IB awkwardness of superimposed views.

___

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-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com