Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Debajit Adhikary
I have an area of a Window (in my MainMenu.xib) which I'd like to populate
dynamically with unrelated "views" such as an NSTable, IKImageBrowserView
etc. at different points of time depending on some user-selected criteria.

   - How do I define this area of the window such that it can be "replaced"
   with different views?
   - How do I attach a table or some other view to this area of the window?

(Is it enough to place a generic NSView there and add a subview each time?
I'm fairly new to Cocoa, so any pointers are welcome)
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


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 draw the selected rows differently, not an arbitrary row.


At the moment I subclass the cell for each of the columns of the view  
( same subclass). In my delegates objectValueForTableColumn I set a  
variable 'shouldDrawRow' to true if that is the 'special' row I want  
to draw myself.


In the cell subclass I override drawInteriorWithFrame and check to see  
if this value is set in my delegate and if so call a delegate method  
to draw the background first.


This seems like a real hack as it assumes that drawInteriorWithFrame  
will be called straight after objectValueForTableColumn. This is sort  
of reasonable because the cell is reused all the time so it 'works'.  
The other problem though is I want to draw the ends of the rows  
differently to the middle ( thin rounded rectangle ) and  
drawInteriorWithFrame only gives me the rectangle to draw in. I've got  
no way of finding out which column it is. Again it will work because  
the columns won't change so I can hard code some values.


However I'm thinking there must be a better way. What I really need is  
some way of finding out the column and row of the cell about to be  
drawn, but I can't see it. Am I missing something?


thanks!

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

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

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


Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Thomas Davie


On 1 Jul 2009, at 09:21, Debajit Adhikary wrote:

I have an area of a Window (in my MainMenu.xib) which I'd like to  
populate
dynamically with unrelated "views" such as an NSTable,  
IKImageBrowserView
etc. at different points of time depending on some user-selected  
criteria.


  - How do I define this area of the window such that it can be  
"replaced"

  with different views?


Stick an NSView in the gap, add an outlet to your controller, and  
connect it up.


  - How do I attach a table or some other view to this area of the  
window?


Using add/removeSubview:

(Is it enough to place a generic NSView there and add a subview each  
time?

I'm fairly new to Cocoa, so any pointers are welcome)


Yes -- at least that's what I do, if I'm doin it rong, hopefully  
someone will tell me :)


Bob
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread John C. Randolph


On Jul 1, 2009, at 12:21 AM, Debajit Adhikary wrote:

I have an area of a Window (in my MainMenu.xib) which I'd like to  
populate
dynamically with unrelated "views" such as an NSTable,  
IKImageBrowserView
etc. at different points of time depending on some user-selected  
criteria.


  - How do I define this area of the window such that it can be  
"replaced"

  with different views?
  - How do I attach a table or some other view to this area of the  
window?


(Is it enough to place a generic NSView there and add a subview each  
time?

I'm fairly new to Cocoa, so any pointers are welcome)


The typical way to do this is with an NSTabView.  YOu can show the  
tabs or not.


-jcr
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Robert Martin
Perhaps the simplest way is to use a NSTabView - (you can set it to  
tabless). Then create all of your 'unrelated views' in separate tabs,  
and switch the tabs in your code.


On Jul 1, 2009, at 3:21 AM, Debajit Adhikary wrote:

I have an area of a Window (in my MainMenu.xib) which I'd like to  
populate
dynamically with unrelated "views" such as an NSTable,  
IKImageBrowserView
etc. at different points of time depending on some user-selected  
criteria.


  - How do I define this area of the window such that it can be  
"replaced"

  with different views?
  - How do I attach a table or some other view to this area of the  
window?


(Is it enough to place a generic NSView there and add a subview each  
time?

I'm fairly new to Cocoa, so any pointers are welcome)


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Quincey Morris

On Jul 1, 2009, at 00:28, Thomas Davie wrote:


On 1 Jul 2009, at 09:21, Debajit Adhikary wrote:

(Is it enough to place a generic NSView there and add a subview  
each time?

I'm fairly new to Cocoa, so any pointers are welcome)


Yes -- at least that's what I do, if I'm doin it rong, hopefully  
someone will tell me :)


As others have said, using a tabless NSTabView is generally easier,  
though if you need to actually release the view which isn't currently  
in the window, this technique doesn't do that. (Typically you don't  
need to release it.)


But if you are going to replace the subview "manually", the tricky  
part is to make sure that its nib objects are released properly, which  
means carefully studying the NSNib nib-loading and ownership document  
to decide if there's anything you need to do.


In Leopard (and the iPhone, I guess), the easier way is to use a  
NSViewController, because it handles nib object ownership issues for  
you. The view controller loads the nib for you, though you still need  
to swap the subviews manually.


The other advantage of NSViewController is that if your subviews each  
need some controller logic, it modularizes your code if you can move  
it to the NSViewController, instead of having to dump it all in the  
window controller.



___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Quincey Morris

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 I'm  
wondering if there is a better way. I've also checked various  
examples but most want to draw the selected rows differently, not an  
arbitrary row.


At the moment I subclass the cell for each of the columns of the  
view ( same subclass). In my delegates objectValueForTableColumn I  
set a variable 'shouldDrawRow' to true if that is the 'special' row  
I want to draw myself.


In the cell subclass I override drawInteriorWithFrame and check to  
see if this value is set in my delegate and if so call a delegate  
method to draw the background first.


This seems like a real hack as it assumes that drawInteriorWithFrame  
will be called straight after objectValueForTableColumn. This is  
sort of reasonable because the cell is reused all the time so it  
'works'. The other problem though is I want to draw the ends of the  
rows differently to the middle ( thin rounded rectangle ) and  
drawInteriorWithFrame only gives me the rectangle to draw in. I've  
got no way of finding out which column it is. Again it will work  
because the columns won't change so I can hard code some values.


However I'm thinking there must be a better way. What I really need  
is some way of finding out the column and row of the cell about to  
be drawn, but I can't see it. Am I missing something?


Such questions are hard to answer intelligently, because too much  
depends on the details of your implementation, but that's never  
stopped me from answering unintelligently before ...


I think it is a hack, and what you *really need* is to use your actual  
data model.


That is, the objectValue for the columns in your special row need to  
be recognizable as something different from the object values in the  
non-special rows. Then your custom cell subclass, you test to see  
whether its current objectValue is special, and draw it specially if  
so. No fuss, no hacks, no hard-coded column assumptions.


For example, if the regular object values were NSNumber objects, and  
the special row values were column totals, I'd wrap the NSNumber  
totals inside a custom object and put those in the data model instead.  
If that would mess up your data model for other purposes, I'd have  
objectValueForTableColumn detect the special row index and return the  
wrapped NSNumber when the row index dictates.


FWIW.


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread André Berg

Hi David,

Thanks for replying :)

Actually I am coming from a v0.1 version of my program, was trying to 
implement this with AppleScript Studio.
The Finder's dictionary has a "select" command but it appears that this 
command does nothing more than to
call said NSWorkspace method. The behaviour of executing the "select" 
command/method in a loop,
with the same set of path strings, once using pure Cocoa and once using 
pure AppleScript is exactly the same.

It will open a new Finder window for every path string entry in the array.

It *is* possible to supply the whole AppleScript list (AppleScript list 
= NSArray) to the Finder's select command
(if you convert the POSIX path-style strings in the list to file URLs 
via "POSIX file") and the "select" command is

smart enough to make a selection of all items in the frontmost window ...
... but only for the current folder level.

The problem with expanded subfolders in list view remains. Any paths 
that point to files with expanded subfolders
will spawn a new Finder window each. I am currently experimenting with 
looping through the subfolders, issueing
a NSAppleScript script that passes a list of POSIX files representing 
each subfolder's contents every cycle of the loop,
but it looks like it's not keeping the selection in the parent folder if 
I go to target a subfolder in the next loop cycle...


Thanks for the pointer to the AE docs. Until now I have always been 
shying away from reading those as raw AppleEvents
are still confusing the heck out of me. Seems there's no excuse left now 
 unless there's some other way?



Cheers

André

--- Original Nachricht ---
Absender: Dave Keck
Datum: 01.07.2009 7:20 Uhr

I'd imagine the easiest way to do this is using an AppleScript, which
can be embedded in your app using the NSAppleScript class.

But I've got a whole lot of PTSD towards AppleScript, so if it were
me, I would deal with the AppeEvents directly, much as it's done here:

http://developer.apple.com/documentation/Applescript/Conceptual/AppleEvents/create_send_aepg/create_send_aepg.html

David

  

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Window not displaying

2009-07-01 Thread rethish
ScheduleWindow is an outlet of NSWindow.
And it is initialized by nib.

How can i manually initialize it?


On 7/1/09 12:16 PM, "Andrew Farmer"  wrote:

> On 30 Jun 2009, at 22:28, rethish wrote:
>> @implementation SendWindowClass
>> 
>> -(void)openNew
>> {
>>  [ScheduleWindow makeKeyAndOrderFront:self];
>> }
> 
> What is ScheduleWindow, and how is it allocated? The code you've
> provided here never initializes a window - I'm assuming that it's
> sometimes initialized by a nib, but that doesn't work when you
> allocate an instance manually!
> 
> As a side point, names beginning with capital letters are generally
> used for classes, and names which begin with lower case are used for
> everything else. Naming an instance variable "ScheduleWindow", or a
> class "controller", is very likely to confuse readers of your code.


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Dado Colussi
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 hack so I'm wondering if there is a
> better way. I've also checked various examples but most want to draw the
> selected rows differently, not an arbitrary row.


Subclass NSTableView and implement your special drawing in -
(void)drawBackgroundInClipRect:(NSRect)clipRect.

/Dado
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Window not displaying

2009-07-01 Thread Alexander Spohr



- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
   SendWindowClass *obj =[[SendWindowClass alloc] init];


Is init loading the nib?


   [obj openNew];
}




Am 01.07.2009 um 10:37 schrieb rethish:


ScheduleWindow is an outlet of NSWindow.
And it is initialized by nib.

How can i manually initialize it?


On 7/1/09 12:16 PM, "Andrew Farmer"  wrote:


On 30 Jun 2009, at 22:28, rethish wrote:

@implementation SendWindowClass

-(void)openNew
{
[ScheduleWindow makeKeyAndOrderFront:self];
}


What is ScheduleWindow, and how is it allocated? The code you've
provided here never initializes a window - I'm assuming that it's
sometimes initialized by a nib, but that doesn't work when you
allocate an instance manually!

As a side point, names beginning with capital letters are generally
used for classes, and names which begin with lower case are used for
everything else. Naming an instance variable "ScheduleWindow", or a
class "controller", is very likely to confuse readers of your code.




___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Why Applespell.service fail to launch?

2009-07-01 Thread zhiy xue

Our application use Mac OS X spell checker service to do spell check.
here is sample code . [[NSSpellChecker sharedSpellChecker]  
checkSpellingOfString:@"hello" startingAt:0];
But the problem is AppleSpell.service can not launch automatically by  
this code, so there is always an alert: couldn't contact spell checker!
I try other applications (Openoffice.org, textEdit ) and they both can  
launch AppleSpell.service automatically, I think it means, nothing  
wrong on my machine.
Who can tell me how to force AppleSpell.service to launch? or is there  
a way to check why AppleSpell.service fail to launch?

Thanks in advance!
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: multitouch trackpad on macbook pro

2009-07-01 Thread Memo Akten

hey thanks, will check it out.

Memo.


On 30 Jun 2009, at 16:18, mmalc Crawford wrote:



On Jun 30, 2009, at 3:33 AM, Memo Akten wrote:

i was wondering if it is at all possible to receive the multi-touch  
data on the trackpads of the recent macbook pros?


Now that the WWDC videos are available, it may be worth watching  (note the related resources).



mmalc

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/memo%40memo.tv

This email sent to m...@memo.tv


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


NSComparisonResult and equality

2009-07-01 Thread Patrick Mau

Hello everyone

Here's a really short question regarding possible future API changes.

Since NSComparisonResult is an ordered enum typedef, I'd like to know  
if it's safe to write

the following code to test for 'greater or equal to':

// This would cover both NSOrderAscending and NSOrderSame
if ([obj1 compare:obj2] < NSOrderDescending) {
// code
}

instead of testing for both constants:

// This makes both tests explicit
if (([obj1 compare:obj2] == NSOrderAscending) || ([obj1 compare:obj2]  
== NSOrderSame)) {

// code
}

Thanks a lot
Patrick
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSComparisonResult and equality

2009-07-01 Thread Ken Thomases

On Jul 1, 2009, at 6:32 AM, Patrick Mau wrote:

Since NSComparisonResult is an ordered enum typedef, I'd like to  
know if it's safe to write

the following code to test for 'greater or equal to':

// This would cover both NSOrderAscending and NSOrderSame
if ([obj1 compare:obj2] < NSOrderDescending) {
// code
}

instead of testing for both constants:

// This makes both tests explicit
if (([obj1 compare:obj2] == NSOrderAscending) || ([obj1  
compare:obj2] == NSOrderSame)) {

// code
}


In practical terms, it should be safe.  Certainly, the specific values  
of the existing enum elements can't change.  That would be a binary  
incompatible change.


The other possibility to consider is new elements being added to the  
enum, but I can't conceive of Apple doing that, either.  First,  
"same", "ascending", and "descending" seem to cover all the bases of a  
comparison result. :)  Second, there's undoubtedly lots of code which  
assumes all negative values mean ascending and all positive values  
mean descending.  The particular construction you used ("<  
NSOrderDescending") seems odd to me, but "< NSOrderSame" or "<=  
NSOrderSame" are probably relatively common.


The oddness of "< NSOrderDescending" seems like the best argument  
against using it, to me.  It's far from clear when reading that code  
exactly what its semantics are, without consulting the enum  
definition.  The explicit test is much clearer, although I'd extract  
the duplicate invocation of -compare: to a separate variable so as to  
only do it once (and make it clear that you're testing the same thing  
each time).  The best of all worlds seems to be the simpler "!=  
NSOrderDescending".


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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Michael de Haan

Hi Kevin,
thanks for answering.

Before I answer your specific enquiriesI was led to ask this by a  
very similar question to the group:


"I have previously used the content outlet to establish a connection  
between NSObjectController and its object. Is contentObject an  
alternative way to do the same thing"


and the best reply by mmalc:

"If you set the contentObject of an object controller, then -- just as
anywhere else in Cocoa -- you're setting one of its properties
(typically an instance variable) and it's then the recipient's
responsibility to look after it.

If you bind the contentObject, they you're telling it to keep it
synchronised with whatever is at the end of the keypath you provided
from the source object."

So, when I emulated the currency converter, with bindings, I was  
surprised when they connected the NSObjectController to the model  
using the content outlet of NSObjectController, as per the above  
discussion. ( What I **expected** (clearly incorrectly) was that, in  
order for the project to work, one would have to bind the view to the  
controller, then bind the controller to the model). So, I was puzzled  
when **both** approaches worked ie binding the view to the controller,  
and **either** binding the controller to the model ( with keypath  
"self")  OR setting the controller's content to the view. (Cntrl- 
dragging from the controller to the model).


It might well be possible that I am thinking about the bindings  
incorrectly...and in fact all one needs in this case is to bind the  
view( textfield and slider) to the controller with the correct  
keypath, and that the relationship of a controller to it's content is  
the issue I am not completely understanding.



But..to your specific enquiries



On Jun 30, 2009, at 9:42 AM, Kevin Cathey wrote:


Michael,

In IB, Bind the textField's and Slider's values to the model Key  
Path "selection.number".

What are you binding to here? The object controller?


Yes...I am binding the value of either a slider or textField to the  
NSObjectController with the model key path of  
"selection.propertyOfTheModel" ( which happens to be number, a simple  
float.








Connect the NSOjectController's outlet ( cntrl-drag to foo).

You have an outlet on "Foo" for the Object Controller?


NO...it's a simple Ivar ( float).




Another question, for the NSObjectController, do you have the check- 
box "Prepares Content" turned on in the inspector?



..no...nothing is checked. The only thing I have filled in under keys  
is the name of the ivar...though, I have removed this and it does not  
seem to play a role in the successful running of the app.


Thanks Kevin.





Kevin


On 29 Jun 2009, at 15:23, Michael de Haan wrote:

May I indulge the group with an issue I have been trying to  
understand for a few days. I have tried to read the extensive  
literature and correspondence to the group, but so far have not  
seen an answer that is specific to this question.



Given this simple appwhich keeps a slider and textField's value  
synchronized.


1) View consisting of a slider and a textField
2) Model (Foo) with a single property "number"
3) NSObjectController

I am able to use 2 configurations to get the app to work.


Config (1).

In IB, Bind the textField's and Slider's values to the model Key  
Path "selection.number".

Connect the NSOjectController's outlet ( cntrl-drag to foo).


Config (2)

As config (1) ...first line only   now Bind NSObjectController  
to Foo, with the model Key Path = self.



Could someone please explain why both work, and any reason for  
choosing one over the other.



Thanks in advance.




___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Help with Help (AHLookupAnchor)

2009-07-01 Thread Matt Neuburg
On Wed, 1 Jul 2009 12:02:16 +1000, Graham Cox  said:
>Hi all,
>
>I'm trying to link help buttons in my app to topics in my help book.
>
>I have a simple scheme where the (hidden) title of the button contains
>the anchor and I pass it to AHLookupAnchor. The help window opens as
>'untitled' with a blank content, but AHLookupAnchor returns noErr (0).
>I have checked that the help book is indexed correctly and have
>verified that the anchors are listed using the Unarchiver tool and
>that the anchor I'm testing with is listed. Note that my help book
>shows up in the Help menu and can be opened from there and browsed
>normally.
>
>Any other ideas on what I might be doing wrong?

My answer is not much help because I don't use AHLookupAnchor (I use
AHGotoPage). But it occurs to me that it might be best to ask on the Apple
Help Implementors list.

Since you appear to be doing everything correctly, my first suggestion would
be to clean out the help cache and restart the machine, because Help is
notoriously touchy, and blank pages are a typical sign of its touchiness.

I take it that anchor indexing is turned on in the Help Indexer prefs,
right? But I recommend that you *uncheck* "Use remote root" because this is
just the sort of thing that results in these blank hangs, while the Help
tries to connect to the Internet for no reason at all...

m.

-- 
matt neuburg, phd = m...@tidbits.com, 
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings



___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Michael Ash
On Tue, Jun 30, 2009 at 11:49 PM, Chris Tracewell wrote:
>
> On Jun 30, 2009, at 6:43 PM, Kyle Sluder wrote:
>
>> dylib means "dynamic library"...
>>
>> Why do you need to link against libcurl statically?  Not saying there
>> aren't valid use cases, but please present yours.
>
> I guess I assumed that static linking is prefered as it would include
> libcurl with the executable and thus ensure that the app would work
> consistently, even if someone had a different version or had deleted this
> library from their machine. In short it just seemed like a safe option, but
> I am un-educated in this regard, so it was my best guess. The deployment
> environment is fairly easy right now, about 10 machines, mostly 10.5 with
> Intel iMac and Powerbooks which I can tweak if needed, but in the future
> this may grow and so you get the picture.

Your Cocoa application depends, directly or indirectly, on at least
half a dozen dynamic libraries to be present on the system. First off,
every binary depends on libSystem.dylib to be there. Then you need
AppKit.framework and Foundation.framework, and frameworks are just
dylibs wrapped in a pretty shell. You're also depending on Carbon,
CoreServices, Quartz, CoreFoundation, etc. If any one of these were to
be deleted, your application would no longer work.

The libcurl library ships with the system just like all these others.
It is part of the installation. You can, and should, count on it to be
there. There is no more reason to try to statically link libcurl into
your application than there is to statically link Cocoa.

Mike
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


send 4bytes message and receive answer

2009-07-01 Thread Carlo Gulliani
i need to send 4 bytes message like 0x1001 to server and receive answer from it

i use AsyncSocket and wrote the next code:

...

[socket connectToHost:[arr objectAtIndex:0] onPort:theInteger error:&err];

...

-(void)onSocket:(AsyncSocket *)sock didConnectToHost:(NSString *)host 
port:(UInt16)port
{ 
NSLog(@"Connect to %@:%u", host,port);
MTMessageBroker*newBroker = [[[MTMessageBrokeralloc] 
initWithAsyncSocket:socket] autorelease]; 
[sock release]; 
newBroker.delegate = self; 
self.messageBroker = newBroker;
[selfsendConfirmationToServer]; 
}

-(void) sendConfirmationToServer
{
NSString*myString = @"0x1001";
const char *utfMyString = [myString UTF8String];
NSData *sendMe = [NSData dataWithBytes:utfMyString length:4];
MTMessage *newMessage = [[[MTMessage alloc] init] autorelease]; 
newMessage.tag = 0; 
newMessage.dataContent = sendMe; 
[self.messageBroker sendMessage:newMessage];
}

#pragma mark MTMessageBroker Delegate Methods 
-(void)messageBroker:(MTMessageBroker *)server didReceiveMessage:(MTMessage 
*)message
{ 
if ( message.tag == 0 )
{ 
[selfdisplay:@"Message broker"];
NSString*str = [[[NSStringalloc] 
initWithData:message.dataContentencoding:NSUTF8StringEncoding] autorelease];
NSLog(@"%@",str);
} 
} 

- (void)onSocket:(AsyncSocket *)sock didReadData:(NSData *)data 
withTag:(long)tag
{
NSData *strData = [data subdataWithRange:NSMakeRange(0, [data length])];
NSString*msg = [[[NSStringalloc] initWithData:strData 
encoding:NSUTF8StringEncoding] autorelease];
NSLog(@"%@",msg);
}

but i dont receive answer

Q: how can i send 4 bytes message like 0x1001 and receive answer with help 
AsyncSocket?


  
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: GC bug in NSFontManager?

2009-07-01 Thread Ross Carter


On Jun 30, 2009, at 7:57 PM, Tommy Nordgren wrote:

	Is CCMApp an NSApplication subclass. This stack trace seems to  
indicate that there is an instance of it in

your nib/xib file.


Nope, it's the application delegate. The principal class is  
NSApplication.

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Keary Suska

On Jul 1, 2009, at 8:03 AM, Michael de Haan wrote:

"I have previously used the content outlet to establish a connection  
between NSObjectController and its object. Is contentObject an  
alternative way to do the same thing"


and the best reply by mmalc:

"If you set the contentObject of an object controller, then -- just as
anywhere else in Cocoa -- you're setting one of its properties
(typically an instance variable) and it's then the recipient's
responsibility to look after it.

If you bind the contentObject, they you're telling it to keep it
synchronised with whatever is at the end of the keypath you provided
from the source object."

So, when I emulated the currency converter, with bindings, I was  
surprised when they connected the NSObjectController to the model  
using the content outlet of NSObjectController, as per the above  
discussion. ( What I **expected** (clearly incorrectly) was that, in  
order for the project to work, one would have to bind the view to  
the controller, then bind the controller to the model). So, I was  
puzzled when **both** approaches worked ie binding the view to the  
controller, and **either** binding the controller to the model  
( with keypath "self")  OR setting the controller's content to the  
view. (Cntrl-dragging from the controller to the model).


It might well be possible that I am thinking about the bindings  
incorrectly...and in fact all one needs in this case is to bind the  
view( textfield and slider) to the controller with the correct  
keypath, and that the relationship of a controller to it's content  
is the issue I am not completely understanding.


Binding only involves two endpoints (objects). That there are  
additional inter-object connections involved in a design is a design  
issue and not inherent to bindings in any way. So it is irrelevant to  
the view-controller bindings how the controller gets its content, and  
there are multiple ways this can be done.


It appears that you are assuming that bindings involves three objects  
ion an MVC pattern. MVC is a design pattern, bindings are only one way  
to "connect" objects, such as M-C or V-C, but are not themselves an  
implementation of MVC.



Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Looking for a Mentor in the SF Bay Area

2009-07-01 Thread Brad Gibbs

Hi,

I'm looking for an experienced Objective-C programmer in the SF Bay  
Area with a little extra time on his / her hands to meet for an hour  
or two per week and correspond over e-mail.


I *think* I have a decent grasp of the basics (I'm currently trying  
things with Core Data, Core Animation and BLIP), but I've never had  
any formal programming education and have never worked in a  
programming environment.


I have well-developed ideas, requirements and use cases for three  
related apps, but the implementation needs some work.  I spend too  
much time stumbling over how best to approach problems and too much  
time in the documentation.


I don't have the budget to hire someone full-time or on a contract  
basis right now, but I would like to hire someone to provide guidance  
and nudges in the right direction to keep these projects moving  
forward.  If the apps develop into working, shipping products, there  
will be a need for at least one full-time developer.


Finally, the projects are fun.  My company (www.peaktopeaksystems.com)  
will use them in our residential audio and video installations.


I apologize if this is the wrong forum for this post.

If you're interested, please reply privately.


Thanks.

Brad
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Adam R. Maxwell


On Jul 1, 2009, at 12:54 AM, Quincey Morris wrote:


On Jul 1, 2009, at 00:28, Thomas Davie wrote:


On 1 Jul 2009, at 09:21, Debajit Adhikary wrote:

(Is it enough to place a generic NSView there and add a subview  
each time?

I'm fairly new to Cocoa, so any pointers are welcome)


Yes -- at least that's what I do, if I'm doin it rong, hopefully  
someone will tell me :)


As others have said, using a tabless NSTabView is generally easier,  
though if you need to actually release the view which isn't  
currently in the window, this technique doesn't do that. (Typically  
you don't need to release it.)


I'm curious as to why people recommend a tabless NSTabView for this.   
I've always found tabview subviews to be a pain to set up in IB; the  
alignment and sizing seem really fiddly to get right.  Maybe I've been  
doing something wrong.


In Leopard (and the iPhone, I guess), the easier way is to use a  
NSViewController, because it handles nib object ownership issues for  
you. The view controller loads the nib for you, though you still  
need to swap the subviews manually.


The other advantage of NSViewController is that if your subviews  
each need some controller logic, it modularizes your code if you can  
move it to the NSViewController, instead of having to dump it all in  
the window controller.


This is the way I'd recommend, although it's not that bad even without  
NSViewController.  Using multiple nibs instead of building one really  
complicated nib has some distinct benefits for maintenance, in my  
experience.


--
Adam



smime.p7s
Description: S/MIME cryptographic signature
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

asl issue

2009-07-01 Thread Santosh Sinha
we have create a asl file in "/Users/santoshs/Library/Logs/ 
MyAslFile.asl" and write a message ,after that delete the
system asl file , and try to read that message from own asl file but  
can't read that message...


aslclient aslClient = asl_open("Error", "Self", ASL_OPT_STDERR);

int filedescriptor = open("/Users/santoshs/Library/Logs/ 
MyAslFile.log", O_WRONLY | O_CREAT | O_APPEND, 0644);

aslmsg msg = asl_new(ASL_TYPE_MSG);
int result = 0;
aslresponse r = NULL;

const char *key = NULL, *val = NULL;
if (filedescriptor != -1)
result = asl_add_log_file(aslClient, filedescriptor);

   //Write...   
asl_log(aslClient, msg, ASL_LEVEL_ERR, "test");

   //Read...??
   aslmsg resultMsg ;
   resultMsg = asl_new(ASL_TYPE_QUERY);
   asl_set_query(resultMsg, ASL_KEY_SENDER, "Error",  
ASL_QUERY_OP_EQUAL);

   r = asl_search(aslClient, resultMsg);
   while (NULL != (resultMsg = aslresponse_next(r)))
   {
for (int i = 0; (NULL != (key = asl_key(resultMsg, i))); i++)
{
val = asl_get(resultMsg, key);
}
}

//Free
asl_free(msg);
asl_free(resultMsg);
asl_close(aslClient);
aslresponse_free(r);

please help

Thanks
santosh
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


warning:assignment from distinct Objective-C type

2009-07-01 Thread David Blanton
I have searched and find nothing that helps with the subject line  
warning.


in .h file


NSMutableArray *m_sources;

in .mm file

if(m_sources != nil) [m_sources release];


NSFileManager* defaultManager = [NSFileManager defaultManager];
NSString* volumes = @"/Volumes";


	m_sources = [volumes stringsByAppendingPaths:[defaultManager  
directoryContentsAtPath:volumes]];


the warning comes at the above line

[m_source retain];


note if I do not release / retain m_sources the program crashes with  
exec bad access



So if someone could point to the right direction ...

Thanks!
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread Ken Thomases

On Jul 1, 2009, at 11:26 AM, David Blanton wrote:


in .h file


NSMutableArray *m_sources;

[...]

	m_sources = [volumes stringsByAppendingPaths:[defaultManager  
directoryContentsAtPath:volumes]];


-stringsByAppendingPaths: returns an NSArray*.  That is not an  
NSMutableArray*.  (NSMutableArray is-a NSArray, though, of course.)


By assigning to m_sources, you're "threatening" to invoke mutation  
methods on the object.  This would be a violation of the type system,  
and so the compiler warns you about it.


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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread David Duncan

On Jul 1, 2009, at 9:26 AM, David Blanton wrote:

I have searched and find nothing that helps with the subject line  
warning.


in .h file

NSMutableArray *m_sources;

in .mm file

if(m_sources != nil) [m_sources release];


Unnecessary, sending messages to nil does nothing so checking for nil  
is just a waste of time here.


	m_sources = [volumes stringsByAppendingPaths:[defaultManager  
directoryContentsAtPath:volumes]];


You declared m_sources as an NSMutableArray, but your assigning it an  
NSArray here. Since an NSMutableArray is a subclass of NSArray and not  
the other way around, that is why you are getting the error.



[m_source retain];

note if I do not release / retain m_sources the program crashes with  
exec bad access



Correct. If you don't understand why, I recommend reviewing the Cocoa  
Memory Management Guidelines at 

--
David Duncan
Apple DTS Animation and Printing

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread Andy Lee
On Wednesday, July 01, 2009, at 12:26PM, "David Blanton" 
 wrote:
>   m_sources = [volumes stringsByAppendingPaths:[defaultManager  
>directoryContentsAtPath:volumes]];
>
>   the warning comes at the above line

Look at the Objective-C type for m_sources, and look at the Objective-C type 
returned by stringsByAppendingPaths:.  You are assigning an NSArray to an 
NSMutableArray variable.  The other way around would be okay, because every 
NSMutableArray is also an NSArray.  But an NSArray is not necessarily an 
NSMutableArray.

--Andy


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: GC bug in NSFontManager?

2009-07-01 Thread Tommy Nordgren


On Jul 1, 2009, at 5:34 PM, Ross Carter wrote:



On Jun 30, 2009, at 7:57 PM, Tommy Nordgren wrote:

	Is CCMApp an NSApplication subclass. This stack trace seems to  
indicate that there is an instance of it in

your nib/xib file.


Nope, it's the application delegate. The principal class is  
NSApplication.

___



You might check if any of the following methods depends on outlets  
being correctly set:
2 com.cocomot.Pagehand 0x0003a706 -[CCMFontCollectionsController  
fontNamesFamiliesDictionary] + 312
3 com.cocomot.Pagehand 0x0003a1fc -[CCMFontCollectionsController  
fontCollectionsArrayForControls] + 60

4 com.cocomot.Pagehand 0x000305fe -[CCMApp init] + 806
If so you need to move the code called in CCMApp init,
to the method [CCMApp awakeFromNib] which is called after the nib  
loading mechanism have set all outlets for

the nib
--
What is a woman that you forsake her, and the hearth fire and the home  
acre,
to go with the old grey Widow Maker.  --Kipling, harp song of the Dane  
women

Tommy Nordgren
tommy.nordg...@comhem.se



___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSObjectController, content outlet and content object question

2009-07-01 Thread Michael de Haan


On Jul 1, 2009, at 8:45 AM, Keary Suska wrote:




It might well be possible that I am thinking about the bindings  
incorrectly...and in fact all one needs in this case is to bind the  
view( textfield and slider) to the controller with the correct  
keypath, and that the relationship of a controller to it's content  
is the issue I am not completely understanding.


Binding only involves two endpoints (objects). That there are  
additional inter-object connections involved in a design is a design  
issue and not inherent to bindings in any way. So it is irrelevant  
to the view-controller bindings how the controller gets its content,  
and there are multiple ways this can be done.



Thanks Keary...yes...I think this is the part I was not completely  
seeing.





It appears that you are assuming that bindings involves three  
objects ion an MVC pattern. MVC is a design pattern, bindings are  
only one way to "connect" objects, such as M-C or V-C, but are not  
themselves an implementation of MVC.


Sorry if it came across that way...but you do point out what I was  
missing ie the relationship of the controller to it's content  
( model).  I will think of the content as an ivar/outlet of the  
controller, and thus, as you say, the way this is connected to the  
model is not the issue in the actual binding.


Thanks for your time.






___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: warning:assignment from distinct Objective-C type

2009-07-01 Thread David Blanton

Thanks Ken ...  got it right now!

On Jul 1, 2009, at 10:34 AM, Ken Thomases wrote:


On Jul 1, 2009, at 11:26 AM, David Blanton wrote:


in .h file


NSMutableArray *m_sources;

[...]

	m_sources = [volumes stringsByAppendingPaths:[defaultManager  
directoryContentsAtPath:volumes]];


-stringsByAppendingPaths: returns an NSArray*.  That is not an  
NSMutableArray*.  (NSMutableArray is-a NSArray, though, of course.)


By assigning to m_sources, you're "threatening" to invoke mutation  
methods on the object.  This would be a violation of the type  
system, and so the compiler warns you about it.


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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Chris Tracewell

On Jun 30, 2009, at 8:55 PM, Nick Zitzmann wrote:



On Jun 30, 2009, at 9:49 PM, Chris Tracewell wrote:

Finally, just to be sure to be sure to steer things back to my  
original question... whether I dynamically link or statically link,  
is there a manual anywhere that describes how to do this in XCode?



I'm not sure, but did you try the "add -> existing frameworks" CM  
item and then navigating to /usr/lib in the resulting open panel  
(which you can do by pressing Shift-Cmd-G when it's open)?


Nick Zitzmann



Okay thanks, that at least helped me find the library - which was step  
one. There were several version, I choose libcurl.4.dylib. I am not  
sure where to go now though. I added -libcurl in "Other Linker Flags"  
in my build settings and put #import   (a wild stab) in my  
header file but I still get errors when compiling stating that all of  
my CURL functions are undeclared.


Thank you
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Quincey Morris

On Jul 1, 2009, at 08:54, Adam R. Maxwell wrote:

I'm curious as to why people recommend a tabless NSTabView for  
this.  I've always found tabview subviews to be a pain to set up in  
IB; the alignment and sizing seem really fiddly to get right.  Maybe  
I've been doing something wrong.


I agree with you about the IB side of setting it up, although it  
*really* depends on the particular situation.


Using multiple nibs instead of building one really complicated nib  
has some distinct benefits for maintenance, in my experience.


But drawbacks, too:

-- When you add a subview, you have to write code to resize it to fit  
the window real estate it's supposed to occupy. That's not hard, but  
it's a line or two of glue code you don't have to write with tab views.


-- You can't hook up IBOutlets directly from the window controller to  
the view controller's objects in IB. Sometimes you can eliminate the  
need for the outlet or move it to the view controller. If not, it's  
not terribly hard to code around, but that's a few more lines of glue  
code.


-- If you modularize your controllers, then bindings from the view  
controller's objects get a bit harder. Either you have to defeat the  
modularization by binding to File's Owner.windowController.whatever  
(File's Owner being the view controller subclass, of course, and  
windowController being a property you added to it), or you have to  
"proxy" the bound properties in the view controller, which means more  
glue code to forward the relevant accessors *and* KVO notifications.


Regardless of that, I prefer the modular view controller approach,  
along with the modular IB design approach, but I think the tab view  
approach is "generally easier" in a monolithic sort of way in many  
cases.


Lastly, view controllers are Leopard only, so tab views win in Tiger- 
compatible apps. :)



___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


NSLog / Console / Console Messages

2009-07-01 Thread David Blanton

I am trying to debug a problem with a customer.

I made a build with NSLog messages to trace behavior.

I have the customer open Console and choose Console Messages.

The last message if from march, my messages do not show ???

What is it that I am not aware of re:NSLog

Thanks.
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: multitouch trackpad on macbook pro

2009-07-01 Thread Dimitri Bouniol
For those of us who don't have access to the session videos yet, could  
we have a taste as to whether it is officially supported yet (or will  
be in Snow Leopard)?


On Jun 30, 2009, at 8:18 AM, mmalc Crawford wrote:


On Jun 30, 2009, at 3:33 AM, Memo Akten wrote:

i was wondering if it is at all possible to receive the multi-touch  
data on the trackpads of the recent macbook pros?


Now that the WWDC videos are available, it may be worth watching  (note the related resources).



mmalc



--
定魅刀利
Dimitri Bouniol
dimitri...@mac.com
http://www.appkainime.com/

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSLog / Console / Console Messages

2009-07-01 Thread David Blanton

Yeah.  I just found via Google that this is problematic to 10.5.7

system.log does show everything, the issue is with the console log  
database apparently


I have experienced this on two different machines (customers) running  
10.5.7




On Jul 1, 2009, at 12:08 PM, Bryan Henry wrote:

NSLog messages definitely show in the console logs, and it's pretty  
much impossible that someone has no system log messages since March.  
Are you sure your customer is looking at the right logs in Console?


- Bryan

Sent from my iPhone

On Jul 1, 2009, at 1:02 PM, David Blanton   
wrote:



I am trying to debug a problem with a customer.

I made a build with NSLog messages to trace behavior.

I have the customer open Console and choose Console Messages.

The last message if from march, my messages do not show ???

What is it that I am not aware of re:NSLog

Thanks.
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/bryanhenry%40mac.com

This email sent to bryanhe...@mac.com






___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Keith Duncan

On 1 Jul 2009, at 18:26, Quincey Morris wrote:

Either you have to defeat the modularization by binding to File's  
Owner.windowController.whatever (File's Owner being the view  
controller subclass, of course, and windowController being a  
property you added to it)


This is how I do it, but I don't add a windowController property to  
each of the the view controllers. I instead add a parentController  
outlet typed as id; which allows the parent to be either a window  
controller or another view controller.


Then add a -windowController getter in an NSViewController category  
which walks the parentController chain and finds the top-level  
controller which -isKindOfClass:[NSWindowController class]


This retains the modularity of the view controllers and still provides  
simple access to the window controller's properties and document.


Keith
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


A More User-Friendly FSResolveAlias/WithMountFlags()

2009-07-01 Thread Jerry Krinock
To resolve a file alias, I use FSResolveAlias(), or  
FSResolveAliasWithMountFlags().


If the target file is on a server which is not available, when  
allowing user interaction, these non-cancellable synchronous functions  
cause my app to beachball for 30 seconds (or longer if the server  
recently disappeared without being ejected), and then it displays a  
dialog box: "The server seems to be not operational...".


To put a more reasonable timeout on it and return a nice NSError, or  
make it cancellable, ^and^ be able to kill it so that it won't display  
its annoying dialog long after we've given up on it, I believe that I  
need to wrap it in a helper tool and launch it using NSTask.


Is there any better way to resolve aliases?  Has anyone already done it?

I tried NDAlias but it uses FSResolvAliasWithMountFlags() and thus has  
the same behavior.  I need the user interaction for connecting to the  
server (mountFlags = 0).


Sincerely,

Jerry Krinock


P.S.  May be off topic, but probably only Alias gurus have read this  
far anyhow.  Does anyone know how to tweeze the server name out of an  
alias record's data?  I can see it in there, and the documentation of  
the depracated function GetAliasInfo() says it can get it.  But the  
replacement function, FSCopyAliasInfo(), does not seem to have this  
capability.  Server name is not returned in any of its by-reference  
parameters, and the FSAliasInfo struct does not include a server name  
field either.


I considered using statfs(2).  If I give statfs() a "/Volumes/ 
ServerVolume/…" path, the mntfromname field of the returned struct is  
a C string, for example:


   afp_2lZ2Za000bB1oMVU-1.2e2e

I'd bet that those characters would identify the server if someone  
could explain how to decode it.


The reason I want the server name is because my application allows  
users to import/export similarly-named files on different volumes and  
servers.  In this situation, volume names are often ambiguous.  I  
would like to display the server name also, so that the user knows  
clearly what data they're operating upon.


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Kyle Sluder
On Wed, Jul 1, 2009 at 10:13 AM, Chris Tracewell wrote:
> Okay thanks, that at least helped me find the library - which was step one.
> There were several version, I choose libcurl.4.dylib. I am not sure where to
> go now though. I added -libcurl in "Other Linker Flags" in my build settings
> and put #import   (a wild stab) in my header file but I still get
> errors when compiling stating that all of my CURL functions are undeclared.

curl.h lives in /usr/include/curl/, so you'll need to #include it like
so: #include 

--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


[NSImageView setImage:theImage] Thread safe??

2009-07-01 Thread Trygve Inda
The docs at:

http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Thr
eadSafetySummary/ThreadSafetySummary.html

State:

The NSView class is generally thread-safe, with a few exceptions. You should
create, destroy, resize, move, and perform other operations on NSView
objects only from the main thread of an application. Drawing from secondary
threads is thread-safe as long as you bracket drawing calls with calls to
lockFocusIfCanDraw and unlockFocus.

If a secondary thread of an application wants to cause portions of the view
to be redrawn on the main thread, it must not do so using methods like
display, setNeedsDisplay:, setNeedsDisplayInRect:, or setViewsNeedDisplay:.
Instead, it should send a message to the main thread or call those methods
using the performSelectorOnMainThread: method instead.

So is this legal in a secondary thread?

NSImage* theImage = [[NSImage alloc] initWithContentsOfFile:someImagePath];
[imageView setImage:theImage];
[theImage release];


Note that imageView in an NSImageView in a window and both the window and
the NSImageView were created on the main thread. The secondary thread is
only creating an NSImage and attaching it to the NSImageView.

Safe?

Thanks,

Trygve


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:

2009-07-01 Thread Duncan McGregor

Hi

I'm writing PDF's with RubyCocoa, and want to set the current graphics  
context to a PDF context from CGPDFContextCreateWithURL so that I can  
draw on it.


Essentially my code says (sorry, ObjC folks, Ruby follows)

@pdf_context = CGPDFContextCreateWithURL(pdf_url, CGRectMake(0, 0,  
100, 100), nil)

.
NSGraphicsContext.saveGraphicsState
nscontext =  
NSGraphicsContext 
.graphicsContextWithGraphicsPort_flipped(@pdf_context, true)

NSGraphicsContext.setCurrentContext(nscontext)

My problem is that graphicsContextWithGraphicsPort:flipped: crashes  
RubyCocoa. It's a known issue, and has been fixed, but not shipped in  
10.5.7


Can anyone suggest any workarounds that could get the pdf_context  
current?


Thanks in anticipation

Duncan McGregor
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSLog / Console / Console Messages

2009-07-01 Thread Dimitri Bouniol
Another way to get the logs messages would be to open your app using  
Terminal. To do so, navigate to Application.app/Contents/MacOS/ 
Application and open that file in a terminal window - all log output  
should appear there. I hope this works out :)


On Jul 1, 2009, at 11:35 AM, David Blanton wrote:


Yeah.  I just found via Google that this is problematic to 10.5.7

system.log does show everything, the issue is with the console log  
database apparently


I have experienced this on two different machines (customers)  
running 10.5.7



On Jul 1, 2009, at 12:08 PM, Bryan Henry wrote:

NSLog messages definitely show in the console logs, and it's pretty  
much impossible that someone has no system log messages since  
March. Are you sure your customer is looking at the right logs in  
Console?


- Bryan

Sent from my iPhone

On Jul 1, 2009, at 1:02 PM, David Blanton   
wrote:



I am trying to debug a problem with a customer.

I made a build with NSLog messages to trace behavior.

I have the customer open Console and choose Console Messages.

The last message if from march, my messages do not show ???

What is it that I am not aware of re:NSLog

Thanks.


--
定魅刀利
Dimitri Bouniol
dimitri...@mac.com
http://www.appkainime.com/

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Parsing question about NSXMLParser

2009-07-01 Thread Erg Consultant
I am trying to parse an XML file on the web using NSXMLParser. The page is a 
list of gold prices. I can get the tagged elements with no problem, but the 
price item doesn't seem to be tagged. Can anyone tell me how to get the price 
item in this element using NSXMLParser:

95.2086

Thanks,

Erg



  
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Basic KVO question

2009-07-01 Thread Tim Schmidt

Hi everyone,

first of all, thanks for reading this. I have a basic KVO question. In  
one of my NIBs I have an NSArrayController and a NSSegmentedControl  
with add/remove segments for the array of said controller. Now I want  
to enable the remove-segment according to the controllers canRemove  
message. I've set the NIB's viewcontroller as an observer of the  
arraycontroller's canobserve property as follows:


[statesController addObserver:self forKeyPath:@"canRemove"  
options:NSKeyValueObservingOptionNew  
context:PED_CAN_REMOVE_STATE_CONTEXT];



and receive the obligatory change notifications alright, but the  
change dictionary always contains an NSNull instance for the  
NSKeyValueChangeNewKey instead of the NSNumber bool subclass I would  
expect. Am I doing something wrong here?

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Rendering a fixed-width text

2009-07-01 Thread Riccardo Canalicchio
Hi all,

I'm developing an application for MacOSX, based on Core Animation.
I would like to know the best way to render a fixed-width text paragraph
inside a CALayer. I already tried with CATextLayer, which indeed gave me a
fixed-width text but I wasn't able to make height automatically adjust
accordingly to the number of lines in the paragraph.

Thanks in advance for your help,

Riccardo
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Where to post

2009-07-01 Thread J. Ellis
I know this is not the proper forum for posting job listings, so my
apologies.

I¹ve looked everywhere on the web for somewhere to post a small cleanup job
for a Cocoa programmer, and can¹t find one. If anyone could privately email
me with any places you know of, I would greatly appreciate it.

Again, sorry for the OT.

All My Best,
Jeffrey

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


add/write Quicktime reverse DNS metadata

2009-07-01 Thread Austin
Apple has now used a pretty new (?) reverse DNS metadata for storing
director, actor and content rating tags. Anybody could provide some
example code of how to write r-DNS metadata using quicktime framework.
 No apple example code has covered this. Thanks. -Austin
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSDateFormatter Breaks on non-English OS

2009-07-01 Thread mmalc Crawford


On Jun 30, 2009, at 3:29 PM, Trygve Inda wrote:


NSString*  myDateFormat = @"%a %b %e %H:%M:%S %Z %Y";
NSDate*myDate = nil;
// myDateString is "Tue Jun 30 15:53:24 UTC 2009"
myFormatter = [[NSDateFormatter alloc]  
initWithDateFormat:imageDateFormat

allowNaturalLanguage:NO];
myDate = [myFormatter dateFromString:myDateString];
This works on my English OS, but if I set the Number format to German,
myDate is nil. Why?



It's not clear what you mean by setting the Number format.  What value  
are you setting and where?


If I am supplying the string format, and the string is correct, how  
do I fix

it? Is it because "Tue" is English?


Almost certainly -- "Tue" is not a German abbreviation...

How can I force it to parse in English as my string will always be  
English?





Do you need to support pre-10.4 systems?
You are strongly encouraged to adopt the 10.4+ behaviour for  
formatters.  You can then easily set a specific locale for the  
formatter.
See  (note in particular the references to the Unicode string format  
standards).


mmalc

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How Do I Statically Link to libcurl?

2009-07-01 Thread maxwellmac99
Here's a couple of links on this. Both for iPhone I think but it
should work for Cocoa projects too

http://www.clintharris.net/2009/iphone-app-shared-libraries/

http://t-machine.org/index.php/2009/02/26/using-shared-libraries-for-iphone-with-multiple-projects/

2009/7/1  :
> Send Cocoa-dev mailing list submissions to
>        cocoa-...@lists.apple.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.apple.com/mailman/listinfo/cocoa-dev
> or, via email, send a message with subject or body 'help' to
>        cocoa-dev-requ...@lists.apple.com
>
> You can reach the person managing the list at
>        cocoa-dev-ow...@lists.apple.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Cocoa-dev digest..."
>
>
> Today's Topics:
>
>   1. Re: NSDateFormatter Breaks on non-English OS (Trygve Inda)
>   2. Re: what user does a PreferencePane run as? (Andy Lee)
>   3. Re: NSDateFormatter Breaks on non-English OS (mmalc Crawford)
>   4. Re: what user does a PreferencePane run as? (Bill Janssen)
>   5. [iPhone] newbie Q: switching between two views (Beth Freeman)
>   6. Re: NSDateFormatter Breaks on non-English OS (Trygve Inda)
>   7. Re: Dynamic Services menu, CM plug-in alternatives (Alex Kac)
>   8. How Do I Statically Link to libcurl? (Chris Tracewell)
>   9. Re: How Do I Statically Link to libcurl? (Kyle Sluder)
>  10. Re: [iPhone] newbie Q: switching between two views (Kyle Sluder)
>  11. Re: GC bug in NSFontManager? (Tommy Nordgren)
>  12. Help with Help (AHLookupAnchor) (Graham Cox)
>  13. Crash on wake from sleep (Trygve Inda)
>  14. Re: Raw Infrared Data (Andrew Farmer)
>  15. Re: Raw Infrared Data (Mr. Gecko)
>  16. Re: How Do I Statically Link to libcurl? (Chris Tracewell)
>
>
> --
>
> Message: 1
> Date: Wed, 01 Jul 2009 00:08:38 +
> From: Trygve Inda 
> Subject: Re: NSDateFormatter Breaks on non-English OS
> To: mmalc Crawford ,     Cocoa-dev
>        
> Message-ID: 
> Content-Type: text/plain;       charset="ISO-2022-JP"
>
> So,
>
> In the International Pane of System prefs, I have set the Region to Germany
>
> Then in my app I call:
>
> NSString*      myDateString = @"Tue Jun 30 15:53:24 UTC 2009";
>
> NSDateFormatter* theFormat = [[NSDateFormatter alloc] init];
>
> [theFormat setFormatterBehavior:NSDateFormatterBehavior10_4];
> [theFormat setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]];
> [theFormat setDateFormat:@"EEE MMM dd HH:mm:ss zzz "];
>
> myDate = [myFormatter dateFromString:myDateString];
>
>
> But myDate is always nil. If I set my Region to US or UK all is well.
>
> ???
>
> Trygve
>
>
>
>
> --
>
> Message: 2
> Date: Tue, 30 Jun 2009 20:09:31 -0400
> From: Andy Lee 
> Subject: Re: what user does a PreferencePane run as?
> To: Bill Janssen 
> Cc: Cocoa-dev 
> Message-ID: <56986807302784301701262328742440006465-webm...@me.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Although it has "System" in its name, it's just another double-clickable 
> application, so it runs as the user who launches it.  The fact that you can 
> launch it from the Apple menu is just a convenience.
>
> --Andy
>
> On Tuesday, June 30, 2009, at 08:01PM, "Bill Janssen"  
> wrote:
>>I'm working on a system prefs pref pane for my application.  I'd like to
>>have it read the user's preferences for that application, but I can't
>>find out where it says what user the System Preferences application runs
>>as, and how to control that, or whether that's possible.
>>
>>Bill
>>___
>>
>>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:
>>http://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com
>>
>>This email sent to ag...@mac.com
>>
>>
>
>
> --
>
> Message: 3
> Date: Tue, 30 Jun 2009 17:29:29 -0700
> From: mmalc Crawford 
> Subject: Re: NSDateFormatter Breaks on non-English OS
> To: Trygve Inda 
> Cc: Cocoa-dev 
> Message-ID: <1204b2c7-5dfc-4ab2-88f1-d6c51aef6...@mmalc.com>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
>
> On Jun 30, 2009, at 5:08 PM, Trygve Inda wrote:
>
>> [theFormat setDateFormat:@"EEE MMM dd HH:mm:ss zzz "];
>
>>
> I'm not sure if "UTC" is recognised; try:
>
>        [myFormatter setDateFormat:@"EEE MMM dd HH:mm:ss 'UTC' "];
>
> mmalc
>
>
>
> --
>
> Message: 4
> Date: Tue, 30 Jun 2009 17:49:23 PDT
> From: Bill Janssen 
> Subject: Re: what user does a PreferencePane run as?
> To: Andy Lee 
> Cc: Cocoa-dev 
> Message-ID: <36403.1246409...@parc.com>
>
> Thanks.
>
> Bill
>
> Andy Lee  wrote:
>
>> Although it has "System" in its name, it's just another double-clickable 
>> application, so it runs a

Reading and writing rtf(d) files

2009-07-01 Thread Ian Piper

Hi all,

I have a question about reading and writing file types. I have been  
following an old Apple text editor example (http://developer.apple.com/documentation/Cocoa/Conceptual/TextArchitecture/Tasks/TextEditor.html 
), and want to extend it to allow me to read and write rtf files. At  
least, I want it to be able to round-trip rich text files with  
TextEdit. From the example:


"At this stage of its development, your editor opens and saves  
documents only with an extension of . To enable your application  
to save and open documents with a recognized file type, you need to  
use Xcode to configure the application’s document types settings as  
described in “Storing Document Types Information in the Application's  
Property List” in Document-Based Applications Overview. For complete  
details about application property lists, see Runtime Configuration  
Guidelines."


I read the documents, and an example from 2001 by Mike Beam () and  
also looked at the settings for the TextEdit example. I ended up  
setting it like so:


Creator: ttxt

Name: DocumentType
Extensions: rtfd
MIME Types: text/rtfd
OS Types: rtfd

My program writes files with rich content and reads them OK. But it  
won't read rtfd files that I have created elsewhere (I can select such  
files but they just don't open - nothing happens). Also, TextEdit will  
read files that I have created using my editor, but they are in plain  
text with lots of tutti-frutti.


Can anyone point me to an example that describes how I am supposed to  
tell my application that it should read and write rtf (or rtfd) files?


Ian.
--
ianpi...@mac.com
07590 685840 | 01926 811383




___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Only allowing a file to be opened by one app

2009-07-01 Thread Andy Bettis

Hi,

I'd like to set up my app so that if one user has a file open with it  
another user cannot open the file. This only needs to limit access by  
copies of my app, no need to block out any other process.


In the past I'd just leave a write access path open when the file was  
opened from within my app - this would prevent anyone else from  
getting write access (and therefore opening the file) and has the  
bonus that if the app was closed down unexpectedly (these things  
happen) then the 'lock' was removed. This doesn't happen with default  
NSDocument based apps (like mine) - is there a way of doing it? Or a  
better way of setting exclusive access?


Any help gratefully appreciated.

Love,

Andy
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Shawn Erickson
On Tue, Jun 30, 2009 at 8:49 PM, Chris Tracewell wrote:
>
> On Jun 30, 2009, at 6:43 PM, Kyle Sluder wrote:
>
>> dylib means "dynamic library"...
>>
>> Why do you need to link against libcurl statically?  Not saying there
>> aren't valid use cases, but please present yours.
>
> I guess I assumed that static linking is prefered as it would include
> libcurl with the executable and thus ensure that the app would work
> consistently, even if someone had a different version or had deleted this
> library from their machine. In short it just seemed like a safe option, but
> I am un-educated in this regard, so it was my best guess. The deployment
> environment is fairly easy right now, about 10 machines, mostly 10.5 with
> Intel iMac and Powerbooks which I can tweak if needed, but in the future
> this may grow and so you get the picture.

Apple's API "contract" with application developers is at the library
level and not below that. If the SDK you compile against has the
libraries you need you should not attempt to statically link them into
your application. Additionally any libraries that you do statically
link should utilize system provided libraries themselves and not
attempt to dive down lower (aka kernel interface, etc.). A statically
linked version is not guaranteed to work on a future (or earlier)
version of the operating system. Apple takes strong measures to ensure
the dynamic libraries they provide will work on each of the operating
system they ship on while not breaking compatibility with existing
applications.

Review the documentation on "cross-development" on Apple's developer site.

http://developer.apple.com/documentation/developertools/Conceptual/cross_development/Introduction/CrossDevelopment.html

-Shawn
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


User interface validation doesn't work, right?

2009-07-01 Thread Bill Cheeseman
For years, the "Implementing Validation" section of Apple's "User  
Interface Validation" document has said  the following:


"Before it is displayed, a user interface item checks to see if its  
target implements validateUserInterfaceItem:. If it does, then the  
enabled status of the item is determined by the return value of the  
method. You can therefore conditionally enable or disable an item by  
implementing validateUserInterfaceItem: in the target object."


This has never been true. Right?

My custom window controller implements the action method for a button,  
so it is the button's target, and it also implements - 
validateUserInterfaceItem:, all according to the User Interface  
Validation document. But my -validateUserInterfaceItem: method is  
never called.


If I want it to be called automatically, by analogy to - 
validateMenuItem:, I have to override NSWindow's -update method, by  
analogy to -[NSMenu update]. In my override of -update, I have to do  
for myself what the document claims already happens -- or I have to  
observe NSWindow's -NSWindowDidUpdateNotification. Right?



--

Bill Cheeseman
b...@cheeseman.name

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


IKImageBrowserView reload data broken

2009-07-01 Thread Richard Gutierrez
Hello... I have an IKImageBrowserView that is not refreshing it's data 
correctly. I have an NSPopUpButton which has a list of directories in its 
array, when a directory is selected, it changes the contents of my 
IKImageBrowserView to display all image files contained in the said directory.

Unfortunately, I have encountered an issue with the IKImageBrowserView's 
"reloadData" call. When I have no objects selected in the IKImageBrowserView, 
the reloadData call works as expected. The problem is, I have set 
IKImageBrowserView's "setAllowsEmptySelection" to "NO" and (thanks to you all's 
help) set the IKImageBrowserView to "setSelectionIndexes:[NSIndexSet 
indexSetWithIndex:0] byExtendingSelection:NO];", so there is always a selection.

When my IKImageBrowserView has an object selected, the "reloadData" call gives 
me the following error: "2009-07-01 14:28:43.453 ImageBrowser[17020:813] *** 
-[NSCFArray objectAtIndex:]: index (2147483647( or possibly larger)) beyond 
bounds (0)" and I have been unable to resolve this issue. Here is my call when 
the NSPopUpButton's selection is changed which causes the problem at 
"[imageBrowser reloadData]" on both the "if" and "else" statements:

- (IBAction) pubSelectionChanged:(id)sender {
NSString *selectedPUBItem = [[selectCategoryPUB selectedItem]title];
NSString *selectedCategoryPath = [NSString 
stringWithFormat:@"/Users/richardg/Desktop/Demetras_Images/Thank You_Referral 
Cards/%@", selectedPUBItem];
NSArray *categoryPath = [NSArray arrayWithObject:selectedCategoryPath];
if ([selectedPUBItem isEqualToString:@"All Images"]) {
NSString *allImagesPUBSelection = 
@"/Users/richardg/Desktop/Demetras_Images/Thank You_Referral Cards/";
NSArray *allImagesPath = [NSArray 
arrayWithObject:allImagesPUBSelection];
[images removeAllObjects];
[importedImages removeAllObjects];
[imageBrowser reloadData];
[NSThread detachNewThreadSelector:@selector(addImagesWithPaths:) 
toTarget:self withObject:allImagesPath];
}
else {
[images removeAllObjects];
[importedImages removeAllObjects];
[imageBrowser reloadData];
[NSThread detachNewThreadSelector:@selector(addImagesWithPaths:) 
toTarget:self withObject:categoryPath];
}
}

Any help here would be greatly appreciated. I looked extensively online and 
came up with many dead ends. Thank you AGAIN in advance! You guys are always a 
HUGE help!
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: GC bug in NSFontManager?

2009-07-01 Thread Ross Carter


On Jul 1, 2009, at 12:48 PM, Tommy Nordgren wrote:
You might check if any of the following methods depends on outlets  
being correctly set:
2 com.cocomot.Pagehand 0x0003a706 -[CCMFontCollectionsController  
fontNamesFamiliesDictionary] + 312
3 com.cocomot.Pagehand 0x0003a1fc -[CCMFontCollectionsController  
fontCollectionsArrayForControls] + 60

4 com.cocomot.Pagehand 0x000305fe -[CCMApp init] + 806
If so you need to move the code called in CCMApp init,
to the method [CCMApp awakeFromNib] which is called after the nib  
loading mechanism have set all outlets for

the nib
--
What is a woman that you forsake her, and the hearth fire and the  
home acre,
to go with the old grey Widow Maker.  --Kipling, harp song of the  
Dane women

Tommy Nordgren
tommy.nordg...@comhem.se


Based on the response to the bug report and the responses here, I am  
going to distribute a test app to see if we're on the right track.  
Thanks everyone.


Ross
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Chris Tracewell

On Jul 1, 2009, at 2:18 PM, Shawn Erickson wrote:


Apple's API "contract" with application developers is at the library
level and not below that. If the SDK you compile against has the
libraries you need you should not attempt to statically link them into
your application. Additionally any libraries that you do statically
link should utilize system provided libraries themselves and not
attempt to dive down lower (aka kernel interface, etc.). A statically
linked version is not guaranteed to work on a future (or earlier)
version of the operating system. Apple takes strong measures to ensure
the dynamic libraries they provide will work on each of the operating
system they ship on while not breaking compatibility with existing
applications.

Review the documentation on "cross-development" on Apple's developer  
site.


http://developer.apple.com/documentation/developertools/Conceptual/cross_development/Introduction/CrossDevelopment.html

-Shawn



Shawn,

Awesome. Thanks a ton for explaining, your post reversed my  
perspective and rested my fears about taking what really is the easier  
route.


Thanks to all contributers thus far, I have gotten the project to  
compile without errors. However I am stck with implementation  
details... I'll start a new thread for that.



Thanks

Chris
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Parsing question about NSXMLParser

2009-07-01 Thread Fritz Anderson

On 1 Jul 2009, at 3:49 PM, Erg Consultant wrote:

I am trying to parse an XML file on the web using NSXMLParser. The  
page is a list of gold prices. I can get the tagged elements with no  
problem, but the price item doesn't seem to be tagged. Can anyone  
tell me how to get the price item in this element using NSXMLParser:


95.2086Price>


Upon entry to the element, allocate an NSMutableString and put it  
where you can find it.


Upon foundCharacters, accumulate characters into the string.

Upon exit from the element, use the accumulated string.

— F

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


libcurl -- how to write a callback?

2009-07-01 Thread Chris Tracewell
I've gotten libcurl linked and ready to use thanks to many  
contributors from a previous post here. Does anyone have a snippet  
code or link of an example of writing a callback function for say  
CURLOPT_READFUNCTION?



Thank you


Chris
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Basic KVO question

2009-07-01 Thread Keary Suska

On Jun 29, 2009, at 6:09 PM, Tim Schmidt wrote:

first of all, thanks for reading this. I have a basic KVO question.  
In one of my NIBs I have an NSArrayController and a  
NSSegmentedControl with add/remove segments for the array of said  
controller. Now I want to enable the remove-segment according to the  
controllers canRemove message. I've set the NIB's viewcontroller as  
an observer of the arraycontroller's canobserve property as follows:


[statesController addObserver:self forKeyPath:@"canRemove"  
options:NSKeyValueObservingOptionNew  
context:PED_CAN_REMOVE_STATE_CONTEXT];



and receive the obligatory change notifications alright, but the  
change dictionary always contains an NSNull instance for the  
NSKeyValueChangeNewKey instead of the NSNumber bool subclass I would  
expect. Am I doing something wrong here?


This is probably due to a known bug that will not likely ever be  
fixed. In your particular case, it doesn't matter, as the value will  
have been changed before you receive the observer message.


Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


libSystem.B.dylib

2009-07-01 Thread David Blanton
My app is running on numerous customer machines.  With the recent  
10.5.7 software update I am getting calls that my app is crashing on  
iMacs only so far.


It is always in libSystem.B.dylib and some string function, e.g strlen 
+16, strchr+10 etc


Is this a known Apple problem?


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


libSystem.B.dylib Calling Code

2009-07-01 Thread David Blanton
Here is code that crashes. the parms coming in are checked for  
validity before ReplaceChar is called




void ReplaceChar(char *s, char oldChar, char newChar)
{
if(newChar == oldChar)
return;
char *n = strchr(s, oldChar);
while(n)
{
*n = newChar;
n = strchr(n+1, oldChar);
}
}

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libcurl -- how to write a callback?

2009-07-01 Thread Greg Guerin

Chris Tracewell wrote:

I've gotten libcurl linked and ready to use thanks to many  
contributors from a previous post here. Does anyone have a snippet  
code or link of an example of writing a callback function for say  
CURLOPT_READFUNCTION?


What have you tried?

For example, I found a number of likely prospects simply by entering  
CURLOPT_READFUNCTION as a google search term.


I narrowed it down by adding the keyword "sample" or "example".

libcurl is not unique to Mac OS X, so a reasonable first step should  
always be to google (or bing, yahoo, whatever) for examples.  A  
reasonable second step would be to add the search term mac os x.


  -- GG

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: [Rubycocoa-talk] Alternative to NSGraphicsContext graphicsContextWithGraphicsPort:flipped:

2009-07-01 Thread Scott Thompson
 
On Wednesday, July 01, 2009, at 02:51PM, "Duncan McGregor" 
 wrote:
>Hi
>
>I'm writing PDF's with RubyCocoa, and want to set the current graphics  
>context to a PDF context from CGPDFContextCreateWithURL so that I can  
>draw on it.
>
>Essentially my code says (sorry, ObjC folks, Ruby follows)
>
>@pdf_context = CGPDFContextCreateWithURL(pdf_url, CGRectMake(0, 0,  
>100, 100), nil)
>.
>NSGraphicsContext.saveGraphicsState
>nscontext =  
>NSGraphicsContext 
>.graphicsContextWithGraphicsPort_flipped(@pdf_context, true)
>NSGraphicsContext.setCurrentContext(nscontext)
>
>My problem is that graphicsContextWithGraphicsPort:flipped: crashes  
>RubyCocoa. It's a known issue, and has been fixed, but not shipped in  
>10.5.7
>
>Can anyone suggest any workarounds that could get the pdf_context  
>current?

If I understand... you're going all the way to NSGraphicsContext just to flip 
the coordinate system?  That's a long row to hoe :-).

Try something like (typed into mail)

CGContextTranslateCTM(pdf_context, 0, 100); # where 100 is the height of the 
context...
CGContextScaleCTM(pdf_context, 1.0, -1.0);

use that instead of trying to set the flipped bit.

Scott

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libSystem.B.dylib

2009-07-01 Thread David Blanton
I agree with your premise but my code is portable and runs on many  
other machines with 10.5.7 AND there are post all over the internet  
about apps such as MS Office and Safari crashing inthe same lib.



On Jul 1, 2009, at 4:18 PM, David Springer wrote:


It is likely you are passing a bad pointer into your string functions.
It is *extremely* rare for a company like Apple to have a bug in such
low-level code.

- Dave.S

On Wed, Jul 1, 2009 at 4:14 PM, David Blanton  
wrote:
My app is running on numerous customer machines.  With the recent  
10.5.7
software update I am getting calls that my app is crashing on iMacs  
only so

far.

It is always in libSystem.B.dylib and some string function, e.g  
strlen+16,

strchr+10 etc

Is this a known Apple problem?


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/dspringer%40google.com

This email sent to dsprin...@google.com





--
http://go/OnlyCheckEmailTwiceADay - join the movement




___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libcurl -- how to write a callback?

2009-07-01 Thread Geoff Beier
On Wed, Jul 1, 2009 at 5:42 PM, Chris Tracewell wrote:
> I've gotten libcurl linked and ready to use thanks to many contributors from
> a previous post here. Does anyone have a snippet code or link of an example
> of writing a callback function for say CURLOPT_READFUNCTION?
>

That question is indubitably more appropriate for the libcurl mailing list:
http://curl.haxx.se/mail/list.cgi?list=curl-library

Look at the various examples that ship with the libcurl source
distribution (I know httpput.c has a simple sample) and if you have
any specific question after reading those, it's probably best to ask
there.

Also, read libcurl-tutorial(3) installed locally on your system.

HTH,

Geoff
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libSystem.B.dylib

2009-07-01 Thread Greg Guerin

David Blanton wrote:

I agree with your premise but my code is portable and runs on many  
other machines with 10.5.7 AND there are post all over the internet  
about apps such as MS Office and Safari crashing in the same lib.



List the assembly-language instructions of the function.  The crash  
is at strlen+16 or strchr+10, so it shouldn't take much deciphering.


Another thing: list the instructions of the 10.5.6 functions, then  
list the 10.5.7 functions, and see if there's a difference.


Also, narrow down the exact model and CPU arch.  "On iMacs" covers a  
wide range of possibilities.


  -- GG

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: [NSImageView setImage:theImage] Thread safe??

2009-07-01 Thread Michael Ash
2009/7/1 Trygve Inda :
> So is this legal in a secondary thread?
>
> NSImage* theImage = [[NSImage alloc] initWithContentsOfFile:someImagePath];
> [imageView setImage:theImage];
> [theImage release];

No.

There's a very simple rule to follow when examining thread safety. The
default state of any code is not to be thread safe. Thus, look at the
documentation: is the method in question *explicitly* documented to be
thread safe? If not, then it is not thread safe. A lack of
documentation means it's unsafe, not that it's safe.

That NSView is mostly thread safe confers nothing on subclasses of
NSView. They're talking only about NSView's methods. Any new methods
added by subclasses aren't covered.

Furthermore, beware of weasel words like "with a few exceptions",
especially when followed with this:

"You should create, destroy, resize, move, and perform other
operations on NSView objects only from the main thread of an
application."

I have no idea how this squares with "generally thread-safe", but when
in doubt, assume it's not.

Since -[NSImage setImage:] is nowhere documented to be thread safe
that I can see, you must assume that it's not.

Mike
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Only allowing a file to be opened by one app

2009-07-01 Thread Michael Ash
On Wed, Jul 1, 2009 at 11:47 AM, Andy Bettis wrote:
> Hi,
>
> I'd like to set up my app so that if one user has a file open with it
> another user cannot open the file. This only needs to limit access by copies
> of my app, no need to block out any other process.
>
> In the past I'd just leave a write access path open when the file was opened
> from within my app - this would prevent anyone else from getting write
> access (and therefore opening the file) and has the bonus that if the app
> was closed down unexpectedly (these things happen) then the 'lock' was
> removed. This doesn't happen with default NSDocument based apps (like mine)
> - is there a way of doing it? Or a better way of setting exclusive access?
>
> Any help gratefully appreciated.

How about calling open() with the O_EXLOCK flag, or using the flock()
call on your document file?

Mike
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libSystem.B.dylib

2009-07-01 Thread David Blanton

Ok. I'll  tackle with your suggestions.

These iMacs

  Model Name:   iMac
  Model Identifier: iMac7,1
  Processor Name:   Intel Core 2 Duo
  Processor Speed:  2.4 GHz
  Number Of Processors: 1
  Total Number Of Cores:2
  L2 Cache: 4 MB
  Memory:   1 GB
  Bus Speed:800 MHz
  Boot ROM Version: IM71.007A.B03
  SMC Version (system): 1.20f4

  Model Name:   iMac
  Model Identifier: iMac8,1
  Processor Name:   Intel Core 2 Duo
  Processor Speed:  2.66 GHz
  Number Of Processors: 1
  Total Number Of Cores:2
  L2 Cache: 6 MB
  Memory:   2 GB
  Bus Speed:1.07 GHz
  Boot ROM Version: IM81.00C1.B00
  SMC Version (system): 1.29f1


This OS

  System Version:   Mac OS X 10.5.7 (9J61)
  Kernel Version:   Darwin 9.7.0


On Jul 1, 2009, at 4:51 PM, Greg Guerin wrote:


David Blanton wrote:

I agree with your premise but my code is portable and runs on many  
other machines with 10.5.7 AND there are post all over the internet  
about apps such as MS Office and Safari crashing in the same lib.



List the assembly-language instructions of the function.  The crash  
is at strlen+16 or strchr+10, so it shouldn't take much deciphering.


Another thing: list the instructions of the 10.5.6 functions, then  
list the 10.5.7 functions, and see if there's a difference.


Also, narrow down the exact model and CPU arch.  "On iMacs" covers a  
wide range of possibilities.


 -- GG

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/airedale%40tularosa.net

This email sent to aired...@tularosa.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: User interface validation doesn't work, right?

2009-07-01 Thread Keary Suska

On Jul 1, 2009, at 3:24 PM, Bill Cheeseman wrote:

For years, the "Implementing Validation" section of Apple's "User  
Interface Validation" document has said  the following:


"Before it is displayed, a user interface item checks to see if its  
target implements validateUserInterfaceItem:. If it does, then the  
enabled status of the item is determined by the return value of the  
method. You can therefore conditionally enable or disable an item by  
implementing validateUserInterfaceItem: in the target object."


This has never been true. Right?


No, I would say it is usually true, but not always.

My custom window controller implements the action method for a  
button, so it is the button's target, and it also implements - 
validateUserInterfaceItem:, all according to the User Interface  
Validation document. But my -validateUserInterfaceItem: method is  
never called.


Implementing the action method isn't sufficient, BTW. The object must  
also be the current target (i.e. first responder for nil-targeted  
actions, or designated target). Also note that not all user interface  
items do this--they must conform to the NSValidatedUserInterfaceItem  
(or NSUserInterfaceValidations) protocol, which IIRC NSButton does  
not. In fact, I think only menu items and toolbar items do.


If I want it to be called automatically, by analogy to - 
validateMenuItem:, I have to override NSWindow's -update method, by  
analogy to -[NSMenu update]. In my override of -update, I have to do  
for myself what the document claims already happens -- or I have to  
observe NSWindow's -NSWindowDidUpdateNotification. Right?



Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libSystem.B.dylib

2009-07-01 Thread Michael Ash
On Wed, Jul 1, 2009 at 6:14 PM, David Blanton wrote:
> My app is running on numerous customer machines.  With the recent 10.5.7
> software update I am getting calls that my app is crashing on iMacs only so
> far.
>
> It is always in libSystem.B.dylib and some string function, e.g strlen+16,
> strchr+10 etc
>
> Is this a known Apple problem?

One thing that's really helpful to do when you're getting crashes that
produce crash logs is to actually post an example crash log to the
list. Even if you don't see anything useful in it, other people might.

Mike
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libcurl -- how to write a callback?

2009-07-01 Thread Chris Tracewell

Chris Tracewell wrote:


I've gotten libcurl linked and ready to use thanks to many
contributors from a previous post here. Does anyone have a snippet
code or link of an example of writing a callback function for say
CURLOPT_READFUNCTION?


What have you tried?

For example, I found a number of likely prospects simply by entering
CURLOPT_READFUNCTION as a google search term.

I narrowed it down by adding the keyword "sample" or "example".

libcurl is not unique to Mac OS X, so a reasonable first step should
always be to google (or bing, yahoo, whatever) for examples.  A
reasonable second step would be to add the search term mac os x.

  -- GG



Uhmmm well sometimes the obvious comes to you after someone else  
makes you feel like an idiot. I googled the *$% out of


libcurl,
libcurl OS X,
libcurl Cocoa example,
libcurl Obj-C example

So, my apologies for not thinking of using the actual function name,  
which is where I typically start with NSXyz methods I need help with.



Thank you - it all seems so clear now.


Chris
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libSystem.B.dylib Calling Code

2009-07-01 Thread Shawn Erickson
On Wed, Jul 1, 2009 at 3:18 PM, David Blanton wrote:
> Here is code that crashes. the parms coming in are checked for validity
> before ReplaceChar is called
>
> void ReplaceChar(char *s, char oldChar, char newChar)
> {
>    if(newChar == oldChar)
>        return;
>    char *n = strchr(s, oldChar);
>    while(n)
>    {
>        *n = newChar;
>        n = strchr(n+1, oldChar);
>    }
> }

Are you sure "oldChar" cannot be '\0'? If "oldChar" is '\0' then your
n+1 will put you past the end "s". Of course replacing the null
terminator with anything other then a null terminator will break the
c-stringness of the character array.

Anyway can you post a full backtrace of a crashed thread?

-Shawn
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: libcurl -- how to write a callback?

2009-07-01 Thread Chris Tracewell


On Jul 1, 2009, at 3:21 PM, Geoff Beier wrote:

On Wed, Jul 1, 2009 at 5:42 PM, Chris Tracewell  
wrote:
I've gotten libcurl linked and ready to use thanks to many  
contributors from
a previous post here. Does anyone have a snippet code or link of an  
example

of writing a callback function for say CURLOPT_READFUNCTION?



That question is indubitably more appropriate for the libcurl  
mailing list:

http://curl.haxx.se/mail/list.cgi?list=curl-library

Look at the various examples that ship with the libcurl source
distribution (I know httpput.c has a simple sample) and if you have
any specific question after reading those, it's probably best to ask
there.

Also, read libcurl-tutorial(3) installed locally on your system.

HTH,

Geoff




Indeed, thanks I'll head over there and thank you for the httpput.c  
mention.


Chris
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Determining OS at Runtime

2009-07-01 Thread iseecolors
I need to support 10.4 in my application, but it uses some Carbon APIs  
that are deprecated in 10.5 and I am using some new 10.5 APIs that  
require the 10.5 SDK.


I am sure I have seen this before, but I have been unable to find it  
in the Archive.  How do I determine at runtime which OS version I am  
running on?


Rich Collyer

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: User Interface Validation doesn't work, right?

2009-07-01 Thread Bill Cheeseman

On Jul 1, 2009, at 7:00 PM, Keary Suska wrote:


This has never been true. Right?


No, I would say it is usually true, but not always.


I would like very much to see a project in which it does work. The  
documentation certainly says it works, but my efforts to make it work  
suggest that the documentation is wrong. Have you ever seen a project  
in which it works, or are you just relying on the documentation?


My custom window controller implements the action method for a  
button, so it is the button's target, and it also implements - 
validateUserInterfaceItem:, all according to the User Interface  
Validation document. But my -validateUserInterfaceItem: method is  
never called.


Implementing the action method isn't sufficient, BTW. The object  
must also be the current target (i.e. first responder for nil- 
targeted actions, or designated target). Also note that not all user  
interface items do this--they must conform to the  
NSValidatedUserInterfaceItem (or NSUserInterfaceValidations)  
protocol, which IIRC NSButton does not. In fact, I think only menu  
items and toolbar items do.


My controller is the target, which according to Apple's documentation,  
and according to my understanding for many years, means simply that it  
implements the button's action method. My controller does in fact  
implement the action method. In addition, my controller is in the  
responder chain, which is demonstrated by the fact that the action  
method, which is connected to the First Responder proxy in Interface  
Builder, executes correctly when I click the button. Also, I declare  
the controller to conform to the NSUserInterfaceValidations protocol,  
which it does because it implements the -validateUserInterfaceItem:  
method. NSButton does conform to the NSValidatedUserInterfaceItem  
protocol, as its header file confirms, and it does implement the - 
action: and -target: methods required by that protocol.


So I think you are claiming this works because the documentation says  
so. I'm saying the documentation is wrong because it doesn't work. I  
would love to see a project proving me wrong. Can you show me one?


It does work if you've implemented a menu item that calls the same  
action method, because the menu item validation protocol works as  
advertised. That is, it falls back on -validateUserInterfaceItem: if  
you don't implement -validateMenuItem. Toolbar item validation also  
works, because, like menu item validation, it is wired to do so. So  
don't send me any projects showing that menu items and toolbar items  
work correctly. My complaint is that this technique doesn't work for  
user interface items other than menu items and toolbar items, and that  
the documentation claiming it does work is wrong.


--

Bill Cheeseman
b...@cheeseman.name
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: User interface validation doesn't work, right?

2009-07-01 Thread Bill Cheeseman

On Jul 1, 2009, at 5:56 PM, mmalc Crawford wrote:


It depends on the sort of user interface element.
This does work for menu items and tab bar items...


Hi, mmalc. It works perfectly well with menu items and toolbar items  
because they're specially coded to make it work. The docs are clear  
about that, and they're correct.


But it doesn't work at all for user controls in general, and the docs  
are misleading (i.e., wrong) about that.


Unless I'm overlooking something. I'm not overlooking anything, am I?


--

Bill Cheeseman
b...@cheeseman.name
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Only allowing a file to be opened by one app

2009-07-01 Thread Andy Bettis

On 2 Jul 2009, at 00:02, Michael Ash wrote:

On Wed, Jul 1, 2009 at 11:47 AM, Andy Bettis  
wrote:

Hi,

I'd like to set up my app so that if one user has a file open with it
another user cannot open the file. This only needs to limit access  
by copies

of my app, no need to block out any other process.

In the past I'd just leave a write access path open when the file  
was opened
from within my app - this would prevent anyone else from getting  
write
access (and therefore opening the file) and has the bonus that if  
the app
was closed down unexpectedly (these things happen) then the 'lock'  
was
removed. This doesn't happen with default NSDocument based apps  
(like mine)
- is there a way of doing it? Or a better way of setting exclusive  
access?


Any help gratefully appreciated.


How about calling open() with the O_EXLOCK flag, or using the flock()
call on your document file?


I was hoping to integrate things gracefully within the AppKit  
framework. It seems like the default NSDocument behaviour is to open a  
file, load the data into an NSData structure, then close the file  
before (or after?) passing the data on to readFromData:ofType:error:  
to process. If I add a locking call I need to be sure it will be  
unlocked before saving the file or the program will fall over itself  
(if you see what I mean).


I thought I might need to supply a delegate to handle NSApplication's  
application:openFile: method to do any locking and checking for  
locking but there doesn't seem to be a corresponding closeFile call to  
tidy things up.


Reading further it looks like I could achieve my locking by overriding  
readFromURL:ofType:error: to leave the file opened with a lock (or to  
give an error message if the file is locked) and remove the lock when  
the file's window is closed. I'd also need to override  
writeToURL:ofType:error: to allow for the file already being open.  
Does this sound like a good plan?


I feel like this is a bit messy and there should be a more elegant way  
of doing things - am I missing something?


Cheers,

Andy
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: [NSImageView setImage:theImage] Thread safe??

2009-07-01 Thread Trygve Inda
> 2009/7/1 Trygve Inda :
>> So is this legal in a secondary thread?
>> 
>> NSImage* theImage = [[NSImage alloc] initWithContentsOfFile:someImagePath];
>> [imageView setImage:theImage];
>> [theImage release];
> 
> No.


> I have no idea how this squares with "generally thread-safe", but when
> in doubt, assume it's not.
> 
> Since -[NSImage setImage:] is nowhere documented to be thread safe
> that I can see, you must assume that it's not.

Thanks. I guess I drew too much into "generally thread-safe"... I guess
rocks generally float at 1 Infinite Loop, except when they don't.  :-)

Trygve


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Inconsistent "double-click to edit" in NSTableView

2009-07-01 Thread K . Darcy Otto
I have an NSTableView subclass that has a pair of columns that are  
acting inconsistently when the user double-clicks to begin editing.   
In the first column, the user can double-click anywhere in the cell to  
begin editing that cell.  In the second column, which is the last  
column of the table, the following happens: (i) if the cell is blank,  
the user can click anywhere to begin editing the cell; (ii) if the  
cell has text, the user must click on the text in the cell to begin  
editing the cell.  Does anybody have an idea what is going on?


It seems to me that a double-click anywhere in the cell (whether there  
is text or not) should initiate editing.  But even if (ii) were the  
case for both columns, I would be happy.  It is the inconsistency that  
has caused some minor problems during testing.

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Table Selection Persists even though Window Closed

2009-07-01 Thread K . Darcy Otto
I have a document-based application that has, as its main UI element,  
an NSTableView subclass.  I want to disable menu items based on  
whether the table has a row selected.  I do this via - 
validateUserInterfaceItem, and everything works under normal  
circumstances: I check for a selected row with [myTable selectedRow],  
and if I get a -1 (indicating no row is selected), the menu items are  
disabled.


The problem: when I close all the document windows, but do not close  
the application, and a row was selected prior to the last document  
window being closed, [myTable selectedRow] reports whatever the last  
row selected was, not -1 (even though it is not possible for a row to  
be selected, because there is no table in an open window).


What might be of help in diagnosing this problem: when I issue  
[[myTable window] firstResponder], the first responder is myTable  
(even though the window is closed).


Anybody know of a solution to this problem?  I have a feeling my whole  
approach may be off, but I'm not sure.  Thanks.

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


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 I'm  
wondering if there is a better way. I've also checked various  
examples but most want to draw the selected rows differently, not  
an arbitrary row.


At the moment I subclass the cell for each of the columns of the  
view ( same subclass). In my delegates objectValueForTableColumn I  
set a variable 'shouldDrawRow' to true if that is the 'special' row  
I want to draw myself.


In the cell subclass I override drawInteriorWithFrame and check to  
see if this value is set in my delegate and if so call a delegate  
method to draw the background first.


This seems like a real hack as it assumes that  
drawInteriorWithFrame will be called straight after  
objectValueForTableColumn. This is sort of reasonable because the  
cell is reused all the time so it 'works'. The other problem though  
is I want to draw the ends of the rows differently to the middle  
( thin rounded rectangle ) and drawInteriorWithFrame only gives me  
the rectangle to draw in. I've got no way of finding out which  
column it is. Again it will work because the columns won't change  
so I can hard code some values.


However I'm thinking there must be a better way. What I really need  
is some way of finding out the column and row of the cell about to  
be drawn, but I can't see it. Am I missing something?


Such questions are hard to answer intelligently, because too much  
depends on the details of your implementation, but that's never  
stopped me from answering unintelligently before ...


I think it is a hack, and what you *really need* is to use your  
actual data model.


That is, the objectValue for the columns in your special row need to  
be recognizable as something different from the object values in the  
non-special rows. Then your custom cell subclass, you test to see  
whether its current objectValue is special, and draw it specially if  
so. No fuss, no hacks, no hard-coded column assumptions.


OK, thanks for that. I hadn't thought of that way.

For example, if the regular object values were NSNumber objects, and  
the special row values were column totals, I'd wrap the NSNumber  
totals inside a custom object and put those in the data model  
instead. If that would mess up your data model for other purposes,  
I'd have objectValueForTableColumn detect the special row index and  
return the wrapped NSNumber when the row index dictates.


Yes, it will mess up the data model so I'll have to do it in  
objectValueForTableColumn. The data model is a simulator for AVR  
microcontrollers, which I have written in C++. I am just trying to  
draw a nice background for the current PC in the disassembled  
instruction view,  rather than drawing the usual pointer.


Thanks for your help. At least I know I am not missing something  
obvious.


It does seem a bit of an oversight that there isn't something like  
drawBackground: column: row.


cheers,

Peter
www.fracturedsoftware.com/rondo/  - MIDI for your mac
www.fracturedsoftware.com/macsimavr/

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


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 hack so I'm wondering if  
there is a
better way. I've also checked various examples but most want to  
draw the

selected rows differently, not an arbitrary row.



Subclass NSTableView and implement your special drawing in -
(void)drawBackgroundInClipRect:(NSRect)clipRect.

/Dado


Problem with this is there is no obvious concordance ( that I can see)  
between a row and its rectangle.

Wouldn't scrolling affect all this?

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

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

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


Re: Determining OS at Runtime

2009-07-01 Thread Sherm Pendley
On Wed, Jul 1, 2009 at 7:24 PM, iseecolors wrote:
> I need to support 10.4 in my application, but it uses some Carbon APIs that
> are deprecated in 10.5 and I am using some new 10.5 APIs that require the
> 10.5 SDK.
>
> I am sure I have seen this before, but I have been unable to find it in the
> Archive.  How do I determine at runtime which OS version I am running on?

Just check for the presence of the function you want to call. In
Xcode, set your deployment target to 10.4, so that Leopard-only
symbols will be weak-linked. Then just check the symbol for NULL
before calling it:

if (SomeLeopardFunction != NULL) {
SomeLeopardFunction();
} else {
TigerFunction();
}

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread André Berg

Well, after spending the whole day... I think it is really hard to do.

I haven't gotten anywhere yet, but if I find out something I will post 
it of course :)

I cannot imagine that this is an uncommon task...

Cheers,

André


--- Original Nachricht ---
Absender: André Berg
Datum: 01.07.2009 10:35 Uhr

Hi David,

Thanks for replying :)

Actually I am coming from a v0.1 version of my program, was trying to 
implement this with AppleScript Studio.
The Finder's dictionary has a "select" command but it appears that 
this command does nothing more than to
call said NSWorkspace method. The behaviour of executing the "select" 
command/method in a loop,
with the same set of path strings, once using pure Cocoa and once 
using pure AppleScript is exactly the same.
It will open a new Finder window for every path string entry in the 
array.


It *is* possible to supply the whole AppleScript list (AppleScript 
list = NSArray) to the Finder's select command
(if you convert the POSIX path-style strings in the list to file URLs 
via "POSIX file") and the "select" command is

smart enough to make a selection of all items in the frontmost window ...
... but only for the current folder level.

The problem with expanded subfolders in list view remains. Any paths 
that point to files with expanded subfolders
will spawn a new Finder window each. I am currently experimenting with 
looping through the subfolders, issueing
a NSAppleScript script that passes a list of POSIX files representing 
each subfolder's contents every cycle of the loop,
but it looks like it's not keeping the selection in the parent folder 
if I go to target a subfolder in the next loop cycle...


Thanks for the pointer to the AE docs. Until now I have always been 
shying away from reading those as raw AppleEvents
are still confusing the heck out of me. Seems there's no excuse left 
now  unless there's some other way?



Cheers

André

--- Original Nachricht ---
Absender: Dave Keck
Datum: 01.07.2009 7:20 Uhr

I'd imagine the easiest way to do this is using an AppleScript, which
can be embedded in your app using the NSAppleScript class.

But I've got a whole lot of PTSD towards AppleScript, so if it were
me, I would deal with the AppeEvents directly, much as it's done here:

http://developer.apple.com/documentation/Applescript/Conceptual/AppleEvents/create_send_aepg/create_send_aepg.html 



David

  

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/andre.berg%40email.de

This email sent to andre.b...@email.de


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: User interface validation doesn't work, right?

2009-07-01 Thread Gregory Weston

Bill Cheeseman wrote:


For years, the "Implementing Validation" section of Apple's "User
Interface Validation" document has said  the following:

"Before it is displayed, a user interface item checks to see if its
target implements validateUserInterfaceItem:. If it does, then the
enabled status of the item is determined by the return value of the
method. You can therefore conditionally enable or disable an item by
implementing validateUserInterfaceItem: in the target object."

This has never been true. Right?


It appears that it only for UI items that conform to  
NSValidatedUserInterfaceItem.

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread Kyle Sluder
On Wed, Jul 1, 2009 at 5:54 PM, André Berg wrote:
> I cannot imagine that this is an uncommon task...

Really?  I can't actually think of a case in which this behavior would
be useful.

--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: User interface validation doesn't work, right?

2009-07-01 Thread Keary Suska

On Jul 1, 2009, at 5:27 PM, Bill Cheeseman wrote:

My controller is the target, which according to Apple's  
documentation, and according to my understanding for many years,  
means simply that it implements the button's action method. My  
controller does in fact implement the action method. In addition, my  
controller is in the responder chain, which is demonstrated by the  
fact that the action method, which is connected to the First  
Responder proxy in Interface Builder, executes correctly when I  
click the button. Also, I declare the controller to conform to the  
NSUserInterfaceValidations protocol, which it does because it  
implements the -validateUserInterfaceItem: method. NSButton does  
conform to the NSValidatedUserInterfaceItem protocol, as its header  
file confirms, and it does implement the -action: and -target:  
methods required by that protocol.


So I think you are claiming this works because the documentation  
says so. I'm saying the documentation is wrong because it doesn't  
work. I would love to see a project proving me wrong. Can you show  
me one?



No, I am saying that it works as advertised for objects that it works  
for. NSButton is not one of them, and never has been. You seem to  
assume that all user interface items should, but they don't, and never  
have, and the documentation has never said that they did. The  
documentation is explicit:


"The protocols NSUserInterfaceValidations and  
NSValidatedUserInterfaceItem provide a standard way to validate user  
interface items—that is, to set their state as appropriate for the  
current application context"


Validation is not a function of user interface items, it is a function  
of the protocol(s) listed. Neither NSButton, nor any of its parents  
conforms to the protocol, so none of them support validation of this  
kind. Look at NSMenuItem, and you will see that it does, and that your  
validation method will always be called.


Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Programmatically adding to one big Finder selection ?

2009-07-01 Thread Graham Cox


On 02/07/2009, at 10:54 AM, André Berg wrote:


Well, after spending the whole day... I think it is really hard to do.

I haven't gotten anywhere yet, but if I find out something I will  
post it of course :)


I would say that unless the Finder explicitly exposes some API (maybe  
via scripting) to do this, you are out of luck. Trying to "trick it"  
into performing this using some more generic API is probably doomed to  
failure unless somewhere it is documented that it will definitely  
perform the task in the way you want.



I cannot imagine that this is an uncommon task...



On the contrary, I'd imagine that it's exceedingly uncommon.

If you want to select (highlight) arbitrary paths in a single Finder  
window, it means that window will have to first decide what the common  
root of all the paths is, then expand a possibly very deep hierarchy  
of those paths in order that all the given paths are visible. This  
raises so many usability questions that I find it little wonder it's  
pretty nigh on impossible *unless the user manually does it*. It  
requires too many smarts for such a minority need that chances are  
it's simply unimplemented.


Revealing a file in the Finder is usually done with reference to a  
single file to answer the question "where did I put that?", and the  
scripting support it provides reflects that usage.


If I'm wrong on this, no doubt someone will correct me - I have no  
inside knowledge. But if I were implementing something like the  
Finder, unless this feature was specifically part of the spec I  
wouldn't be implementing it just on the offchance it would be useful,  
because it'd be such a hard one to do!


--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Rendering a fixed-width text

2009-07-01 Thread Scott Thompson


On Jun 30, 2009, at 9:52 AM, Riccardo Canalicchio wrote:


I'm developing an application for MacOSX, based on Core Animation.
I would like to know the best way to render a fixed-width text  
paragraph
inside a CALayer. I already tried with CATextLayer, which indeed  
gave me a

fixed-width text but I wasn't able to make height automatically adjust
accordingly to the number of lines in the paragraph.


To some extent it depends on your application.

I would recommend looking at the Cocoa text system and in particular  
how to assemble the text system "by hand":


http://developer.apple.com/documentation/Cocoa/Conceptual/TextArchitecture/Tasks/AssembleSysByHand.html

Using that you could determine the size and layout (line breaks) for a  
section of text (fixed-width or not).  You could also use that system  
to draw the text onto the layer using the NSLayoutManager:


- (void)drawBackgroundForGlyphRange:(NSRange)glyphsToShow atPoint: 
(NSPoint)origin;
- (void)drawGlyphsForGlyphRange:(NSRange)glyphsToShow atPoint:(NSPoint) 
origin;


If Cocoa is not to your liking, then you could also use the Core Text  
system, a C interface that the Cocoa Text (at least in part) is built  
upon:


http://gemma.apple.com/documentation/Carbon/Conceptual/CoreText_Programming/Introduction/Introduction.html

Scott

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Graham Cox


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 this?



I wonder if the delegate method:

- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell  
forTableColumn:(NSTableColumn *)aTableColumnrow:(NSInteger)rowIndex



would be better for your needs? It gives you the row and column so you  
know where you are, and is called as part of the drawing loop of the  
table, you can just go ahead and draw. Use -rectOfRow to get the row  
and paint the background. I just tried the code below and it works fine:


		if( rowIndex == 5 && [[aTableView tableColumns] objectAtIndex:0] ==  
aTableColumn )

{
NSRect rowRect = [aTableView rectOfRow:rowIndex];
[[NSColor lightGrayColor] set];
NSRectFill( rowRect );
}

Note that here I paint the background of row 5 and only for the first  
column (though the whole row is painted - if you don't do this the  
additional paints on columns > 1 will erase the content of the cells  
in earlier columns. This shows that the table drawing is performed as  
you'd expect: for each row draw columns 0..n). Some variation on this  
ought to work for you.


Another alternative is to subclass NSTableView and override - 
drawRow:clipRect: which might be considered less of a hack than using  
the delegate method to draw.



--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Drawing the background of a single row in NSTableView

2009-07-01 Thread Adam R. Maxwell


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 this?



I wonder if the delegate method:

- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id) 
aCell forTableColumn:(NSTableColumn *)aTableColumnrow:(NSInteger) 
rowIndex



would be better for your needs? It gives you the row and column so  
you know where you are, and is called as part of the drawing loop of  
the table, you can just go ahead and draw. Use -rectOfRow to get the  
row and paint the background. I just tried the code below and it  
works fine:


ISTR having problems with this, possibly due to intercell spacing,  
back when we had to draw alternating row colors manually.


Another alternative is to subclass NSTableView and override - 
drawRow:clipRect: which might be considered less of a hack than  
using the delegate method to draw.


I took that route, using an additional datasource method that I've  
defined as tableView:backgroundColorForRow:, and it seems to work  
fairly well.


- (void)drawRow:(NSInteger)row clipRect:(NSRect)clipRect;
{
NSColor *color = [[self dataSource] tableView:self  
backgroundColorForRow:row];

// ignore any background color if the row is selected
if (color && [self isRowSelected:row] == NO) {
[NSGraphicsContext saveGraphicsState];
NSRectClip(clipRect);
NSRect rowRect = [self rectOfRow:row];
// draw over the alternating row color
[[NSColor whiteColor] setFill];
NSRectFill(NSIntersectionRect(rowRect, clipRect));
// draw with rounded end caps
CGFloat radius = NSHeight(rowRect) / 2.0;
NSBezierPath *p = [NSBezierPath  
bezierPathWithRoundedRect:NSInsetRect(rowRect, 1.0, 0.0)  
xRadius:radius yRadius:radius];

[color setFill];
[p fill];
[NSGraphicsContext restoreGraphicsState];
}
// draw cells on top of the new row background
[super drawRow:row clipRect:clipRect];
}





smime.p7s
Description: S/MIME cryptographic signature
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Dynamically loading a part of a Window in Cocoa

2009-07-01 Thread Adam R. Maxwell


On Jul 1, 2009, at 10:26 AM, Quincey Morris wrote:


On Jul 1, 2009, at 08:54, Adam R. Maxwell wrote:

I'm curious as to why people recommend a tabless NSTabView for  
this.  I've always found tabview subviews to be a pain to set up in  
IB; the alignment and sizing seem really fiddly to get right.   
Maybe I've been doing something wrong.


I agree with you about the IB side of setting it up, although it  
*really* depends on the particular situation.


I've mostly tried with a tabview as a subview of a splitview, and I've  
found that once it's set up, I don't dare move it.


Using multiple nibs instead of building one really complicated nib  
has some distinct benefits for maintenance, in my experience.


But drawbacks, too:

-- When you add a subview, you have to write code to resize it to  
fit the window real estate it's supposed to occupy. That's not hard,  
but it's a line or two of glue code you don't have to write with tab  
views.


-- You can't hook up IBOutlets directly from the window controller  
to the view controller's objects in IB. Sometimes you can eliminate  
the need for the outlet or move it to the view controller. If not,  
it's not terribly hard to code around, but that's a few more lines  
of glue code.


Good point; not being able to connect outlets can be a hassle.  I  
typically end up making weak references from the view controller to a  
document object or similar controller, and that can get messy.


-- If you modularize your controllers, then bindings from the view  
controller's objects get a bit harder. Either you have to defeat the  
modularization by binding to File's Owner.windowController.whatever  
(File's Owner being the view controller subclass, of course, and  
windowController being a property you added to it), or you have to  
"proxy" the bound properties in the view controller, which means  
more glue code to forward the relevant accessors *and* KVO  
notifications.


Well, I generally avoid bindings, since I can't comment nib/xib files,  
and it takes too long to reverse engineer my own (or worse, someone  
else's) bindings when I'm doing maintenance work.  With that  
perspective, the minor glue code to swap views is no big deal :).


Lastly, view controllers are Leopard only, so tab views win in Tiger- 
compatible apps. :)


I've used NSWindowControllers and custom objects for this for years,  
so that's also no big deal :).  If the OP has a fixed set of views,  
tabview could well be the easiest way to go, depending on the  
complexity of the overall view hierarchy.


regards,
Adam





smime.p7s
Description: S/MIME cryptographic signature
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Rendering a fixed-width text

2009-07-01 Thread Kyle Sluder
On Tue, Jun 30, 2009 at 7:52 AM, Riccardo
Canalicchio wrote:
> I'm developing an application for MacOSX, based on Core Animation.
> I would like to know the best way to render a fixed-width text paragraph
> inside a CALayer. I already tried with CATextLayer, which indeed gave me a
> fixed-width text but I wasn't able to make height automatically adjust
> accordingly to the number of lines in the paragraph.

A quick Google search for "automatically resize CATextLayer" turned up
this: http://www.cocoabuilder.com/archive/message/cocoa/2007/12/5/194497

--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Basic KVO question

2009-07-01 Thread Kyle Sluder
On Mon, Jun 29, 2009 at 5:09 PM, Tim Schmidt wrote:
> and receive the obligatory change notifications alright, but the change
> dictionary always contains an NSNull instance for the NSKeyValueChangeNewKey
> instead of the NSNumber bool subclass I would expect. Am I doing something
> wrong here?

Nope.  NSObjectController subclasses don't properly handle the
notification options.  Please file a radar at bugreport.apple.com and
let Apple know that yet another developer has been stymied by this
flaw.

--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


How can I get rid of this message?

2009-07-01 Thread Agha Khan

I am adding a object (somedata)
for (int i = 0; i < 7; i++)
{
SomeData* singleNutData = [[SomeData alloc] init];
[NutArray addObject: SomeData];
}

I am getting warning.
NSArray may not respond to -addObject.
(Message without a matching method signature will be assumed to return  
id and accept '...' as arguments.)


Am I am doing something wrong?
I am new to Apple development and how can I get rid of this message.

Thanks in advance.
Best regards
-Agha
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How can I get rid of this message?

2009-07-01 Thread Dave Keck
'NutArray' must be declared as an NSMutableArray to respond to
-addObject. NSArray is immutable, and thus doesn't respond to
-addObject:.
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How can I get rid of this message?

2009-07-01 Thread Nick Zitzmann


On Jul 1, 2009, at 8:41 PM, Agha Khan wrote:


Am I am doing something wrong?


Yes.


I am new to Apple development and how can I get rid of this message.



NSArrays are immutable; NSMutableArrays are. Make your array mutable,  
and then you can add and remove objects from it. Note that it's not  
enough to just declare the pointer to be an NSMutableArray; you must  
also allocate an object of that class or else you'll get mutation  
exceptions.


Nick Zitzmann




___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How can I get rid of this message?

2009-07-01 Thread WT

On Jul 2, 2009, at 4:41 AM, Agha Khan wrote:


I am adding a object (somedata)
for (int i = 0; i < 7; i++)
{
SomeData* singleNutData = [[SomeData alloc] init];
[NutArray addObject: SomeData];
}

I am getting warning.
NSArray may not respond to -addObject.
(Message without a matching method signature will be assumed to  
return id and accept '...' as arguments.)


Am I am doing something wrong?
I am new to Apple development and how can I get rid of this message.

Thanks in advance.
Best regards
-Agha


NSArray is a class representing array objects that *cannot* be  
changed, once they're created and initialized. You're trying to change  
one by adding a new object to the array, and the compiler is telling  
you that NSArray objects do not respond to the message that adds an  
object. Makes sense, no?


What you need is to declare your array as an instance of  
NSMutableArray, which is the class that represents arrays which you  
*can* change.


You should read the documentation for both NSArray and NSMutableArray  
to better understand the differences between the two (for instance,  
what messages NSMutableArray responds to which NSArray doesn't).


Wagner

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: How can I get rid of this message?

2009-07-01 Thread Roland King
1) NSArray doesn't respond to addObject, you need NSMutableArray, where 
is your declaration of NutArray?


2) you're leaking singleNutData each time you make one (unless you are 
using Garbage collection or there's a release you're not showing


3) NutArray should really start with a lowercase letter if you're being 
standard about naming. NutArray would be a class, nutArray is an instance.


Agha Khan wrote:

I am adding a object (somedata)
for (int i = 0; i < 7; i++)
{
SomeData* singleNutData = [[SomeData alloc] init];
[NutArray addObject: SomeData];
}

I am getting warning.
NSArray may not respond to -addObject.
(Message without a matching method signature will be assumed to return  
id and accept '...' as arguments.)


Am I am doing something wrong?
I am new to Apple development and how can I get rid of this message.

Thanks in advance.
Best regards
-Agha
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org

This email sent to r...@rols.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


  1   2   >