Re: Weird bug in IB...

2008-11-13 Thread Sherm Pendley

On Nov 13, 2008, at 1:17 AM, Jean-Nicolas Jolivet wrote:

I'm trying to place a label over a TableView and for some reason  
there's just no way the label will show up once I run the app...


In Interface Builder it looks good (basically it's just a label  
saying "Drop your files here"...) I made sure I "Sent it to  
front"... while sending the table view to the back...


As I understand it, z-ordering of overlapping sibling views has never  
been guaranteed to work. The menu items are only for use while editing  
the nib.


I did the exact same thing in another project and I had no problem  
whatsoever, in fact I have the two nib files side by side in IB and  
I can't see any difference between the two! But one just wont work...!


"Not guaranteed to work" != "Guaranteed to not work." :-(

sherm--

___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Quincey Morris

On Nov 12, 2008, at 23:24, Jean-Nicolas Jolivet wrote:

One quick question, how can I modify my TextView's z-order? I'm  
looking at NSView's methods but can't seem to find one that does  
that? (I'm probably just missing it since NSView's got a good bunch  
of'em!... :)

I always did it in IB before


The subviews of a view are an array in drawing order. (Element 0 is  
backmost, I believe, but I can never quite remember.) Therefore, you  
can use removeFromSuperview + addSubview:positioned:relativeTo:, or  
sortSubviewsUsingFunction:context:.



___

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 [EMAIL PROTECTED]


Re: Thread programming

2008-11-13 Thread Mahaboob
I'm really sorry. I forgot to attach the code. Now I'm attaching it.


On 11/13/08 12:14 PM, "Stephen J. Butler" <[EMAIL PROTECTED]> wrote:

> On Thu, Nov 13, 2008 at 12:18 AM, Mahaboob <[EMAIL PROTECTED]> wrote:
>> I'm very new to thread programming. I tried with using NSRunLoop, but it
>> can't succeeded. Here I'm attaching the code file. In the thread where and
>> how I need to use runloop ?
> 
> Your attachment didn't come through. Anyway, here's how to use
> runloops in your new thread:
> 
>  oopManagement/chapter_6_section_1.html#//apple_ref/doc/uid/1057i-CH16-SW1>
> ___
> 
> 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/mahaboob%40newtok.com
> 
> This email sent to [EMAIL PROTECTED]



Send
Description: Binary data
___

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 [EMAIL PROTECTED]

Re: NSDistantObject in Core Data

2008-11-13 Thread Sebastian Morsch

Hi,

I can't answer your first question, but concerning your second one:

check out NSPropertyDescription isTransient:. However, this applies to  
properties, not entities. I don't think entities can be transient in  
the true meaning of the word. But if all properties of an entity are  
transient, it probably has the same effect.


Best,
Sebastian


Am 13.11.2008 um 08:53 schrieb Bridger Maxwell:


Hey,
I am creating a server in which I would like to somehow add a  
relationship
to an NSDistantObject in my Core Data object graph. I know  
NSDistantObjects

can't be archived. I will have an an array of all of the live
NSDistantObjects in my application, I just need to relate them to  
entities
in Core Data. Perhaps NSDistantObject instances have a unique  
identifier I
can store in the data graph and use as a key to retrieve the live  
instance?
For this I have considered the hash function or using the actual  
pointer

value. However, I am not sure if either are very safe.

On a related note, I obviously wouldn't want these references to
NSDistantObjects to be saved to the persistent store. Is there a way  
to mark

an entity in Core Data as temporary so they are not saved or restored?

Thank You,
Bridger Maxwell
___

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/sebastianmorsch%40mac.com

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Re: Thread programming

2008-11-13 Thread Jean-Daniel Dupas


Please, read the link provided in the previous post. It describe in  
details how and when to setup and run a run loop.
Using a runloop without understanding what it does is not a good  
thing, especially if you want to do multi-threading programming.




Le 13 nov. 08 à 09:48, Mahaboob a écrit :


I'm really sorry. I forgot to attach the code. Now I'm attaching it.


On 11/13/08 12:14 PM, "Stephen J. Butler" <[EMAIL PROTECTED]>  
wrote:


On Thu, Nov 13, 2008 at 12:18 AM, Mahaboob <[EMAIL PROTECTED]>  
wrote:
I'm very new to thread programming. I tried with using NSRunLoop,  
but it
can't succeeded. Here I'm attaching the code file. In the thread  
where and

how I need to use runloop ?


Your attachment didn't come through. Anyway, here's how to use
runloops in your new thread:



___

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/mahaboob 
%40newtok.com


This email sent to [EMAIL PROTECTED]


___

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/devlists%40shadowlab.org

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Again about NSTableView and NSArrayController bindings

2008-11-13 Thread Michele Barboni

Hi,
 following Hillegass example (RaiseMan app) I'm trying to populate my  
NSTableView with bindings.


I've a custom class, 3 attributes, call it MyCustomClass.
I've an appController, where there's a NSMutableArray (called table)  
with instances of MyCustomClass.

I've a NSTableView in IB, 3 columns.
And of course an NSArrayController object in IB.

According to Hillegass here's what I've done:

1) (IB) In Array Controller Attributes, Object Controller, Class:  
MyCustomClass and for Key the three names of MyCustomClass attributes.
2) (IB) In Array Controller Bindings, Content Array, Bind to: App  
Controller, model key path: table
3) (IB) For each NSTableColumn of the NSTableView: bindings panel,  
Bind to: Array Controller, controller key: arrangedObjects, model key  
path:  the name of the key column should handle.


Now, in an awakeFromNib:  my application connect and query a MySQL  
database, retrieve entries and store them as MyCustomClass instances,  
then call addObject: on the NSMutableArray table.. but nothing appears  
in my NSTableView..


What am I missing?
___

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 [EMAIL PROTECTED]


Re: NSDistantObject in Core Data

2008-11-13 Thread Quincey Morris

On Nov 12, 2008, at 23:53, Bridger Maxwell wrote:

I am creating a server in which I would like to somehow add a  
relationship
to an NSDistantObject in my Core Data object graph. I know  
NSDistantObjects

can't be archived. I will have an an array of all of the live
NSDistantObjects in my application, I just need to relate them to  
entities
in Core Data. Perhaps NSDistantObject instances have a unique  
identifier I
can store in the data graph and use as a key to retrieve the live  
instance?
For this I have considered the hash function or using the actual  
pointer

value. However, I am not sure if either are very safe.

On a related note, I obviously wouldn't want these references to
NSDistantObjects to be saved to the persistent store. Is there a way  
to mark

an entity in Core Data as temporary so they are not saved or restored?


One answer is to use a transient attribute to represent the  
relationship. Set the attribute's "kind" to Undefined, and use a  
custom NSManagedObject subclass. Define an instance variable in the  
subclass to hold the actual NSDistantObject pointer, and write custom  
accessors to get and manipulate its value:


	http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdAccessorMethods.html#/ 
/apple_ref/doc/uid/TP40002154-SW14


If you need a to-many relationship, the instance variable can be a  
NSSet* instead.


Then, add awakeFromInsert/awakeFromFetch methods to the entity's  
custom class to set up the initial relationship (give a suitable  
starting value to the instance variable).


That's the short version -- hope it makes sense.

___

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 [EMAIL PROTECTED]


IKImageBrowserView with NSArrayController bindings

2008-11-13 Thread Florian Soenens

Hi list,

i have an IKImageBrwoserView bound to an NSArrayController of objects.
The objects all conform to the IKImagebrowserItem protocol.

When running my application, all the images display correctly in the  
browser view, this al works fine, BUT:


In the IKImageBrowserDelegate, i implemented  
imageBrowserSelectionDidChange like this for testing purposes:

(I also have an IBOutlet to my NSArrayController)

- (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser
{
NSLog([[arrayController selectedIndex] description]);
}

The problem is that the NSArrayController always logs the same index,  
no mather what item i select in de BrowserView.

I assumed that it would always reflect the currently selected index.

I can fix it by doing this but i am not sure if this is the right way  
to go, or is it just a bug in IKImageBrowserView?


- (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser
{
[arrayController setSelectionIndexes:[aBrower selectionIndexes]];
NSLog([[arrayController selectedIndex] description]);
}

Help would be much appreciated.
Thanks,
Florian.




Looking for Web-to-Print Solutions?
Visit our website :   http://www.vit2print.com


This e-mail, and any attachments thereto, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information and/or information protected by intellectual property 
rights.
If you are not the intended recipient, please note that any review, 
dissemination, disclosure, alteration, printing, copying or transmission of 
this e-mail and/or any file transmitted with it, is strictly prohibited and may 
be unlawful.
If you have received this e-mail by mistake, please immediately notify the 
sender and permanently delete the original as well as any copy of any e-mail 
and any printout thereof.
We may monitor e-mail to and from our network.

NSS nv Tieltstraat 167 8740 Pittem Belgium 
___


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 [EMAIL PROTECTED]


Re: Again about NSTableView and NSArrayController bindings

2008-11-13 Thread Quincey Morris

On Nov 13, 2008, at 01:05, Michele Barboni wrote:

Now, in an awakeFromNib:  my application connect and query a MySQL  
database, retrieve entries and store them as MyCustomClass  
instances, then call addObject: on the NSMutableArray table.. but  
nothing appears in my NSTableView..


What am I missing?


Adding objects to a NSMutableArray with addObject: is not KVO- 
compliant. This means that observers of the array (e.g. your  
NSArrayController) don't get notified of the change automatically.


There are two easy solutions. One is modify the NSMutableArray  
compliantly. Instead of:


[table addObject: myCustomObject];

use:

	[[appController mutableArrayValueForKey: @"table"] addObject:  
myCustomObject];


The other is to use NSArrayController's addObject: method, which does  
approximately the same thing:


[myArrayController addObject: myCustomObject];

The slight drawback to this approach is that you have to create an  
IBOutlet on your app controller, and hook it up to the array  
controller in IB, so that you can have a reference to the  
NSArrayController to send the addObject: message to.


The other slight complication is that, in general, NSArrayController's  
arrangedObjects is a sorted and filtered version of the content array.  
Adding the object via the NSArrayController may put it in a different  
order from adding it via the NSMutableArray. However, if you have no  
sorting or filtering, the result should be the same.



___

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 [EMAIL PROTECTED]


Re: IKImageBrowserView with NSArrayController bindings

2008-11-13 Thread Florian Soenens
One more thing on this, if i bind an nstableview to my  
NSArrayController (to just display the path to the image object) the  
arrayController does reflect the changes, like so:


- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
NSLog([[arrayController selectionIndexes] description]);
}

The log displays different indexes like it should, so i assume that  
IKImageBrowserView could have a bug in it's bindings.


PS: is it enough to just bind the IKImageBrowserView to Controller Key  
@"arrangedObject" without a Model Key Path?


On 13 Nov 2008, at 10:29, Florian Soenens wrote:


Hi list,

i have an IKImageBrwoserView bound to an NSArrayController of objects.
The objects all conform to the IKImagebrowserItem protocol.

When running my application, all the images display correctly in the  
browser view, this al works fine, BUT:


In the IKImageBrowserDelegate, i implemented  
imageBrowserSelectionDidChange like this for testing purposes:

(I also have an IBOutlet to my NSArrayController)

- (void) imageBrowserSelectionDidChange:(IKImageBrowserView *)  
aBrowser

{
NSLog([[arrayController selectedIndex] description]);
}

The problem is that the NSArrayController always logs the same  
index, no mather what item i select in de BrowserView.

I assumed that it would always reflect the currently selected index.

I can fix it by doing this but i am not sure if this is the right  
way to go, or is it just a bug in IKImageBrowserView?


- (void) imageBrowserSelectionDidChange:(IKImageBrowserView *)  
aBrowser

{
[arrayController setSelectionIndexes:[aBrower selectionIndexes]];
NSLog([[arrayController selectedIndex] description]);
}

Help would be much appreciated.
Thanks,
Florian.




Looking for Web-to-Print Solutions?
Visit our website :   http://www.vit2print.com


This e-mail, and any attachments thereto, is intended only for use  
by the addressee(s) named herein and may contain legally privileged  
and/or confidential information and/or information protected by  
intellectual property rights.
If you are not the intended recipient, please note that any review,  
dissemination, disclosure, alteration, printing, copying or  
transmission of this e-mail and/or any file transmitted with it, is  
strictly prohibited and may be unlawful.
If you have received this e-mail by mistake, please immediately  
notify the sender and permanently delete the original as well as any  
copy of any e-mail and any printout thereof.

We may monitor e-mail to and from our network.

NSS nv Tieltstraat 167 8740 Pittem  
Belgium___


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/florian.soenens%40nss.be

This email sent to [EMAIL PROTECTED]




Looking for Web-to-Print Solutions?
Visit our website :   http://www.vit2print.com


This e-mail, and any attachments thereto, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information and/or information protected by intellectual property 
rights.
If you are not the intended recipient, please note that any review, 
dissemination, disclosure, alteration, printing, copying or transmission of 
this e-mail and/or any file transmitted with it, is strictly prohibited and may 
be unlawful.
If you have received this e-mail by mistake, please immediately notify the 
sender and permanently delete the original as well as any copy of any e-mail 
and any printout thereof.
We may monitor e-mail to and from our network.

NSS nv Tieltstraat 167 8740 Pittem Belgium 
___


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 [EMAIL PROTECTED]


Re: IKImageBrowserView with NSArrayController bindings

2008-11-13 Thread Matt Gough


On 13 Nov 2008, at 11:25, Florian Soenens wrote:


NSLog([[arrayController selectionIndexes] description]);


Not related to your problem, but this style of NSLog has a potential  
pitfall if the description method were to return a string with any of  
the supported formatting sequences in it. It would be expecting other  
parameters to fill in the details.


The usual and simpler version would be:

NSLog(@"%@",  [arrayController selectionIndexes]);

(The %@ get replaced by the result of the supplied object's  
description method)


Matt Gough
___

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 [EMAIL PROTECTED]


Animating frame width on UIButton with background image

2008-11-13 Thread Bryan Hansen
Is it possible to animate the width of a UIButton of  
UIButtonStyleCustom type? I have an animation on frame size which  
works fine when the UIButton is a UIButtonTypeRoundedRect. But has no  
visible affect when I am using a UIButtonStyleCustom with background  
image. I am trying to use a background image that has  
stretchableImageWithLeftCapWidth, but I have also noticed that a  
normal UIImage as the background fails to animate as well. My  
animation code is here:


[UIView beginAnimations:nil context:@"MyAnimation"];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.25];
CGRect tempFrame = myButton.frame;
tempFrame.size.width = tempFrame.size.width + 100.0f;
myButton.frame = tempFrame;
[UIView commitAnimations];

Thanks for the help!
Bryan


___

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 [EMAIL PROTECTED]


Re: Mysterious warning [SOLVED]

2008-11-13 Thread Uli Kusterer

On 12.11.2008, at 12:30, Graham Cox wrote:

lvalp->val = strtod( --wptr, &wptr );

"warning: operation on 'wptr' may be undefined"


For a detailed description of why this is bad, see:

 http://zathras.de/blog-c-parameter-evaluation-order.htm

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.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 [EMAIL PROTECTED]


reorderable ( outline | collection ) view

2008-11-13 Thread René v Amerongen

Hi all,

Not yet a complete cocoa question, but I did see last week somewhere  
in an app an one column view.

In this view there where other views vertical drag-able/reorder-able.
When you did drag a view you saw the background getting solid grey and  
the dragging view was getting transparent, then when sliding that view  
over another view this view was sliding up or down.


I cant find it anymore, have googleing for some time now.

Does some one has an idea, which program that could be. So far as I  
remember there was also some code about this.


I want to show this to a client later today. She has less imagination  
how it will work and want to show this.


Thanks in advance

René___

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 [EMAIL PROTECTED]


Re: IKImageBrowserView with NSArrayController bindings

2008-11-13 Thread Quincey Morris

On Nov 13, 2008, at 01:29, Florian Soenens wrote:

- (void) imageBrowserSelectionDidChange:(IKImageBrowserView *)  
aBrowser

{
NSLog([[arrayController selectedIndex] description]);
}

The problem is that the NSArrayController always logs the same  
index, no mather what item i select in de BrowserView.

I assumed that it would always reflect the currently selected index.


NSArrayController doesn't respond to 'selectedIndex' -- I think you  
mean 'selectionIndex'.


You should have got a compilation error for this. IAC, the index is an  
integer, not an object, so you couldn't have usefully sent a  
'description' message to it either.



___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Uli Kusterer

On 13.11.2008, at 07:17, Jean-Nicolas Jolivet wrote:
Any particular reasons why my label will always show up behind my  
tableview no matter what I do??



 The drawing order of sibling views in AppKit was never guaranteed to  
be well-defined. In plain English that means the only drawing order  
you can rely on is that subviews will be drawn after their superview.  
I think you can turn on Layer-backed views to make this behaviour more  
predictable, but that's a bit fiddly, too.


 So, no, it's not an IB bug, it's simply a documented inability of  
AppKit. Don't ask me why it isn't supported. Even Carbon does that,  
and it's very easy to do this with good performance. Heck, I  
implemented speedy and correct overlapping with transparency back in  
the System 8 days for MacZoop, and I was just starting out as a  
programmer...


Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.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 [EMAIL PROTECTED]


Re: IKImageBrowserView with NSArrayController bindings

2008-11-13 Thread Florian Soenens

I'm sorry, i was typing this out of my head in mail. Here's what i did:

- (void) imageBrowserSelectionDidChange:(IKImageBrowserView *) aBrowser
{
[arrayController setSelectionIndexes:[aBrower selectionIndexes]];
NSLog([[arrayController selectionIndexes] description]);
}

Any ideas?



On 13 Nov 2008, at 11:10, Quincey Morris wrote:


On Nov 13, 2008, at 01:29, Florian Soenens wrote:

- (void) imageBrowserSelectionDidChange:(IKImageBrowserView *)  
aBrowser

{
NSLog([[arrayController selectedIndex] description]);
}

The problem is that the NSArrayController always logs the same  
index, no mather what item i select in de BrowserView.

I assumed that it would always reflect the currently selected index.


NSArrayController doesn't respond to 'selectedIndex' -- I think you  
mean 'selectionIndex'.


You should have got a compilation error for this. IAC, the index is  
an integer, not an object, so you couldn't have usefully sent a  
'description' message to it either.



___

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/florian.soenens%40nss.be

This email sent to [EMAIL PROTECTED]




Looking for Web-to-Print Solutions?
Visit our website :   http://www.vit2print.com


This e-mail, and any attachments thereto, is intended only for use by the 
addressee(s) named herein and may contain legally privileged and/or 
confidential information and/or information protected by intellectual property 
rights.
If you are not the intended recipient, please note that any review, 
dissemination, disclosure, alteration, printing, copying or transmission of 
this e-mail and/or any file transmitted with it, is strictly prohibited and may 
be unlawful.
If you have received this e-mail by mistake, please immediately notify the 
sender and permanently delete the original as well as any copy of any e-mail 
and any printout thereof.
We may monitor e-mail to and from our network.

NSS nv Tieltstraat 167 8740 Pittem Belgium 
___


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 [EMAIL PROTECTED]


core data + bindings + custom view ?

2008-11-13 Thread eblugamma

heres a little more detail:
I have an NSControl subclass that maintains a list of cells, and an  
NSMutableArray called "content". I have
successfully bound its "content" to the core data based array  
controller's "arrangedObjects" array. I thought that was all I needed  
to do to get bindings working, so I made my  setContent: accessor  
method so that it kept my cell list updated with the content list...  
this did not work.  my setContent accessor was called once, during the  
initialization phase of the app.


next, I tried registering for KVO on the array controller's  
"arrangedObjects" value, thinking that... since it is an array, it IS  
a "to many" relationship, and I would not only get alerts to changes  
to the array, but also information about the changes, in the change  
dictionary under the "NSKeyValueChangeKindKey" key.  This sort of  
worked. I get a notification when the ArrangedObjects is altered, but  
the information about the change is NOT in evidence. Apparently, this  
is not a "to many" relationship after all?  (ummm... what??!!?!?  is  
this true?) And isn't this KVO a little redundant anyway? doesn't  
bindings do this already? isn't there some way for me to automatically  
get notified BECAUSE "content" is bound to the array controller?  
(which is what I was trying to do with the setContent: method)


currently, I am thinking that I will have to discover the changes  
myself, by comparing my content against my cells. it seems a bit  
redundant (read: wasteful), but that seems to be the order of the  
day... do everything twice.


so in all of this, i am frantically looking for ANY documentation that  
explains how to duplicate any part of something I see and use every  
day... namely the smooth interaction between a custom UI element (that  
works SORT of like a tableview, in that it displays a list of things)  
and an array controller that happens to use core data for its  
content.  The official apple docs, are... anemic at best, and my  
google searches have come up empty.


it seems from my worm's eye view, that what I am trying to accomplish  
SHOULD not be this difficult, nor this kludgey, I really feel like I  
am missing something important, but try as I might, the documentation  
falls extremely short of being helpful.


thanks guys,
-eblu
___

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 [EMAIL PROTECTED]


Help mangling my server URL

2008-11-13 Thread David
I'm setting up help for my application to have priority for a server
copy. In Help Indexer I've specified my remote root as
http://foo/help/1.0/ and told it to prefer network files to local
files.

When I run the application and try to look at help it says that
"/help/1.0index.html" could not be found. It should be looking for
/help/1.0/index.html. Why did it mangle the name?

Any ideas appreciated.
___

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 [EMAIL PROTECTED]


XCode 3.1 compiler doesn't like CFDataRef bridge to (NSData *) object.

2008-11-13 Thread Lee, Frederick (Ric)
Greetings:

The following code:

 

CFDataRef faxMsgData = (NSData *)[[self.faxHistoryItemDict
objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding];

CGDataProviderRef faxMsgDataRef =
CGDataProviderCreateWithCFData(faxMsgData);

 

 

gives me the following compiler warning:

...: "warning: initialization from incompatible pointer type"

 

 

I get the same warning with/without the (NSData *) cast.

 

What am I doing wrong?

 

Regards,

Ric.

 

___

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 [EMAIL PROTECTED]


RE: XCode 3.1 compiler doesn't like CFDataRef bridge to (NSData *)object.

2008-11-13 Thread Etienne Guérard
Did you mean a cast to (CFDataRef) ?

-Original Message-
CFDataRef faxMsgData = (NSData *)[[self.faxHistoryItemDict
objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding];


I get the same warning with/without the (NSData *) cast.


This message and any attachments (the "message") are confidential and intended 
solely for the addressee(s). Any unauthorised use or dissemination is 
prohibited. E-mails are susceptible to alteration. Neither DxO Labs nor any of 
its subsidiaries or affiliates shall be liable for the message if altered, 
changed or falsified.
Ce message et toutes les pieces jointes (ci-apres le "message") sont 
confidentiels et etablis a l'intention exclusive de ses destinataires. Toute 
utilisation ou diffusion non autorisee est interdite. Tout message electronique 
est susceptible d'alteration. DxO Labs et ses filiales declinent toute 
responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie.

___

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 [EMAIL PROTECTED]


Re: XCode 3.1 compiler doesn't like CFDataRef bridge to (NSData *) object.

2008-11-13 Thread matt . gough


On 13 Nov 2008, at 16:54, Lee, Frederick (Ric) wrote:




   CFDataRef faxMsgData = (NSData *)[[self.faxHistoryItemDict
objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding];



Shouldn't that be :

   CFDataRef faxMsgData = (CFDataRef)[[self.faxHistoryItemDict
objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding];

Matt
___

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 [EMAIL PROTECTED]


RE: XCode 3.1 compiler doesn't like CFDataRef bridge to (NSData *) object.

2008-11-13 Thread Lee, Frederick (Ric)
Excellent!
Yes; simple oversight.
Thank You.
Ric.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2008 10:01 AM
To: Lee, Frederick (Ric)
Cc: cocoa-dev@lists.apple.com
Subject: Re: XCode 3.1 compiler doesn't like CFDataRef bridge to (NSData
*) object.


On 13 Nov 2008, at 16:54, Lee, Frederick (Ric) wrote:

>
>
>CFDataRef faxMsgData = (NSData *)[[self.faxHistoryItemDict
> objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding];


Shouldn't that be :

CFDataRef faxMsgData = (CFDataRef)[[self.faxHistoryItemDict
objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding];

Matt
___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Jean-Nicolas Jolivet
Correct me if I'm wrong though, but I read that it wasn't a problem  
anymore in 10.5... can anyone confirm that??


Jean-Nicolas Jolivet

On 13-Nov-08, at 6:27 AM, Uli Kusterer wrote:


On 13.11.2008, at 07:17, Jean-Nicolas Jolivet wrote:
Any particular reasons why my label will always show up behind my  
tableview no matter what I do??



The drawing order of sibling views in AppKit was never guaranteed to  
be well-defined. In plain English that means the only drawing order  
you can rely on is that subviews will be drawn after their  
superview. I think you can turn on Layer-backed views to make this  
behaviour more predictable, but that's a bit fiddly, too.


So, no, it's not an IB bug, it's simply a documented inability of  
AppKit. Don't ask me why it isn't supported. Even Carbon does that,  
and it's very easy to do this with good performance. Heck, I  
implemented speedy and correct overlapping with transparency back in  
the System 8 days for MacZoop, and I was just starting out as a  
programmer...


Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.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 [EMAIL PROTECTED]


Re: NSImage in NSAttributedString

2008-11-13 Thread Alexander Spohr

Timothy,

how about a nice category?

atze


Am 12.11.2008 um 12:34 schrieb Timothy Larkin:

I am building an attributed string for display in a NSTextView.  I  
can include an image in the string by attaching a file wrapper. But  
what if I have just an NSImage? I know that an image from the  
clipboard can be inserted in a text view. But how can I do this  
programatically? Is there a better way than writing the image to a  
temporary file and then using that file wrapper?



@implementation NSTextAttachment (Freeport)

- (id)initWithImage:(NSImage *)anImage
{
if([super init])
{
		NSTextAttachmentCell *anAttachmentCell = [[NSTextAttachmentCell  
alloc] initImageCell:anImage];

[self setAttachmentCell:anAttachmentCell];
[anAttachmentCell release];
return self;
}
return nil;
}

@end

___

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 [EMAIL PROTECTED]


Token in NSAttributedString | was: NSImage in NSAttributedString

2008-11-13 Thread Alexander Spohr
I would like to display tokens with a blue rounded background, like  
NSTokenField does, in an NSAttributedString.
The easiest way seems to use NSTextAttachment but it does not feel  
right.


Is there a better way?

atze


___

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 [EMAIL PROTECTED]


Re: Core Data + Unidirectional Relationships

2008-11-13 Thread Alexander Spohr


Am 12.11.2008 um 14:38 schrieb John Pannell:

The station has a to-many "ports" relationship with a cascade delete  
rule, and the port has a to-one "station" relationship with a  
cascade delete rule - these are inverses on one another.  So now, if  
I delete a station, all of its ports will also be deleted from the  
object graph.  Deleting a port, on the other hand, will remove it  
from the ports relationship on the station, but leave the station  
otherwise intact.


This can not be if „port has a to-one "station" relationship with a  
cascade delete rule“. This should be nullify.



My trouble comes in relating the ports and the pipes.  I'd like to  
model the pipe by having a to-one "sourcePort" relationship (to  
represent the port at the start of the tunnel - note: all of my  
tunnels are one-way) and a to-one "targetPort" relationship to  
represent the port at the end of the tunnel.


Sounds right if each pipe is unidirectional.

A port would have a to-many relationship with pipe as the target  
entity.  The difficulty comes in specifying an inverse... for the  
port's "pipes" relationship, I'm forced to choose from either the  
sourcePort or the targetPort as the inverse, and for the pipe's  
sourcePort or targetPort relationships, setting either to port's  
"pipes" breaks the inverse setting of the other.


Ports don’t have only one pipe-relationship. Each port has two:  
sourcePipes and destinationPipes. This has to be as your ports have to  
know if a pipe comes or goes.


atze


___

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 [EMAIL PROTECTED]


NSConnection/NSMachPort and CPU Loads.

2008-11-13 Thread Robert Monaghan

Hi Everyone..

I have a Daemon communicating with an application using NSConnection/ 
NSMachPort. It appears that they loose communication somehow, under  
extremely heavy CPU loads on the System. Has anyone heard of this, or  
experienced it? I am trying to duplicate what my customer is seeing.  
So far without luck. I just wanted to ping this list, just in case I  
am barking up the wrong tree.


Thanks!

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 [EMAIL PROTECTED]


NSTableView Issue

2008-11-13 Thread Chris

Hello,

This is an issue I've been stuck on for a while, I'm trying to load an  
instance of NSHTTPCookieStorage into a table view.  I have it far  
enough so that when I build the app and load it, it displays this http://i38.tinypic.com/315en3c.png 
.  However when I attempt to scroll up or down, the app does nothing  
and I receive these error message in the console:


*** -[NSCFArray objectAtIndex:]: index (2) beyond bounds (2)

and

[ valueForUndefinedKey:]: this class is not key  
value coding-compliant for the key name.


Here are my two table methods for reference:

- (int)numberOfRowsInTableView:(NSTableView *)tableView
{
return ([cookies count]);
}

- (id)tableView:(NSTableView *)tableView
objectValueForTableColumn:(NSTableColumn *)tableColumn
row:(int)row
{

NSHTTPCookie *cookie = [cookies objectAtIndex: row];
NSString *identifier = [tableColumn identifier];
return [cookie valueForKey: identifier];
}


Thank you, any guidance would be appreciated!

--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 [EMAIL PROTECTED]


Re: MyDocument's Window Outlet...

2008-11-13 Thread Alexander Spohr


Am 12.11.2008 um 19:22 schrieb Jean-Nicolas Jolivet:

[window setToolbar:]  for example gives me an error saying that  
"window" wasn't declared


try [[self window] setToolBar:]


If I try to declare a "window" outlet in my code and try to connect  
it in IB, I end up with 2 outlets named "window"...


You don’t want that :)

Of course the easy work around was to declare a new outlet that I  
named "mainWindow" and connected to my file owner, that way I can  
access the main window from my code...


Don’t fight the framework. If you think it feels wrong, it is.

but still I was wondering why it is not possible to access the  
"window" outlet that is created automatically with every new  
"Document Based" project...? What's the use of this outlet if I  
can't access it in my code?


An outlet can be an ivar. But his might be private to your superclass.
Always use [self ivar] to access them as someday someone might  
override the method.

In your example you could use
NSWindow *aWindow = [self window]
if you want to do use the window more than one line of code.

atze

___

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 [EMAIL PROTECTED]


Re: JPEG compression in TIFF files. NSTIFFCompressionJPEG

2008-11-13 Thread Heinrich Giesen


On 13.11.2008, at 00:34, Alexander Shmelev wrote:


Our customer asks us to save images in TIFF files with JPEG
compression. But in NSImage documentation is written that JPEG
compression is no longer supported. Why Apple decided to stop support
JPEG compression in NSImage class?



The difficulties with JPEG-compression in TIFF-files reach back to  
1995. In that year a
draft  from  
the TIFF-people (formerly Aldus, now Adobe)
was published and give a deep look into these difficulties. One of  
the first sentences is:


... TIFF writers are strongly discouraged from using the 6.0 JPEG  
design



In another document 

search for a statement by Tom Lane (the jpeg guru) where he explains :

TIFF 6.0 added JPEG to the list of TIFF compression schemes.  
Unfortunately, the approach taken in the 6.0 specification is a  
very poor design. A new design has been developed by the TIFF  
Advisory Committee. If you are considering implementing JPEG in  
TIFF, I strongly urge you to follow the revised design described in  
TIFF Tech Note #2 rather than that of the 6.0 spec.




Meanwhile some fixes have been made. But we still have TIFF 6.0 and  
maybe the long expected
TIFF 7.0 will never come. The Adobe - TIFF story has never been a  
love story.


To directly use the current TIFF library tiff-3.8.2 may help if  
really needed.


Heinrich

--
Heinrich Giesen
[EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Re: NSTableView Issue

2008-11-13 Thread I. Savant
On Thu, Nov 13, 2008 at 3:14 AM, Chris <[EMAIL PROTECTED]> wrote:
> This is an issue I've been stuck on for a while, I'm trying to load an
> instance of NSHTTPCookieStorage into a table view.  I have it far enough so
> that when I build the app and load it, it displays this
> http://i38.tinypic.com/315en3c.png.  However when I attempt to scroll up or
> down, the app does nothing and I receive these error message in the console:
>
> *** -[NSCFArray objectAtIndex:]: index (2) beyond bounds (2)

  Hard to say without some basic debugging information. Is "cookies"
being mutated by another thread? Is "cookies" being properly retained?
What do you see if you break on your "NSHTTPCookie *cookie = [cookies
objectAtIndex: row];" line and examine the "cookies" array each time?

--
I.S.
___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Michael Ash
On Thu, Nov 13, 2008 at 11:13 AM, Jean-Nicolas Jolivet
<[EMAIL PROTECTED]> wrote:
> Correct me if I'm wrong though, but I read that it wasn't a problem anymore
> in 10.5... can anyone confirm that??

Yes, on 10.5 AppKit allows and guarantees the correct behavior of
overlapping sibling views. I'm not sure where to find the Official
Word of this, but it's been mentioned on this list by AppKit engineers
more than once. The old wisdom that this is Not Allowed is no longer
valid if you're targeting 10.5+.

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 [EMAIL PROTECTED]


Does HELP cache source location?

2008-11-13 Thread David
I'm getting really wierd results that make me think the Help system is
caching its source location somewhere. I changed the URL used in Help
Indexer for a network location for help. Sometimes the changes seems
to take effect and often it doesn't. Is it stored in preferences? Does
Help remember across invocations of an application?

I'm originally had http://foo/help. No complaints, but it didn't read anything.
Then switched to using http://foo/help/1.0

I uploaded my content. Now it complains that it can't find,
http://foo/help/1.0index.html. What happened to the directory
delimiter between 1.0 and index.html?

So I added a / at the end of the root URL, http://foo/help/1.0/
No change, same error.

I changed it to http://foo/help1.0/ and I still got an error about
http://foo/help/1.0index.html even though that wasn't the path
anymore.

Now I'm getting weird results where sometimes it complains, and
sometimes it shows the local page.

I need more clarity on what the help system is doing. This black box
magic stuff is ok if it works, but when it doesn't its a HUGE waste of
time.

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 [EMAIL PROTECTED]


geting the folders contents via http

2008-11-13 Thread Valentin Dan
Hi,

 

Is there a way to get the files in a folder like:
"http://mysite.com/myfolder/"; ?

 

I have a bunch of pictures there and I want to go through them, select
one and put it's content in a NSTableView's cell.

 

I'd like to get their path in some sort of list ... something like a
NSArray with strings like "http://mysite.com/myfolder/pic1.jpg";,
"http://mysite.com/myfolder/pic2.jpg";, ...

 

 

Thanks.

 

___

Valentin Dan, Software Engineer Direct: +1 905 886 1833
ext.3047   

Email: [EMAIL PROTECTED] Office: +40 356-710158

Masstech Group Inc.  Fax:+40 256-220912

http://www.masstechgroup.com   

 

THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE. IT MAY CONTAIN
PRIVILEGED OR CONFIDENTIAL INFORMATION.ANY UNAUTHORIZED DISCLOSURE IS
STRICTLY PROHIBITED.IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE
NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT THE RECORDS. PLEASE THEN
DELETE THE ORIGINAL MESSAGE. 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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Shawn Erickson
On Thu, Nov 13, 2008 at 8:54 AM, Michael Ash <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 13, 2008 at 11:13 AM, Jean-Nicolas Jolivet
> <[EMAIL PROTECTED]> wrote:
>> Correct me if I'm wrong though, but I read that it wasn't a problem anymore
>> in 10.5... can anyone confirm that??
>
> Yes, on 10.5 AppKit allows and guarantees the correct behavior of
> overlapping sibling views. I'm not sure where to find the Official
> Word of this, but it's been mentioned on this list by AppKit engineers
> more than once. The old wisdom that this is Not Allowed is no longer
> valid if you're targeting 10.5+.

I believe this guarantee really only applies when using layered back
views. The documentation still currently states the following.

"Note: For performance reasons, Cocoa does not enforce clipping among
sibling views or guarantee correct invalidation and drawing behavior
when sibling views overlap. If you want a view to be drawn in front of
another view, you should make the front view a subview (or descendant)
of the rear view."

I an fairly sure I have seen issues even when compiled against the
10.5 SDK (however it may be a side effect of IB mishandling ordering).
Also IIRC ibtool sill produces warnings about overlapping sub-views
even when you set the xib for 10.5 compatibility.

I believe you should still use nesting (view hierarchy) when you want
to ensure proper ordering.

-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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Michael Ash
On Thu, Nov 13, 2008 at 12:11 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 13, 2008 at 8:54 AM, Michael Ash <[EMAIL PROTECTED]> wrote:
>> On Thu, Nov 13, 2008 at 11:13 AM, Jean-Nicolas Jolivet
>> <[EMAIL PROTECTED]> wrote:
>>> Correct me if I'm wrong though, but I read that it wasn't a problem anymore
>>> in 10.5... can anyone confirm that??
>>
>> Yes, on 10.5 AppKit allows and guarantees the correct behavior of
>> overlapping sibling views. I'm not sure where to find the Official
>> Word of this, but it's been mentioned on this list by AppKit engineers
>> more than once. The old wisdom that this is Not Allowed is no longer
>> valid if you're targeting 10.5+.
>
> I believe this guarantee really only applies when using layered back
> views. The documentation still currently states the following.
>
> "Note: For performance reasons, Cocoa does not enforce clipping among
> sibling views or guarantee correct invalidation and drawing behavior
> when sibling views overlap. If you want a view to be drawn in front of
> another view, you should make the front view a subview (or descendant)
> of the rear view."
>
> I an fairly sure I have seen issues even when compiled against the
> 10.5 SDK (however it may be a side effect of IB mishandling ordering).
> Also IIRC ibtool sill produces warnings about overlapping sub-views
> even when you set the xib for 10.5 compatibility.
>
> I believe you should still use nesting (view hierarchy) when you want
> to ensure proper ordering.

The documentation is busted. Here's a message from Corbin Dunn stating
that they work without layers:

http://www.cocoabuilder.com/archive/message/cocoa/2008/8/28/217039

And here's another one from Scott Anguish:

http://www.cocoabuilder.com/archive/message/cocoa/2007/11/23/193766

The documentation is wrong, but what else is new?

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 [EMAIL PROTECTED]


Re: geting the folders contents via http

2008-11-13 Thread Nick Zitzmann


On Nov 13, 2008, at 10:00 AM, Valentin Dan wrote:


Is there a way to get the files in a folder like:
"http://mysite.com/myfolder/"; ?



Not with any of the built-in classes. If mysite.com supports WebDAV  
(e.g. iDisk), then you could use a third-party framework like  
ConnectionKit to get a listing.


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 [EMAIL PROTECTED]


RE: Validating a non-optional transient Core Data property - it can be erased?!

2008-11-13 Thread Arthur C .





>From: [EMAIL PROTECTED]>To: cocoa-dev@lists.apple.com>Subject: Validating a 
>non-optional transient Core Data property - it can be erased?!>Date: Wed, 12 
>Nov 2008 22:31:02 +0100>

>In my Core Data database I have a property called 'target' (double), which is 
>transient and required (i.e. 'non-optional' in the model). It is dependent on 
>>another variable 'color'; so for each color there is a 'target'. As I want to 
>show only the target for the selected color, I use this transient variable. It 
>is >used as well to set a new target (from the table view) for the selected 
>color.> >In the model I have imposed a minimum, maximum and default value for 
>'target', and the table column is set to validate immediately. This works 
>correctly. >However, the feedback in the validation sheet is rather minimal. 
>>So, first question: how can I change the validation message, to include e.g. 
>required range etc.?> >Another thing is, I have found that I can erase the 
>value in the table view, without a validation error getting triggered! A 
>nil-value is not acceptable. The >easiest solution I've found is just to make 
>it persistent (non-transient). But I think 'non-optional' should mean 
>'required', meaning the value should never be >nil... especially since I gave 
>a min, max and default value.>Is there a better way to do this while keeping 
>the variable transient?> 
> (Pay careful attention to what  > it says about validation *instead of* 
> versus validation *as well as*  > Core Data's other validation mechanisms.)
Yes, I have found that I should not do it both. That is, if I check also in 
code on maximum/minimum, an error message 'multiple validation errors' will 
come up. 
 
>There's also a way of localizing the built-in error messages, which  >may be 
>another solution to your first question if you just want to  >vary the wording 
>a bit:>>   
>http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOM.html#/
> /apple_ref/doc/uid/TP40005190-SW13 
 
Well, that turns out to be complicated... I have to retrieve the validation 
predicates for max, min from the model:
 
 NSEntityDescription * recipeEntity = [NSEntityDescription entityForName: 
@"Recipe" inManagedObjectContext: [[NSApp delegate] managedObjectContext]];  
NSAttributeDescription * targetDescription = [[recipeEntity propertiesByName] 
valueForKey: @"target"]; NSArray * validationPredicates = [targetDescription 
validationPredicates];
after which the predicates need to be parsed in order to find which is the max 
/ min predicate. Then, the custom error message has to be fed to the managed 
object model's localizationDictionary, which I don't fully understand... The 
following code does not work:
 
 NSManagedObjectModel * model = [[NSApp delegate] managedObjectModel]; 
NSMutableDictionary * localizedDict = [NSMutableDictionary dictionary];
 for (unsigned int i = 0; i < [validationPredicates count]; i++) {  
NSComparisonPredicate * predicate = [validationPredicates objectAtIndex: i];  
NSString * description = [predicate description];  double value = [[[predicate 
rightExpression] constantValue] doubleValue];if ( [description hasPrefix: 
@"SELF >"] )  {   minimumTarget = value;   id validationWarning = 
[[targetDescription validationWarnings] objectAtIndex: i];   [localizedDict 
setValue: @"Test string 123" forKey: [NSString stringWithFormat: 
@"ErrorString/%@", validationWarning]];   [model setLocalizationDictionary: 
localizedDict]; } 
 }
 
Any ideas on how this can be done in a *simpler* way?
 
 
Thanks so far,
Arthur
 
 
 
> >Thanks in advance,>Arthur



Express yourself instantly with MSN Messenger! MSN Messenger
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Shawn Erickson
On Thu, Nov 13, 2008 at 9:13 AM, Michael Ash <[EMAIL PROTECTED]> wrote:

> The documentation is busted. Here's a message from Corbin Dunn stating
> that they work without layers:

Also note Jamie's email about it having issues even 10.5. I am still
not sure it works fully as intended (don't have time at the moment to
find the tool I built that was having problems still) and obviously IB
and ibtool aren't up-to-speed on this front if it is fully supported
now.

-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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Jean-Nicolas Jolivet

That was going to be my next point

Assuming it has been fixed in Leopard, it is therefore really an IB  
Bug as I suspected at first??


Anyway, Re-ordering my controls programatically did the trick...  
however, should I assume that it might not work on Tiger since  
overlapping view's behavior is unpredictable in 10.4??


-Jean-Nicolas

On 13-Nov-08, at 12:18 PM, Shawn Erickson wrote:

On Thu, Nov 13, 2008 at 9:13 AM, Michael Ash <[EMAIL PROTECTED]>  
wrote:


The documentation is busted. Here's a message from Corbin Dunn  
stating

that they work without layers:


Also note Jamie's email about it having issues even 10.5. I am still
not sure it works fully as intended (don't have time at the moment to
find the tool I built that was having problems still) and obviously IB
and ibtool aren't up-to-speed on this front if it is fully supported
now.

-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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Re: core data + bindings + custom view ?

2008-11-13 Thread Quincey Morris

On Nov 13, 2008, at 07:10, [EMAIL PROTECTED] wrote:

I have an NSControl subclass that maintains a list of cells, and an  
NSMutableArray called "content". I have
successfully bound its "content" to the core data based array  
controller's "arrangedObjects" array. I thought that was all I  
needed to do to get bindings working, so I made my  setContent:  
accessor method so that it kept my cell list updated with the  
content list... this did not work.  my setContent accessor was  
called once, during the initialization phase of the app.


I'm not sure what you're saying here, but if you're saying you added a  
"content" property (getter and setter) to your control, then  
programatically used [NSObject bind:toObject:withKeyPath:options:] to  
"bind" the property to an array, then it won't work because that's not  
what bindings are. I won't go into the gory details because this has  
been discussed at length on this list in the last month or so, but the  
short version is that a binding has to be implemented with a lot of  
fiddly code before it can actually be used, and a binding name is NOT  
a property name (though it kinda sorta partially seems to work if you  
mix them up).


It's not usually worth the trouble. It's easier just to use KVO  
notifications directly.


next, I tried registering for KVO on the array controller's  
"arrangedObjects" value, thinking that... since it is an array, it  
IS a "to many" relationship, and I would not only get alerts to  
changes to the array, but also information about the changes, in the  
change dictionary under the "NSKeyValueChangeKindKey" key.  This  
sort of worked. I get a notification when the ArrangedObjects is  
altered, but the information about the change is NOT in evidence.  
Apparently, this is not a "to many" relationship after all?   
(ummm... what??!!?!?  is this true?)


Nope, it's a long-standing bug in NSArrayController. This is also  
often discussed on this list, most recently a couple of days ago.


And isn't this KVO a little redundant anyway? doesn't bindings do  
this already?


The bindings mechanism is built on top of KVO, not the other way around.

isn't there some way for me to automatically get notified BECAUSE  
"content" is bound to the array controller? (which is what I was  
trying to do with the setContent: method)


You *are* getting notified, you said, but just not getting the correct  
change information.


currently, I am thinking that I will have to discover the changes  
myself, by comparing my content against my cells. it seems a bit  
redundant (read: wasteful), but that seems to be the order of the  
day... do everything twice.


That, or observe the underlying array (NSArrayController's  
contentArray) instead of arrangedObjects, or find a way of doing what  
you need without knowing what changed, or ...


so in all of this, i am frantically looking for ANY documentation  
that explains how to duplicate any part of something I see and use  
every day... namely the smooth interaction between a custom UI  
element (that works SORT of like a tableview, in that it displays a  
list of things) and an array controller that happens to use core  
data for its content.  The official apple docs, are... anemic at  
best, and my google searches have come up empty.


Yup, it's very annoying, because you are trying to do the right thing.  
Time for Plan B.



___

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 [EMAIL PROTECTED]


Re: Validating a non-optional transient Core Data property - it can be erased?!

2008-11-13 Thread Quincey Morris

On Nov 13, 2008, at 09:17, Arthur C. wrote:

There's also a way of localizing the built-in error messages,  
which  >may be another solution to your first question if you just  
want to  >vary the wording a bit:>>   http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOM.html#/ 
 /apple_ref/doc/uid/TP40005190-SW13


Well, that turns out to be complicated... I have to retrieve the  
validation predicates for max, min from the model:


...

Any ideas on how this can be done in a *simpler* way?


Personally, I go with writing a 'validateTarget' method and do all the  
validations there. The documentation implied you don't need to call  
the built-in property-level validation if you don't need it, but if  
I'm wrong about that then I'd just remove the validation constraints  
from the entity in the model.





___

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 [EMAIL PROTECTED]


EXC_BAD_ACCESS with 10.5.5 AppKit on some MacPros

2008-11-13 Thread Robert Monaghan

Hi Everyone..

I have a really weird problem with my basic application.
From time to time, on only a very few machines, (running 10.5.5), my  
application crashes when a user clicks on a button. It reports a  
EXC_BAD_ACCESS. Here is the crash report:


Code Type:   X86 (Native)
Parent Process:  launchd [71]

Date/Time:   2008-11-12 15:47:47.776 +0100
OS Version:  Mac OS X 10.5.5 (9F33)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x
Crashed Thread:  0

Thread 0 Crashed:
0   ...gluetools.GlueTools_KeyUtil  0x00031b9a oefst23_ + 4
1   com.apple.AppKit  	0x9593fb03 -[NSApplication  
sendAction:to:from:] + 112
2   com.apple.AppKit  	0x9593fa40 -[NSControl  
sendAction:to:] + 108
3   com.apple.AppKit  	0x9593f8c6 -[NSCell  
_sendActionFrom:] + 169
4   com.apple.AppKit  	0x9593ef1f -[NSCell  
trackMouse:inRect:ofView:untilMouseUp:] + 1827
5   com.apple.AppKit  	0x9593e772 -[NSButtonCell  
trackMouse:inRect:ofView:untilMouseUp:] + 541
6   com.apple.AppKit  	0x9593e02c -[NSControl mouseDown:]  
+ 888
7   com.apple.AppKit  	0x9593c76b -[NSWindow sendEvent:] +  
5381
8   com.apple.AppKit  	0x95909311 -[NSApplication  
sendEvent:] + 2941

9   com.apple.AppKit0x95866d0f -[NSApplication run] + 847
10  com.apple.AppKit0x95833f14 NSApplicationMain + 574
11  ...gluetools.GlueTools_KeyUtil  0x2ab8 main + 30
12  ...gluetools.GlueTools_KeyUtil  0x2a7e _start + 216
13  ...gluetools.GlueTools_KeyUtil  0x29a5 start + 41


This crash isn't happening with any of my code. It seems to be  
crashing when referring to something in my Object. The weird part is,  
is that I am not releasing anything that the UI would be concerned  
with. The button in question is connected to an IBAction. Nothing fancy.


Ideas??

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Andrew Merenbach
Hi.  This is correct, as prior to 10.5, clipping among overlapping  
views was not enforced, and your program's functionality could very  
well be unpredictable.


Best,
Andrew

On Nov 13, 2008, at 9:31 AM, Jean-Nicolas Jolivet wrote:


That was going to be my next point

Assuming it has been fixed in Leopard, it is therefore really an IB  
Bug as I suspected at first??


Anyway, Re-ordering my controls programatically did the trick...  
however, should I assume that it might not work on Tiger since  
overlapping view's behavior is unpredictable in 10.4??


-Jean-Nicolas

On 13-Nov-08, at 12:18 PM, Shawn Erickson wrote:

On Thu, Nov 13, 2008 at 9:13 AM, Michael Ash  
<[EMAIL PROTECTED]> wrote:


The documentation is busted. Here's a message from Corbin Dunn  
stating

that they work without layers:


Also note Jamie's email about it having issues even 10.5. I am still
not sure it works fully as intended (don't have time at the moment to
find the tool I built that was having problems still) and obviously  
IB

and ibtool aren't up-to-speed on this front if it is fully supported
now.

-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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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/andrew.merenbach%40ucla.edu

This email sent to [EMAIL PROTECTED]




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 [EMAIL PROTECTED]

Re: geting the folders contents via http

2008-11-13 Thread Jean-Daniel Dupas


Le 13 nov. 08 à 18:00, Valentin Dan a écrit :


Hi,



Is there a way to get the files in a folder like:
"http://mysite.com/myfolder/"; ?



I have a bunch of pictures there and I want to go through them, select
one and put it's content in a NSTableView's cell.




If your server allows "directory content listing" (it show you a page  
with the content of the folder when you type the folder adress in a  
browser), you can use webkit to retreive the page, and then extract  
links from the page DOM.



___

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 [EMAIL PROTECTED]


Re: NSConnection/NSMachPort and CPU Loads.

2008-11-13 Thread Dave Cox
I have a Daemon communicating with an application using NSConnection/ 
NSMachPort. It appears that they loose communication somehow, under  
extremely heavy CPU loads on the System.


What happens that leads you to that conclusion?

Over the past few days I have been documenting (on this list) problems I've been
seeing with Distributed Objects, and there's more to come, but whenever my
processes lose communication, there's an associated exception, error signal,
or warning written to the console:

http://lists.apple.com/archives/cocoa-dev/2008/Nov/msg00771.html

or at the very least, an unexpected return value:

http://lists.apple.com/archives/cocoa-dev/2008/Nov/msg00601.html

Dave


___

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 [EMAIL PROTECTED]


Re: EXC_BAD_ACCESS with 10.5.5 AppKit on some MacPros

2008-11-13 Thread Shawn Erickson
On Thu, Nov 13, 2008 at 9:46 AM, Robert Monaghan <[EMAIL PROTECTED]> wrote:
> Hi Everyone..
>
> I have a really weird problem with my basic application.
> From time to time, on only a very few machines, (running 10.5.5), my
> application crashes when a user clicks on a button. It reports a
> EXC_BAD_ACCESS. Here is the crash report:
>
> Code Type:   X86 (Native)
> Parent Process:  launchd [71]
>
> Date/Time:   2008-11-12 15:47:47.776 +0100
> OS Version:  Mac OS X 10.5.5 (9F33)
> Report Version:  6
>
> Exception Type:  EXC_BAD_ACCESS (SIGBUS)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x
> Crashed Thread:  0
>
> Thread 0 Crashed:
> 0   ...gluetools.GlueTools_KeyUtil  0x00031b9a oefst23_ + 4
> 1   com.apple.AppKit0x9593fb03 -[NSApplication
> sendAction:to:from:] + 112
>
> Ideas??

It looks like it is crashing in your code not in AppKit code (the
backtrace may be a little confused if a tail-call optimization is
taking place). It appears that something is attempting to access a
NULL pointer in your code.

Use atos and/or gdb to understand what is going on at/around 0x0031b9a
in your application (you hopefully have a symboled version of what you
shipped to customers).

Review the following for information on how to work with a crash report log...

http://developer.apple.com/technotes/tn2004/tn2123.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 [EMAIL PROTECTED]


Creating directory at path, recursively

2008-11-13 Thread Jean-Nicolas Jolivet
I know there's a method to do just that in Leopard, however I want my  
app to work on Tiger too, therefore I'm trying to put together a  
simple "createDirectoryRecursivelyAtPath" method, however for some  
reason it doesn't seem to work


Here's a simplified version of my method:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
	if ([fileManager fileExistsAtPath:directoryAbove isDirectory:&isDir]  
&& isDir)

{
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil];
}
else
{
// call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
}
}

Am I missing something? If I'm trying to create for example: /a/b/c  
(and none of them exists) only /a  is created...


Jean-Nicolas Jolivet
___

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 [EMAIL PROTECTED]


Re: NSConnection/NSMachPort and CPU Loads.

2008-11-13 Thread Robert Monaghan

Here is what my user reports:
- Under extremely heavy CPU Loads, my software app, and the daemon  
looses its connection. The user is rendering a lot of imagery on the  
same machine. I am assuming that the CPUs are being maxed out with a  
lot of threads tying up the machine.


- Just about every user out there with moderate CPU usage appears to  
be fine.


bob.

On Nov 13, 2008, at 9:55 AM, Dave Cox wrote:

I have a Daemon communicating with an application using  
NSConnection/ NSMachPort. It appears that they loose communication  
somehow, under  extremely heavy CPU loads on the System.


What happens that leads you to that conclusion?

Over the past few days I have been documenting (on this list)  
problems I've been
seeing with Distributed Objects, and there's more to come, but  
whenever my
processes lose communication, there's an associated exception, error  
signal,

or warning written to the console:

   http://lists.apple.com/archives/cocoa-dev/2008/Nov/msg00771.html

or at the very least, an unexpected return value:

   http://lists.apple.com/archives/cocoa-dev/2008/Nov/msg00601.html

Dave


___

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/bob%40gluetools.com

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


RE: Creating directory at path, recursively

2008-11-13 Thread Etienne Guérard
You might want to do it this way:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
if (![fileManager fileExistsAtPath:directoryAbove isDirectory:&isDir]  
&& isDir)
{
 // call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
}
// Now we enforced that the dir exist
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil]; 
}

EG

-Original Message-
Here's a simplified version of my method:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
if ([fileManager fileExistsAtPath:directoryAbove isDirectory:&isDir]  
&& isDir)
{
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil];
}
else
{
 // call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
 }
}

Am I missing something? If I'm trying to create for example: /a/b/c  
(and none of them exists) only /a  is created...


This message and any attachments (the "message") are confidential and intended 
solely for the addressee(s). Any unauthorised use or dissemination is 
prohibited. E-mails are susceptible to alteration. Neither DxO Labs nor any of 
its subsidiaries or affiliates shall be liable for the message if altered, 
changed or falsified.
Ce message et toutes les pieces jointes (ci-apres le "message") sont 
confidentiels et etablis a l'intention exclusive de ses destinataires. Toute 
utilisation ou diffusion non autorisee est interdite. Tout message electronique 
est susceptible d'alteration. DxO Labs et ses filiales declinent toute 
responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie.

___

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 [EMAIL PROTECTED]


Re: NSConnection/NSMachPort and CPU Loads.

2008-11-13 Thread Shawn Erickson
On Thu, Nov 13, 2008 at 10:03 AM, Robert Monaghan <[EMAIL PROTECTED]> wrote:
> Here is what my user reports:
> - Under extremely heavy CPU Loads, my software app, and the daemon looses
> its connection. The user is rendering a lot of imagery on the same machine.
> I am assuming that the CPUs are being maxed out with a lot of threads tying
> up the machine.
>
> - Just about every user out there with moderate CPU usage appears to be
> fine.

Do you happen to listen for NSConnectionDidDieNotification? If so is
that notification coming in? I am curious if things are detecting some
type of connection death or if this failure is silent.

-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 [EMAIL PROTECTED]


Re: Does HELP cache source location?

2008-11-13 Thread David
I've removed all references to http://foo/help/1.0 and still it
complains that the url can't be found.

Where is it getting this URL from? I've erased my application's
preferences plist. I've rebooted the whole machine. I've scanned my
project directory for this string even in binary files. I've checked
the helpindex file.

IT IS NOT THERE.

Where is it coming from? Where does Mac help pick this stuff up from?

The "Apple Help Programming Guide" says that help will show up in the
"Library" menu. Library menu of what application? I don't see a
library menu and I don't see it show up.

I'm running Leopard.

On Thu, Nov 13, 2008 at 12:00 PM, David <[EMAIL PROTECTED]> wrote:
> I'm getting really wierd results that make me think the Help system is
> caching its source location somewhere. I changed the URL used in Help
> Indexer for a network location for help. Sometimes the changes seems
> to take effect and often it doesn't. Is it stored in preferences? Does
> Help remember across invocations of an application?
>
> I'm originally had http://foo/help. No complaints, but it didn't read 
> anything.
> Then switched to using http://foo/help/1.0
>
> I uploaded my content. Now it complains that it can't find,
> http://foo/help/1.0index.html. What happened to the directory
> delimiter between 1.0 and index.html?
>
> So I added a / at the end of the root URL, http://foo/help/1.0/
> No change, same error.
>
> I changed it to http://foo/help1.0/ and I still got an error about
> http://foo/help/1.0index.html even though that wasn't the path
> anymore.
>
> Now I'm getting weird results where sometimes it complains, and
> sometimes it shows the local page.
>
> I need more clarity on what the help system is doing. This black box
> magic stuff is ok if it works, but when it doesn't its a HUGE waste of
> time.
>
> 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 [EMAIL PROTECTED]


Re: Creating directory at path, recursively

2008-11-13 Thread Quincey Morris

On Nov 13, 2008, at 10:11, Etienne Guérard wrote:


You might want to do it this way:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
if (![fileManager fileExistsAtPath:directoryAbove isDirectory:&isDir]
&& isDir)
{
// call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
}
// Now we enforced that the dir exist
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil];
}


Or even this way: [[NSFileManager defaultManger]  
createDirectoryAtPath: path withIntermediateDirectories: YES  
attributes: nil error: &error]?



___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Jonathan Hess
There is a bug that causes "custom views", the blue ones, to reverse  
the z-order of their subviews when decoded. You can workaround this by  
re-ordering the subviews in awakeFromNib, or, you can use an instance  
of NSView instead of "custom view".


To create an instance of NSView instead of "custom view", you can  
create a window, select the content view in the outline view, copy it,  
and paste it back into the top level of your document. After copying  
and pasting it to the top level of your document, you might consider  
dragging it back to the library for later reuse.


Good Luck -
Jon Hess


On Nov 13, 2008, at 9:31 AM, Jean-Nicolas Jolivet wrote:


That was going to be my next point

Assuming it has been fixed in Leopard, it is therefore really an IB  
Bug as I suspected at first??


Anyway, Re-ordering my controls programatically did the trick...  
however, should I assume that it might not work on Tiger since  
overlapping view's behavior is unpredictable in 10.4??


-Jean-Nicolas

On 13-Nov-08, at 12:18 PM, Shawn Erickson wrote:

On Thu, Nov 13, 2008 at 9:13 AM, Michael Ash  
<[EMAIL PROTECTED]> wrote:


The documentation is busted. Here's a message from Corbin Dunn  
stating

that they work without layers:


Also note Jamie's email about it having issues even 10.5. I am still
not sure it works fully as intended (don't have time at the moment to
find the tool I built that was having problems still) and obviously  
IB

and ibtool aren't up-to-speed on this front if it is fully supported
now.

-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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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/jhess%40apple.com

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Re: Creating directory at path, recursively

2008-11-13 Thread Jean-Nicolas Jolivet
This is exactly what I need, but it's only available on 10.5 or later,  
hence why I'm trying to put a simple equivalent together...


JNJ

On 13-Nov-08, at 1:21 PM, Quincey Morris wrote:


On Nov 13, 2008, at 10:11, Etienne Guérard wrote:


You might want to do it this way:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
	if (![fileManager fileExistsAtPath:directoryAbove  
isDirectory:&isDir]

&& isDir)
{
   // call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
}
// Now we enforced that the dir exist
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil];
}


Or even this way: [[NSFileManager defaultManger]  
createDirectoryAtPath: path withIntermediateDirectories: YES  
attributes: nil error: &error]?



___

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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Re: Creating directory at path, recursively

2008-11-13 Thread Sherm Pendley

On Nov 13, 2008, at 1:21 PM, Quincey Morris wrote:

Or even this way: [[NSFileManager defaultManger]  
createDirectoryAtPath: path withIntermediateDirectories: YES  
attributes: nil error: &error]?


That method is new in Leopard. Jean-Nicolas said he wants his app to  
work in Tiger as well.


sherm--

___

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 [EMAIL PROTECTED]


Re: Creating directory at path, recursively

2008-11-13 Thread Jean-Nicolas Jolivet
hehe, thanks this is working fine... I knew it was going to be  
something obvious! :)


Jean-Nicolas Jolivet


On 13-Nov-08, at 1:11 PM, Etienne Guérard wrote:


You might want to do it this way:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
if (![fileManager fileExistsAtPath:directoryAbove isDirectory:&isDir]
&& isDir)
{
// call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
}
// Now we enforced that the dir exist
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil];
}

EG

-Original Message-
Here's a simplified version of my method:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
if ([fileManager fileExistsAtPath:directoryAbove isDirectory:&isDir]
&& isDir)
{
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil];
}
else
{
// call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
}
}

Am I missing something? If I'm trying to create for example: /a/b/c
(and none of them exists) only /a  is created...


This message and any attachments (the "message") are confidential  
and intended solely for the addressee(s). Any unauthorised use or  
dissemination is prohibited. E-mails are susceptible to alteration.  
Neither DxO Labs nor any of its subsidiaries or affiliates shall be  
liable for the message if altered, changed or falsified.
Ce message et toutes les pieces jointes (ci-apres le "message") sont  
confidentiels et etablis a l'intention exclusive de ses  
destinataires. Toute utilisation ou diffusion non autorisee est  
interdite. Tout message electronique est susceptible d'alteration.  
DxO Labs et ses filiales declinent toute responsabilite au titre de  
ce message s'il a ete altere, modifie ou falsifie.




___

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 [EMAIL PROTECTED]


Re: Creating directory at path, recursively

2008-11-13 Thread Randall Meadows

On Nov 13, 2008, at 11:21 AM, Quincey Morris wrote:

On Nov 13, 2008, at 10:11, Etienne Guérard wrote:

You might want to do it this way:

- (void)createDirectoryRecursivelyAtPath:(NSString *)path
{
//check if the dir just above exists...
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir;
NSString *directoryAbove = [path stringByDeletingLastPathComponent];
	if (![fileManager fileExistsAtPath:directoryAbove  
isDirectory:&isDir]

&& isDir)
{
 // call ourself with the directory above...
[self createDirectoryRecursivelyAtPath:directoryAbove];
}
// Now we enforced that the dir exist
// Fine, create the dir...
[fileManager createDirectoryAtPath:path attributes:nil];
}


Or even this way: [[NSFileManager defaultManger]  
createDirectoryAtPath: path withIntermediateDirectories: YES  
attributes: nil error: &error]?


Except he mentioned he wants to target 10.4 with this 
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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Jean-Nicolas Jolivet

A that makes perfect sense! I was indeed using a custom view...

Thanks for the tip!

JNJ

On 13-Nov-08, at 1:25 PM, Jonathan Hess wrote:

There is a bug that causes "custom views", the blue ones, to reverse  
the z-order of their subviews when decoded. You can workaround this  
by re-ordering the subviews in awakeFromNib, or, you can use an  
instance of NSView instead of "custom view".


To create an instance of NSView instead of "custom view", you can  
create a window, select the content view in the outline view, copy  
it, and paste it back into the top level of your document. After  
copying and pasting it to the top level of your document, you might  
consider dragging it back to the library for later reuse.


Good Luck -
Jon Hess


On Nov 13, 2008, at 9:31 AM, Jean-Nicolas Jolivet wrote:


That was going to be my next point

Assuming it has been fixed in Leopard, it is therefore really an IB  
Bug as I suspected at first??


Anyway, Re-ordering my controls programatically did the trick...  
however, should I assume that it might not work on Tiger since  
overlapping view's behavior is unpredictable in 10.4??


-Jean-Nicolas

On 13-Nov-08, at 12:18 PM, Shawn Erickson wrote:

On Thu, Nov 13, 2008 at 9:13 AM, Michael Ash  
<[EMAIL PROTECTED]> wrote:


The documentation is busted. Here's a message from Corbin Dunn  
stating

that they work without layers:


Also note Jamie's email about it having issues even 10.5. I am still
not sure it works fully as intended (don't have time at the moment  
to
find the tool I built that was having problems still) and  
obviously IB

and ibtool aren't up-to-speed on this front if it is fully supported
now.

-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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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/jhess%40apple.com

This email sent to [EMAIL PROTECTED]


___

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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


[ANN] BWToolkit - Plugin for IB 3

2008-11-13 Thread Brandon Walkin

Hi all,

BWToolkit is a BSD licensed plugin for Interface Builder 3 that  
contains commonly used UI elements and other useful objects. These  
include a suite of transparent (HUD) controls, a selectable toolbar  
for "no code" preferences windows and tabbed sheets, button bars,  
textured bottom bars, a textured slider, a gradient token field, and  
much more.


You can read about it in more detail, watch screencasts, and download  
the plugin (along with the source) on my blog:

http://www.brandonwalkin.com/blog/2008/11/13/introducing-bwtoolkit/

Cheers,
Brandon
___

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 [EMAIL PROTECTED]


Re: CA: fillMode and rotation animation . . .

2008-11-13 Thread Scott Anguish

do you also tell it to not be deleted from the animation hierarchy?

make sure that removedOnCompletion is NO.

On 11-Nov-08, at 3:00 AM, Michael A. Crawford wrote:

I have a number of layers that use rotation animation about the Z- 
axis.  Whenever the animation(s) complete the layer returns to the  
original state (zero rotational offset).  I set the fillMode  
attribute to be kCAFillModeForwards in order to preserve the layer  
in its transformed state but this does not help.  I must not  
correctly understand how fillMode is to be used.  Anyone have a  
suggestion as to how I can achieve the desired result and have the  
result of the animation stick?


___

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 [EMAIL PROTECTED]


Mounting AFP Programatically.

2008-11-13 Thread Sandro Noel

Greetings.

I would like to mount the drives off a server programatically without  
having the window open itself when the drive is mounted.
I've tried a shell script, the drive does get mounted but it does not  
sow up on the desktop like it should.

I can see it in the finder tho.

can anyone point me towards the right framework ?

Thank you!
Sandro Noel.

___

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 [EMAIL PROTECTED]


[Job Posting] Cocoa Developer Job opening in Pune-India

2008-11-13 Thread chaitanya pandit

Macintosh software development position with a startup company:

Location: Pune (India)
Requirements:
- Bachelor's degree in Engineering
- Require knowledge of object-oriented design/programming principles
- Knowledge/exposure to Objective-C, Cocoa Framework and Xcode preferred
- Passion for the Apple/Macintosh platform highly advantageous

If this sounds like you, please contact off list with your resume at [EMAIL 
PROTECTED]

Thanks
Chaitanya
___

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 [EMAIL PROTECTED]


Re: Mounting AFP Programatically.

2008-11-13 Thread Kyle Sluder
On Thu, Nov 13, 2008 at 3:19 PM, Sandro Noel <[EMAIL PROTECTED]> wrote:
> I've tried a shell script, the drive does get mounted but it does not sow up
> on the desktop like it should.

Network drives don't appear on the desktop in Leopard.  Are you running Leopard?

--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 [EMAIL PROTECTED]


Re: Does HELP cache source location?

2008-11-13 Thread David
For the benefit of others who may run across this horrible Help design...

I was trying to create help for my application. Used Help Indexer to
give it a remote root url to use overriding local help.

When I first put in the URL, I did it in the form, http://foo/help/1.0

Little did I know that Help does a non-intelligent concatenation of
the URL with the path in the help. This results in the help viewer
looking for http://foo/help/1.0index.html.

Seems very simple right? Just add the / at the end. How hard could that be...

Well turns out that this value gets cached. I've wasted an entire day
because of a lack of transparency regarding what the help system does.

I have to scan the entire file system to figure out where this was
being stored. Turns out it was being cached in
~/Library/Caches/com.apple.helpui/

I erased the application's help cache directory and suddenly it FINALLY worked.

On Thu, Nov 13, 2008 at 12:00 PM, David <[EMAIL PROTECTED]> wrote:
> I'm getting really wierd results that make me think the Help system is
> caching its source location somewhere. I changed the URL used in Help
> Indexer for a network location for help. Sometimes the changes seems
> to take effect and often it doesn't. Is it stored in preferences? Does
> Help remember across invocations of an application?
>
> I'm originally had http://foo/help. No complaints, but it didn't read 
> anything.
> Then switched to using http://foo/help/1.0
>
> I uploaded my content. Now it complains that it can't find,
> http://foo/help/1.0index.html. What happened to the directory
> delimiter between 1.0 and index.html?
>
> So I added a / at the end of the root URL, http://foo/help/1.0/
> No change, same error.
>
> I changed it to http://foo/help1.0/ and I still got an error about
> http://foo/help/1.0index.html even though that wasn't the path
> anymore.
>
> Now I'm getting weird results where sometimes it complains, and
> sometimes it shows the local page.
>
> I need more clarity on what the help system is doing. This black box
> magic stuff is ok if it works, but when it doesn't its a HUGE waste of
> time.
>
> 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 [EMAIL PROTECTED]


NSColorWell opacity...

2008-11-13 Thread Jean-Nicolas Jolivet
I have an NSColorWell which I bound to an NSColor object of my  
controller, however for some reasons, the color well does not display  
an Opacity slider when used in the application... (It does display it  
if I change the color in IB though)...


Is there a way I can force the NSColorWell to display its opacity  
slider?


Jean-Nicolas Jolivet
___

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 [EMAIL PROTECTED]


Re: NSColorWell opacity...

2008-11-13 Thread Jean-Nicolas Jolivet

Somehow I was able to have the opacity displayed by using:

[NSColor setIgnoresAlpha:NO];

In my awakeFromNib...

However, I have no idea why/how it is working... is this setting  
global for the whole app?


JNJ

On 13-Nov-08, at 4:35 PM, Jean-Nicolas Jolivet wrote:

I have an NSColorWell which I bound to an NSColor object of my  
controller, however for some reasons, the color well does not  
display an Opacity slider when used in the application... (It does  
display it if I change the color in IB though)...


Is there a way I can force the NSColorWell to display its opacity  
slider?


Jean-Nicolas Jolivet
___

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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Re: NSColorWell opacity...

2008-11-13 Thread Jean-Daniel Dupas

Didn't you have the API reference in Xcode ?

+[NSColor setIgnoresAlpha:];

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html#/ 
/apple_ref/occ/clm/NSColor/setIgnoresAlpha:


If the application doesn't support alpha, no opacity slider is  
displayed in the color panel, and colors dragged in or pasted have  
their alpha values set to 1.0. Applications that need to import alpha  
can invoke this method with flag set to NO and explicitly make colors  
opaque in cases where it matters to them. Note that calling this with  
a value of YES overrides any value set with the NSColorPanel method  
setShowsAlpha:.



Le 13 nov. 08 à 22:41, Jean-Nicolas Jolivet a écrit :


Somehow I was able to have the opacity displayed by using:

[NSColor setIgnoresAlpha:NO];

In my awakeFromNib...

However, I have no idea why/how it is working... is this setting  
global for the whole app?


JNJ

On 13-Nov-08, at 4:35 PM, Jean-Nicolas Jolivet wrote:

I have an NSColorWell which I bound to an NSColor object of my  
controller, however for some reasons, the color well does not  
display an Opacity slider when used in the application... (It does  
display it if I change the color in IB though)...


Is there a way I can force the NSColorWell to display its opacity  
slider?


Jean-Nicolas Jolivet
___

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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


___

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/devlists%40shadowlab.org

This email sent to [EMAIL PROTECTED]



___

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 [EMAIL PROTECTED]


Model mapping crash

2008-11-13 Thread Steven Hamilton

Hi folks,
I have a Core data application. I've versioned my model, created a new  
version and added one new entity. When I create a mapping model file  
and choose my two models. It creates a default mapping but if some of  
the entities are selected in teh mapping view, XCode hard crashes with  
the following error. If I don't select a broken entity and try and  
compile I get a build failure with the same error. Something about  
unable to parse the mapping string. I've tried upgrading my XCode from  
3.1 to 3.1.1 to no avail. Has anyone seen this before or be able to  
decipher whats going wrong with the string its producing?


Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0002, 0x
Crashed Thread:  0

Application Specific Information:
*** Terminating app due to uncaught exception  
'NSInvalidArgumentException', reason: 'Unable to parse the format  
string  
"FUNCTION 
($ 
manager 
 ,'destinationInstancesForEntityMappingNamed:sourceInstances:' ,  
'TransactionToTransaction' , $source.in) == 1"'

objc[4677]: garbage collection is ON

Thread 0 Crashed:
0   com.apple.CoreFoundation  	0x914e8ff4  
___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 4

1   libobjc.A.dylib 0x91324e3b objc_exception_throw + 40
2   com.apple.AppKit0x00d76d70 -[NSApplication run] + 944
3   com.apple.AppKit0x00d43f14 NSApplicationMain + 574

___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Michael Ash
On Thu, Nov 13, 2008 at 12:18 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 13, 2008 at 9:13 AM, Michael Ash <[EMAIL PROTECTED]> wrote:
>
>> The documentation is busted. Here's a message from Corbin Dunn stating
>> that they work without layers:
>
> Also note Jamie's email about it having issues even 10.5. I am still
> not sure it works fully as intended (don't have time at the moment to
> find the tool I built that was having problems still) and obviously IB
> and ibtool aren't up-to-speed on this front if it is fully supported
> now.

True. But it's *supposed* to work I'm not sure exactly what the
practical difference is between not supported but mostly working and
supported but not always working. I guess in the latter case you can
hope that the bugs will be fixed as time goes by.

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Michael Ash
On Thu, Nov 13, 2008 at 12:18 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 13, 2008 at 9:13 AM, Michael Ash <[EMAIL PROTECTED]> wrote:
>
>> The documentation is busted. Here's a message from Corbin Dunn stating
>> that they work without layers:
>
> Also note Jamie's email about it having issues even 10.5. I am still
> not sure it works fully as intended (don't have time at the moment to
> find the tool I built that was having problems still) and obviously IB
> and ibtool aren't up-to-speed on this front if it is fully supported
> now.

True. But it's *supposed* to work I'm not sure exactly what the
practical difference is between not supported but mostly working and
supported but not always working. I guess in the latter case you can
hope that the bugs will be fixed as time goes by.

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 [EMAIL PROTECTED]


Re: Does HELP cache source location?

2008-11-13 Thread David
I take it back. Its not working. Its acting even weirder.

For a file that's missing locally... it works. It obtains it from the
web at the /help/1.0/file.html location.

But for files which ARE present locally, it fails. I get a message such as:

"Multiple Choices
The document you requested (/htlp/1.0file.html) could not be found on
this server. However, we found documents with names similar to the one
you requested.

Available document:
-  /help/1.0 (common basename)"

And the /help/1.0 is a link. If I follow it, I can then access all the
server based files.

I'm at wits end. I cannot figure this beast out.

Can anyone provide any guidance or pointers. Is there some other
mailing list where folks know more about this subsystem?

Again this is on Leopard which apparently has changed the help system.

On Thu, Nov 13, 2008 at 4:23 PM, David <[EMAIL PROTECTED]> wrote:
> For the benefit of others who may run across this horrible Help design...
>
> I was trying to create help for my application. Used Help Indexer to
> give it a remote root url to use overriding local help.
>
> When I first put in the URL, I did it in the form, http://foo/help/1.0
>
> Little did I know that Help does a non-intelligent concatenation of
> the URL with the path in the help. This results in the help viewer
> looking for http://foo/help/1.0index.html.
>
> Seems very simple right? Just add the / at the end. How hard could that be...
>
> Well turns out that this value gets cached. I've wasted an entire day
> because of a lack of transparency regarding what the help system does.
>
> I have to scan the entire file system to figure out where this was
> being stored. Turns out it was being cached in
> ~/Library/Caches/com.apple.helpui/
>
> I erased the application's help cache directory and suddenly it FINALLY 
> worked.
>
> On Thu, Nov 13, 2008 at 12:00 PM, David <[EMAIL PROTECTED]> wrote:
>> I'm getting really wierd results that make me think the Help system is
>> caching its source location somewhere. I changed the URL used in Help
>> Indexer for a network location for help. Sometimes the changes seems
>> to take effect and often it doesn't. Is it stored in preferences? Does
>> Help remember across invocations of an application?
>>
>> I'm originally had http://foo/help. No complaints, but it didn't read 
>> anything.
>> Then switched to using http://foo/help/1.0
>>
>> I uploaded my content. Now it complains that it can't find,
>> http://foo/help/1.0index.html. What happened to the directory
>> delimiter between 1.0 and index.html?
>>
>> So I added a / at the end of the root URL, http://foo/help/1.0/
>> No change, same error.
>>
>> I changed it to http://foo/help1.0/ and I still got an error about
>> http://foo/help/1.0index.html even though that wasn't the path
>> anymore.
>>
>> Now I'm getting weird results where sometimes it complains, and
>> sometimes it shows the local page.
>>
>> I need more clarity on what the help system is doing. This black box
>> magic stuff is ok if it works, but when it doesn't its a HUGE waste of
>> time.
>>
>> 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 [EMAIL PROTECTED]


Re: Does HELP cache source location?

2008-11-13 Thread David
In the message, it should have read, (/help/1.0file.html)

On Thu, Nov 13, 2008 at 5:16 PM, David <[EMAIL PROTECTED]> wrote:
> I take it back. Its not working. Its acting even weirder.
>
> For a file that's missing locally... it works. It obtains it from the
> web at the /help/1.0/file.html location.
>
> But for files which ARE present locally, it fails. I get a message such as:
>
> "Multiple Choices
> The document you requested (/htlp/1.0file.html) could not be found on
> this server. However, we found documents with names similar to the one
> you requested.
>
> Available document:
> -  /help/1.0 (common basename)"
>
> And the /help/1.0 is a link. If I follow it, I can then access all the
> server based files.
>
> I'm at wits end. I cannot figure this beast out.
>
> Can anyone provide any guidance or pointers. Is there some other
> mailing list where folks know more about this subsystem?
>
> Again this is on Leopard which apparently has changed the help system.
>
> On Thu, Nov 13, 2008 at 4:23 PM, David <[EMAIL PROTECTED]> wrote:
>> For the benefit of others who may run across this horrible Help design...
>>
>> I was trying to create help for my application. Used Help Indexer to
>> give it a remote root url to use overriding local help.
>>
>> When I first put in the URL, I did it in the form, http://foo/help/1.0
>>
>> Little did I know that Help does a non-intelligent concatenation of
>> the URL with the path in the help. This results in the help viewer
>> looking for http://foo/help/1.0index.html.
>>
>> Seems very simple right? Just add the / at the end. How hard could that be...
>>
>> Well turns out that this value gets cached. I've wasted an entire day
>> because of a lack of transparency regarding what the help system does.
>>
>> I have to scan the entire file system to figure out where this was
>> being stored. Turns out it was being cached in
>> ~/Library/Caches/com.apple.helpui/
>>
>> I erased the application's help cache directory and suddenly it FINALLY 
>> worked.
>>
>> On Thu, Nov 13, 2008 at 12:00 PM, David <[EMAIL PROTECTED]> wrote:
>>> I'm getting really wierd results that make me think the Help system is
>>> caching its source location somewhere. I changed the URL used in Help
>>> Indexer for a network location for help. Sometimes the changes seems
>>> to take effect and often it doesn't. Is it stored in preferences? Does
>>> Help remember across invocations of an application?
>>>
>>> I'm originally had http://foo/help. No complaints, but it didn't read 
>>> anything.
>>> Then switched to using http://foo/help/1.0
>>>
>>> I uploaded my content. Now it complains that it can't find,
>>> http://foo/help/1.0index.html. What happened to the directory
>>> delimiter between 1.0 and index.html?
>>>
>>> So I added a / at the end of the root URL, http://foo/help/1.0/
>>> No change, same error.
>>>
>>> I changed it to http://foo/help1.0/ and I still got an error about
>>> http://foo/help/1.0index.html even though that wasn't the path
>>> anymore.
>>>
>>> Now I'm getting weird results where sometimes it complains, and
>>> sometimes it shows the local page.
>>>
>>> I need more clarity on what the help system is doing. This black box
>>> magic stuff is ok if it works, but when it doesn't its a HUGE waste of
>>> time.
>>>
>>> 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 [EMAIL PROTECTED]


NSSearchField constants in search predicate binding?

2008-11-13 Thread Steve Mykytyn
I'd like to use constant values in certain NSSearchField search  
predicate bindings, but can't seem to get them to work.  As in these  
two predicates


ALL

phoneNumber contains $value

USA ONLY

(phoneNumber contains $value) and (countryName contains 'United States')

Is this possible, and what's the correct syntax if it is possible?

 I could not find anything obvious online, and thought the example  
above ought to work

___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Michael Ash
On Thu, Nov 13, 2008 at 12:31 PM, Jean-Nicolas Jolivet
<[EMAIL PROTECTED]> wrote:
> That was going to be my next point
>
> Assuming it has been fixed in Leopard, it is therefore really an IB Bug as I
> suspected at first??
>
> Anyway, Re-ordering my controls programatically did the trick... however,
> should I assume that it might not work on Tiger since overlapping view's
> behavior is unpredictable in 10.4??

In your situation then yes, you should not do this. Since you want the
smaller view to appear on top of the larger view, you can just make it
a subview of the larger view instead. Alternatively, you can subclass
the larger view and override its drawRect: to draw the label manually.

Note that it is possible to have overlapping views on 10.4. The caveat
quoted else-thread is fairly specific about what doesn't work, and if
you arrange things properly you can work around the problems. I have a
shipping app that's had overlapping views on Tiger for two years with
no problems. But I recommend using just about any alternative you can
find first, especially if you're using standard Apple views. (My
working overlapping views are all custom views.)

The nice thing is that Tiger is a stationary target these days, so if
you get it working on Tiger despite the warnings and rely on the
guaranteed behavior in Leopard, you should be in good shape. In theory
a security update or something of that nature could be released which
breaks your stuff, but that's really unlikely to happen at this point.

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 [EMAIL PROTECTED]


Re: Linking with a very specific library version

2008-11-13 Thread Dave Geering
> Dave,
> I have had similar problems in the past with linking with libcrypto.
> My solution has been to set the "Other Linker Flags" to the path to the
> library I want and set the "Library Search Paths" to that same library.
> The resulting linker flags look like:
> "-L "
> ../../IKEngine/IKEngineOpenSSL/openssl-0.9.8d/build/static/libcrypto.a
> Technical Q&A AQ1393 covers this some, but never completely worked for me.

Hi Rich,

I've found out that Panther's SNMP dylib's "compatibility version" is
6.0.0 and on Tiger it is 8.0.0, this is different than the actual
source-code version. Leopard comes with the same compatibility version
as Tiger as well as the latest SNMP libraries (they sit side by side).

Since my Bundle was linked with the Tiger SNMP library, even though it
has the same file name on Panther, it wouldn't load the library on
Panther because the compatibility version of Tiger's SNMP library was
greater. So, I linked with Panther's library instead, and did a little
version detection to make some adjustments in my parameters to the
API, and it worked, but the Panther library is PPC only (I had to
remove i386 as a target architecture for it to link at all) and so my
Bundle wouldn't work on Intel.

So, I created a new Xcode project; a fake dylib called
libnetsnmp.5.dylib (the same name as the actual version), and it
contained dummy entries for all the APIs I called from the real
library. I compiled this fake library for both Intel and PPC, and made
the "compatibility version" 6.0.0 so it would load on Panther and
Tiger. When I linked this against my Bundle it would resolve all the
external links OK against this so-called "libnetsnmp.5.dylib", not
knowing that this wasn't the actual library it is going to be using.
My Bundle now also contained information that it requires the SNMP
library with a compatibility version of 6.0.0 or greater.

Keeping my version detection in play, I could now distribute my Bundle
across Panther, Tiger and Leopard and it worked perfectly on both PPC
and Intel, and I don't need to statically link against any libraries,
or distribute a static version of the library either! Huzzah!

It's a Mickey Mouse way to do things but it works. I never like doing
version detection.

Cheers,
Dave.
___

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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Uli Kusterer

On 13.11.2008, at 17:13, Jean-Nicolas Jolivet wrote:
Correct me if I'm wrong though, but I read that it wasn't a problem  
anymore in 10.5... can anyone confirm that??



 As I said, layer-backed views. But they're fiddly.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.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 [EMAIL PROTECTED]


deep deep copies, or shallow deep copies?

2008-11-13 Thread Graham Cox

Does anyone know whether methods such as:

[NSArray initWithArray: copyItems:YES];

continue to deep-copy items for further collections within the root  
collection, or do they fall back to a shallow copy (retaining)?


If no-one knows I can spend an hour or two doing some experiments but  
if it's just a known 'yes' or 'no' I'd rather save the time!



tia,


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 [EMAIL PROTECTED]


Re: deep deep copies, or shallow deep copies?

2008-11-13 Thread Ken Ferry
On Thu, Nov 13, 2008 at 3:58 PM, Graham Cox <[EMAIL PROTECTED]> wrote:
> Does anyone know whether methods such as:
>
> [NSArray initWithArray: copyItems:YES];
>
> continue to deep-copy items for further collections within the root
> collection, or do they fall back to a shallow copy (retaining)?
>
> If no-one knows I can spend an hour or two doing some experiments but if
> it's just a known 'yes' or 'no' I'd rather save the time!

It will send the -copy method to each of the items in the array, and
insert the resulting copies into the new array.

So, context specific.  If the items are Cocoa collections, that means
shallow copies of items.

-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 [EMAIL PROTECTED]


Re: Weird bug in IB...

2008-11-13 Thread Ken Ferry
Hey Uli,

On Thu, Nov 13, 2008 at 3:48 PM, Uli Kusterer
<[EMAIL PROTECTED]> wrote:
> On 13.11.2008, at 17:13, Jean-Nicolas Jolivet wrote:
>>
>> Correct me if I'm wrong though, but I read that it wasn't a problem
>> anymore in 10.5... can anyone confirm that??
>
>
>  As I said, layer-backed views. But they're fiddly.

Actually, overlapping subviews are supported in 10.5 regardless of
whether views are layer backed!

The enabling change was to track dirty regions at the window level
instead of at the view level.

-Ken
Cocoa Frameworks
___

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 [EMAIL PROTECTED]


Re: deep deep copies, or shallow deep copies?

2008-11-13 Thread Kiel Gillard

Hi Graham,

If you do want a deep copy of a collection, check out . NSPropertyListSerialization would be the Cocoa equivalent of this  
API.


Kiel

On 14/11/2008, at 11:07 AM, Ken Ferry wrote:

On Thu, Nov 13, 2008 at 3:58 PM, Graham Cox <[EMAIL PROTECTED]>  
wrote:

Does anyone know whether methods such as:

[NSArray initWithArray: copyItems:YES];

continue to deep-copy items for further collections within the root
collection, or do they fall back to a shallow copy (retaining)?

If no-one knows I can spend an hour or two doing some experiments  
but if

it's just a known 'yes' or 'no' I'd rather save the time!


It will send the -copy method to each of the items in the array, and
insert the resulting copies into the new array.

So, context specific.  If the items are Cocoa collections, that means
shallow copies of items.

-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/kiel.gillard%40gmail.com

This email sent to [EMAIL PROTECTED]


___

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 [EMAIL PROTECTED]


Re: deep deep copies, or shallow deep copies?

2008-11-13 Thread Graham Cox


On 14 Nov 2008, at 11:18 am, Kiel Gillard wrote:


Hi Graham,

If you do want a deep copy of a collection, check out . NSPropertyListSerialization would be the Cocoa equivalent of this  
API.


Kiel

On 14/11/2008, at 11:07 AM, Ken Ferry wrote:

On Thu, Nov 13, 2008 at 3:58 PM, Graham Cox  
<[EMAIL PROTECTED]> wrote:

Does anyone know whether methods such as:

[NSArray initWithArray: copyItems:YES];

continue to deep-copy items for further collections within the root
collection, or do they fall back to a shallow copy (retaining)?

If no-one knows I can spend an hour or two doing some experiments  
but if

it's just a known 'yes' or 'no' I'd rather save the time!


It will send the -copy method to each of the items in the array, and
insert the resulting copies into the new array.

So, context specific.  If the items are Cocoa collections, that means
shallow copies of items.




Thanks Ken and Kiel,

I have code that does a deep copy recursively, but I was wondering if  
these methods would be useful in their place. Seems not, oh well.


--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 [EMAIL PROTECTED]


Re: Detect the login window is being displayed

2008-11-13 Thread Maggie Zhang
We have login agent and daemon components which do the work regarding user
logout. I am trying the SystemConfiguration which we were using a bit in the
daemon component.

Do you mean I just need to get a callback when somebody logs out?

In order to make SCDynamicStoreCopyConsoleUser work, do I need to find the
current user info and give the uid and gid of the current user? Or
SCDynamicStoreCopyConsoleUser(NULL,
NULL, NULL) will do the work? I tried NULL for uid and gid but I got uid =
56 and gid = 0, which definitely wasn't the right user information I
expected to see.

Will the callback be sent as well when the machine shuts down or restarts? I
only want to get it when user logs out otherwise I won't be able to
distinguish logout from shutdown or restart.

Thanks for your help!


On Wed, Nov 12, 2008 at 8:48 PM, Ryan McGann <[EMAIL PROTECTED]> wrote:

> Originally, I need to distinguish logging out from shutting down or
>> restarting. Since there isn't an easy way to do that, I am thinking to
>> find
>> a way to tell only when the user is logging out and let the machine do
>> whatever it wants when shutting down or restarting.Do you have a better
>> idea
>> how to do it?
>>
> This is going to be hard to distinguish depending on what you mean by
> "daemon". If you are a true daemon (that runs outside the login context),
> then you can use SystemConfiguration. You will get a callback when somebody
> logs in and logs out.
>
> However if you are a Cocoa application (which I assume you are since you
> posted to cocoa-dev) then this will be difficult to determine. Your
> application will be quit by loginwindow regardless of whether the user is
> restarting or logging out, because either way all Cocoa/Carbon applications
> will be quit.  The login/logout notifications will only be posted after your
> application has already quit.
>
> Please describe what you mean by "daemon" and how your application is being
> launched.
>
> Ryan
> [EMAIL PROTECTED]
>
___

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 [EMAIL PROTECTED]


Distributed Objects Performance

2008-11-13 Thread Bridger Maxwell
Hello,

I am building a server that will rely on distributed objects, and am
worried about the performance. I am not quite done yet, but I  afraid
to spend too much time on this system before discovering it will not
be able to handle the network traffic. Perhaps one of the more
seasoned developers would be kind enough to share his/her thoughts.

Where I work we run space simulations. There are several
"stations/terminals" in each simulator which each have a unique role,
but share much of the same data. To keep everything in sync I would
like to have a central database that contains the entire ship's state.
When a client connects to the server it retrieves the initial state
for all of their relevant keys and subscribes for changes. Any time
that a change is made to one of these items, the new value is pushed
to all of the clients who have subscribed to it. In this way the
clients do not need to poll the server, as they can use the cached
value.

So that is how the networking system will hopefully be set up. To give
a rough estimate of network traffic, there are anywhere between 5 and
30 "stations" in each simulator that will be connected to the server.
Network data would consist mostly of strings, numbers, and arrays. No
particularly large media like pictures, music, or video. I wouldn't
think any of these items would be larger than say a page of apple
docs. However, values would be changed quite often. The server would
be connected through the LAN and would probably be running on a mac
mini.

So, do you think distributed objects is the right solution? Is there a
rule of thumb on network traffic size or maximum number of clients
distributed objects can support?

Thank You,
Bridger Maxwell
___

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 [EMAIL PROTECTED]


Re: Distributed Objects Performance

2008-11-13 Thread Kyle Sluder
On Fri, Nov 14, 2008 at 12:26 AM, Bridger Maxwell <[EMAIL PROTECTED]> wrote:
> So, do you think distributed objects is the right solution? Is there a
> rule of thumb on network traffic size or maximum number of clients
> distributed objects can support?

You really need to sit down with the numbers.  How big your datasets
are, how sustained your transfer is, how many devices are on each
Ethernet segment, how big the backplanes are in your switches/routers
if your network spans multiple segments... using DO won't introduce
much more overhead than you'll already have to deal with.

--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 [EMAIL PROTECTED]


Re: [ANN] BWToolkit - Plugin for IB 3

2008-11-13 Thread Rob Keniger


On 14/11/2008, at 4:44 AM, Brandon Walkin wrote:

BWToolkit is a BSD licensed plugin for Interface Builder 3 that  
contains commonly used UI elements and other useful objects. These  
include a suite of transparent (HUD) controls, a selectable toolbar  
for "no code" preferences windows and tabbed sheets, button bars,  
textured bottom bars, a textured slider, a gradient token field, and  
much more.


You can read about it in more detail, watch screencasts, and  
download the plugin (along with the source) on my blog:

http://www.brandonwalkin.com/blog/2008/11/13/introducing-bwtoolkit/



This is an absolutely fantastic effort, well done. This is how  
Interface Builder should work out of the box!


--
Rob Keniger



___

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 [EMAIL PROTECTED]


Re: Distributed Objects Performance

2008-11-13 Thread Seth Willits

On Nov 13, 2008, at 9:26 PM, Bridger Maxwell wrote:


However, values would be changed quite often.


How often? 60 times per second often? Once per second often? Every  
minute, often?


You'll need to calculate the amount of data you're expecting to  
transfer, worst case.



--
Seth Willits



___

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 [EMAIL PROTECTED]


Re: Distributed Objects Performance

2008-11-13 Thread Seth Willits

On Nov 13, 2008, at 9:26 PM, Bridger Maxwell wrote:


However, values would be changed quite often.


How often? 60 times per second often? Once per second often? Every  
minute, often?


You'll need to calculate the amount of data you're expecting to  
transfer, worst case.



--
Seth Willits



___

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 [EMAIL PROTECTED]


Re: Distributed Objects Performance

2008-11-13 Thread Bridger Maxwell
>
>
> How often? 60 times per second often? Once per second often? Every minute,
> often?
>
> You'll need to calculate the amount of data you're expecting to transfer,
> worst case.
>

I would say about every five seconds often, max. The problem is, once I have
a worst case scenario calculated (which would be very difficult to
calculate, and would be little more than a bad guess), I wouldn't know if
that is reasonable or not. Perhaps there is an example of what DO is well
suited for, and what it is not? Then, as we design these stations we can
either strive for absolute efficiency, or know there is a little breathing
room if it makes the programming easier. I have absolutely no experience
here (in network efficiency) so I feel like I am shooting in the dark.

Thank You,
Bridger Maxwell
___

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 [EMAIL PROTECTED]