Changing folder attributes

2010-04-26 Thread Reinhard Segeler

Hi,

my app creates a folder on a MacServer-Volume (FileSharing), but can't  
change the attributes of that folder using  
setAttributes:ofItemAtPath:error: . It always receives the error: You  
do not have appropriate access privileges to save file.


I have read and write previliges to the server volume

Any help is welcome.

Reinhard
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Creating temporary NSManagedObjects

2010-04-26 Thread vincent habchi
Hi to all,

I need to create a short-lived NSManagedObject; ideally, I'd want it not to be 
inserted in the Core Data underlying framework, because I need it only during 
the display of an auxiliary window, and I don't want it saved anyway. I've 
tried a simple alloc, an alloc and init, but to no avail: It seems to create 
only the proxy object. Is there a way to do that?

Thanks,
Vincent___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 10:43 AM, vincent habchi  wrote:
> I need to create a short-lived NSManagedObject; ideally, I'd want it not to 
> be inserted in the Core Data underlying framework, because I need it only 
> during the display of an auxiliary window, and I don't want it saved anyway. 
> I've tried a simple alloc, an alloc and init, but to no avail: It seems to 
> create only the proxy object. Is there a way to do that?
>
> Thanks,
> Vincent___

What you want to do, probably, is create an object that doesn't belong
to a context (the context is what ends up saving your object to a data
store).  You should be able to do something like this:

// assuming your app delegate contains the "managedObjectModel" method, which
// the standard Xcode-generated CoreData app typically does
NSManagedObjectModel *managedObjectModel = [[NSApplication delegate]
managedObjectModel];
NSEntityDescription *entity = [[managedObjectModel entitiesByName] @"MyEntity"];
id obj = [[NSManagedObject alloc] initWithEntity:entity
insertIntoManagedObjectContext:nil];

BTW the docs for NSManagedObject clearly state that
"initWithEntity:insertIntoManagedObjectContext:" is the designated
initializer to use for creating instances, and that you shouldn't just
call "init".

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread vincent habchi
Jack,

> What you want to do, probably, is create an object that doesn't belong
> to a context (the context is what ends up saving your object to a data
> store).  You should be able to do something like this:
> 
> // assuming your app delegate contains the "managedObjectModel" method, which
> // the standard Xcode-generated CoreData app typically does
> NSManagedObjectModel *managedObjectModel = [[NSApplication delegate]
> managedObjectModel];
> NSEntityDescription *entity = [[managedObjectModel entitiesByName] 
> @"MyEntity"];
> id obj = [[NSManagedObject alloc] initWithEntity:entity
> insertIntoManagedObjectContext:nil];

So, just replacing the MOC by nil. I have not tried that, I admit.

> BTW the docs for NSManagedObject clearly state that
> "initWithEntity:insertIntoManagedObjectContext:" is the designated
> initializer to use for creating instances, and that you shouldn't just
> call "init".

Yes. But, at the same time, no doc on Core Data, whether Apple written or not, 
seems to talk about "temporary" objects, other than transient. Therefore, one 
might also infer that "initWithEntity:insertIntoManagedObjectContext:" is the 
designated initializer as far as you want your object to be inserted into the 
MOC…

Cheers, and thanks a lot for the idea!
Vincent___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread vincent habchi
Le 26 avr. 2010 à 11:04, Jack Nutting a écrit :

> // assuming your app delegate contains the "managedObjectModel" method, which
> // the standard Xcode-generated CoreData app typically does
> NSManagedObjectModel *managedObjectModel = [[NSApplication delegate]
> managedObjectModel];
> NSEntityDescription *entity = [[managedObjectModel entitiesByName] 
> @"MyEntity"];
> id obj = [[NSManagedObject alloc] initWithEntity:entity
> insertIntoManagedObjectContext:nil];

By the way, how do you delete these objects with a null MOC, since you are 
supposed to call [MOC deleteObject:]?
Vincent___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Joanna Carter
Hi Vincent

> I need to create a short-lived NSManagedObject; ideally, I'd want it not to 
> be inserted in the Core Data underlying framework, because I need it only 
> during the display of an auxiliary window, and I don't want it saved anyway. 
> I've tried a simple alloc, an alloc and init, but to no avail: It seems to 
> create only the proxy object. Is there a way to do that?


Do you really need an NSManagedObject?

Do you ever need to store instances of this particular class?

If not, why not just create a class that derives from NSObject, or even just 
use an NSDictionary?

Joanna

--
Joanna Carter
Carter Consulting
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread vincent habchi
Hi Joanna,

> Do you really need an NSManagedObject?
> Do you ever need to store instances of this particular class?

Yes. That NSObject holds some properties associated with a graphical layer. I 
have a lot of them, that I classically save in order to be able to restore the 
state of the application at launch. Now, to highlight a specific item on a 
given layer, I create a temporary layer, that I destroy once the user has 
identified the highlighted item. To keep the drawing code orthogonal, I have to 
create that temporary NSObject I mentioned, which is needed by my 
drawInContext: method. 

I hope it is a bit clearer, despite my rusty English.
Vincent___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Joanna Carter
Hi Vincent

> Yes. That NSObject holds some properties associated with a graphical layer. I 
> have a lot of them, that I classically save in order to be able to restore 
> the state of the application at launch. Now, to highlight a specific item on 
> a given layer, I create a temporary layer, that I destroy once the user has 
> identified the highlighted item. To keep the drawing code orthogonal, I have 
> to create that temporary NSObject I mentioned, which is needed by my 
> drawInContext: method. 

In that case, try this:

Create a category on NSManagedObject -

@interface NSManagedObject (ObjectAsDictionary)

- (NSDictionary *) objectAsDictionary;

@end

@implementation NSManagedObject (ObjectAsDictionary)

- (NSDictionary *) objectAsDictionary
{
  NSDictionary *dictionary = [NSMutableDictionary dictionary];
  
  NSEntityDescription* entityDescription = [self entity] ;

  for (NSPropertyDescription *propertyDescription in entityDescription)
  {
id propertyValue = [self valueForKey:[propertyDescription name]];

[dictionary setValue:propertyValue forKey:[propertyDescription name]];
  }
  
  return dictionary;
}

@end

Then simply call the following code on the original managed object when :

{
  // assume an NSDictionary *editingWord property declared in your controller 
class

  editingValues = [editingWord objectAsDictionary];

  // set object controller content to be editingValues

  ...
}

... then after the edits have been made, use the following code to update the 
object to be stored:

{
  //assume your object to be stored is called originalObject

  [originalObject setValuesForKeysWithDictionary:self.editingValues];

  ...
}

> I hope it is a bit clearer, despite my rusty English.


I speak French if that helps? :-)

Joanna

--
Joanna Carter
Carter Consulting

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


CoreData validation question

2010-04-26 Thread Arnold Nefkens
Hello list, 

I have the following validation method, why is it not working?

-(BOOL)validateNumberField2:(id *)ioValue error:(NSError **)outError
{
NSNumber *inputNumberField2 = *ioValue;
NSNumber *numberField2Stat = self.numberField2;
NSNumber *numberField1Stat = self.numberField1;

if (numberField2Stat != 0) {
if (inputNumberField2 <= numberField1Stat) {
if (outError != NULL) {
NSString *errorStr = NSLocalizedString(@"Error 
message.",@"Error message");
NSDictionary *userInfoDict = [NSDictionary 
dictionaryWithObject:errorStr
forKey:NSLocalizedDescriptionKey];

NSError *error = [[[NSError alloc] 
initWithDomain:kValidationDomain 
code:kValidationnumberField2Code userInfo:userInfoDict] autorelease];
*outError = error;
}
return NO;
}
return YES;
}
return YES;
}

What I want is the following:
The very first object  created in CoreData has the initial value of 
numberField2 = 0.
If you enter a new number for this field it has to be larger then the number in 
numberField1.

The validation does only work if ,and only if you have already more then 1 
object in you CoreData.

What do I have to change in order to make this validation work: 
If numberField2 has a value of 0, then return yes, else check if 
inputNumberField2 is smaller than numberField1. If it is smaller, give 
validation error, else return yes. I think that the logic of the if statement 
is sound.

Could someone be so kind and take a look?

Much appreciated

Arnold Nefkens


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: CoreData validation question

2010-04-26 Thread Steve Bird

On Apr 26, 2010, at 7:51 AM, Arnold Nefkens wrote:

> Hello list, 
> 
> I have the following validation method, why is it not working?
> 
> -(BOOL)validateNumberField2:(id *)ioValue error:(NSError **)outError
> {
>   NSNumber *inputNumberField2 = *ioValue;
>   NSNumber *numberField2Stat = self.numberField2;
>   NSNumber *numberField1Stat = self.numberField1;
>   
>   if (numberField2Stat != 0) {

QUESTION:  What data type is "numberField2Stat" ?
ANSWER: it's a POINTER to an NSNumber (not a numeric value).
therefore it's very likely to never be zero.

>   if (inputNumberField2 <= numberField1Stat) {

QUESTION:  What data type is "numberField1Stat" ?
ANSWER: it's a POINTER to an NSNumber (not a numeric value).
therefore .. _ ?

consider using the intValue of your NSNumbers.


Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com (toll free) 1-877-676-8175


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 11:36 AM, vincent habchi  wrote:
> By the way, how do you delete these objects with a null MOC, since you are 
> supposed to call [MOC deleteObject:]?
> Vincent

Good question.  I believe a simple release/autorelease will do.

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Can't drag a custom data object.

2010-04-26 Thread Billy Flatman
Hi all,

I'm trying to put a custom object into past board in order to perform a drag 
operation. It's working fine if I drag a string, but if I try to pass an 
object, I can't get it to work.

- (BOOL)outlineView:(NSOutlineView*)outlineView writeItems:(NSArray*)items 
toPasteboard:(NSPasteboard*)pboard {

NSString* kOutlineViewGroupType = @"IFNode";

[pboard clearContents];

if([[items objectAtIndex:0] isParent]) {

return NO;
}

itemsBeingDragged = items;

[pboard declareTypes:[NSArray arrayWithObjects:NSStringPboardType, 
kOutlineViewGroupType, nil]  owner:nil];

** This works.
[pboard setString:[[items objectAtIndex:0] title] 
forType:NSStringPboardType];

** This doesn't (actually stops drag and drop working for my 
application until I logout).
[pboard setData:[items objectAtIndex:0] forType:kOutlineViewGroupType];

return YES;
}

Any help greatly appreciated.

Cheers,

Billy Flatman
b.flat...@googlemail.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread Brad Stone
The same code builds fine after a clean all in 3.2.1 and 3.2.  In the new 
version, 3.2.2, it hangs during the build.  Here's the sequence:

1) I open the code
2) clean all
3) I build and it hangs (still says "Clean succeeded" in the bottom right of 
the window)
4) I force quit and reopen code
5) clean all
6) I build and it goes fine (it says precompiling, building, running)
7) I quit my app
8) clean all
9) back to 3


Has anyone else experienced this?  It only happens 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 arch...@mail-archive.com


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Joanna Carter
Hi Jack

> Good question.  I believe a simple release/autorelease will do.

If the object has been created by inserting into the context, then it would 
have to be removed from the contrext.

Joanna

--
Joanna Carter
Carter Consulting

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: CoreData validation question

2010-04-26 Thread Arnold Nefkens
Thanks, 

That was just what I needed. It now works... Thanks again... Sometimes I am 
a bit lost. Started with iPhone development & Obj-C less then three months 
ago
On 26 apr 2010, at 14:15, Steve Bird wrote:

> 
> On Apr 26, 2010, at 7:51 AM, Arnold Nefkens wrote:
> 
>> Hello list, 
>> 
>> I have the following validation method, why is it not working?
>> 
>> -(BOOL)validateNumberField2:(id *)ioValue error:(NSError **)outError
>> {
>>  NSNumber *inputNumberField2 = *ioValue;
>>  NSNumber *numberField2Stat = self.numberField2;
>>  NSNumber *numberField1Stat = self.numberField1;
>>  
>>  if (numberField2Stat != 0) {
> 
> QUESTION:  What data type is "numberField2Stat" ?
> ANSWER: it's a POINTER to an NSNumber (not a numeric value).
> therefore it's very likely to never be zero.
> 
>>  if (inputNumberField2 <= numberField1Stat) {
> 
> QUESTION:  What data type is "numberField1Stat" ?
> ANSWER: it's a POINTER to an NSNumber (not a numeric value).
> therefore .. _ ?
> 
> consider using the intValue of your NSNumbers.
> 
> 
> Steve Bird
> Culverson Software - Elegant software that is a pleasure to use.
> www.Culverson.com (toll free) 1-877-676-8175
> 
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread Rui Pacheco
Does it happen with all projects or always the same?

If its always the same project try deleting the project folder and checking
it out again.

On 26 April 2010 14:06, Brad Stone  wrote:

> The same code builds fine after a clean all in 3.2.1 and 3.2.  In the new
> version, 3.2.2, it hangs during the build.  Here's the sequence:
>
> 1) I open the code
> 2) clean all
> 3) I build and it hangs (still says "Clean succeeded" in the bottom right
> of the window)
> 4) I force quit and reopen code
> 5) clean all
> 6) I build and it goes fine (it says precompiling, building, running)
> 7) I quit my app
> 8) clean all
> 9) back to 3
>
>
> Has anyone else experienced this?  It only happens 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/rui.pacheco%40gmail.com
>
> This email sent to rui.pach...@gmail.com
>



-- 
Best regards,
Rui Pacheco
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread Brad Stone
Nope, just this project.  I loaded it on a different Mac, same problem and it's 
OK in 3.2.  The thing is I can't even debug it. 

On Apr 26, 2010, at 9:14 AM, Rui Pacheco wrote:

> Does it happen with all projects or always the same?
> 
> If its always the same project try deleting the project folder and checking 
> it out again.
> 
> On 26 April 2010 14:06, Brad Stone  wrote:
> The same code builds fine after a clean all in 3.2.1 and 3.2.  In the new 
> version, 3.2.2, it hangs during the build.  Here's the sequence:
> 
> 1) I open the code
> 2) clean all
> 3) I build and it hangs (still says "Clean succeeded" in the bottom right of 
> the window)
> 4) I force quit and reopen code
> 5) clean all
> 6) I build and it goes fine (it says precompiling, building, running)
> 7) I quit my app
> 8) clean all
> 9) back to 3
> 
> 
> Has anyone else experienced this?  It only happens 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/rui.pacheco%40gmail.com
> 
> This email sent to rui.pach...@gmail.com
> 
> 
> 
> -- 
> Best regards,
> Rui Pacheco

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
Hi Joanna,

On Mon, Apr 26, 2010 at 3:11 PM, Joanna Carter
 wrote:
>
>> Good question.  I believe a simple release/autorelease will do.
>
> If the object has been created by inserting into the context, then it would 
> have to be removed from the contrext.
>
> Joanna

Right, but we were talking about passing in nil as the context when
creating the object, so there's no context to remove it from.
.

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread John Pannell
Hi Brad

I have no solutions, but can confirm that I have the same issue.  I've ended up 
quitting after all cleans, relaunching, and then building (which works, but is 
clearly a workaround, not a fix).

John

Positive Spin Media
http://www.positivespinmedia.com

On Apr 26, 2010, at 7:18 AM, Brad Stone wrote:

> Nope, just this project.  I loaded it on a different Mac, same problem and 
> it's OK in 3.2.  The thing is I can't even debug it. 
> 
> On Apr 26, 2010, at 9:14 AM, Rui Pacheco wrote:
> 
>> Does it happen with all projects or always the same?
>> 
>> If its always the same project try deleting the project folder and checking 
>> it out again.
>> 
>> On 26 April 2010 14:06, Brad Stone  wrote:
>> The same code builds fine after a clean all in 3.2.1 and 3.2.  In the new 
>> version, 3.2.2, it hangs during the build.  Here's the sequence:
>> 
>> 1) I open the code
>> 2) clean all
>> 3) I build and it hangs (still says "Clean succeeded" in the bottom right of 
>> the window)
>> 4) I force quit and reopen code
>> 5) clean all
>> 6) I build and it goes fine (it says precompiling, building, running)
>> 7) I quit my app
>> 8) clean all
>> 9) back to 3
>> 
>> 
>> Has anyone else experienced this?  It only happens 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/rui.pacheco%40gmail.com
>> 
>> This email sent to rui.pach...@gmail.com
>> 
>> 
>> 
>> -- 
>> Best regards,
>> Rui Pacheco
> 
> ___
> 
> 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/john%40positivespinmedia.com
> 
> This email sent to j...@positivespinmedia.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Joanna Carter
Hi Jack

> Right, but we were talking about passing in nil as the context when
> creating the object, so there's no context to remove it from.

That's interesting. I have never tried using a nil context. Something more to 
add to my knowledge repository :-)

Thank you

Joanna

--
Joanna Carter
Carter Consulting

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 3:46 PM, Joanna Carter
 wrote:
> Hi Jack
>
>> Right, but we were talking about passing in nil as the context when
>> creating the object, so there's no context to remove it from.
>
> That's interesting. I have never tried using a nil context. Something more to 
> add to my knowledge repository :-)
>
> Thank you
>

Well I haven't actually tried it yet, so don't thank me yet!  ;)  The
docs for "initWithEntity:insertIntoManagedObjectContext :" do include
the text "If context is not nil, this method..." though, which seems
to imply that you should be able to send it a nil context. I really
should try this out myself.

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Bill Appleton
hi all,

thanks for the help! i am making really rapid progress

did anyone have some more color on question (2)  the need to create a raw
NSScroller and control it like a NSSlider  (min, max, value, proportion) is
that possible?

in other words all the shared code for imaging the offset page is common, i
need a scroll bar that behaves like a puppet & DOES nothing


thanks again,

bill appleton






On Sun, Apr 25, 2010 at 4:05 PM, Charles Srstka wrote:

> On Apr 25, 2010, at 6:00 PM, Klaus Backert wrote:
>
> > On 25 Apr 2010, at 22:28, Charles Srstka wrote:
> >
> >> The best thing to do is to read Apple’s Memory Management Guide, which
> will clear up a lot of things related to Cocoa memory management.
> >>
> >>
> http://developer.apple.com/mac/library/documentation/cocoa/conceptual/MemoryMgmt/MemoryMgmt.html
> >>
> >> In a nutshell (and this is a simplistic generalization, so there are a
> few exceptions, but this covers the majority of cases):
> > ...
> >
> > Now I'm really curious what will happen to you, poor man ;-)
> >
> > Reformulating the Memory Management Guide is not allowed. There have been
> again and again statements about this made by the mailing list moderator and
> by other Apple employees.
> >
> > May the Flying Spaghetti Monster help you ;-)
>
> Oh, apologies. I didn’t mean to cause offense.
>
> Scratch that then, and simply refer to the memory management guide.
>
> Charles___
>
> 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/billappleton%40dreamfactory.com
>
> This email sent to billapple...@dreamfactory.com
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 3:51 PM, Bill Appleton
 wrote:
> did anyone have some more color on question (2)  the need to create a raw
> NSScroller and control it like a NSSlider  (min, max, value, proportion) is
> that possible?
>
> in other words all the shared code for imaging the offset page is common, i
> need a scroll bar that behaves like a puppet & DOES nothing
>

Could you perhaps just use an NSSlider?

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread Thomas Clement

On Apr 26, 2010, at 3:06 PM, Brad Stone wrote:

The same code builds fine after a clean all in 3.2.1 and 3.2.  In  
the new version, 3.2.2, it hangs during the build.


Has anyone else experienced this?  It only happens with this code.


This is a bug in Xcode.
File a bug report.


Thomas
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Joanna Carter
Hi Vincent

> It would! :) No kidding, I really do not understand what is your dictionary 
> for. You don't have to tell me in French, I hope my English is sufficient, 
> but could you briefly explain me (in five lines or so) what your category is 
> supposed to do?

La catégorie rajoute une méthode, à la classe NSManagedObject, qui renvoie 
toutes les propriétés et leurs valeurs dans un NSDictionary.

Pourquoi ? Parce que  un NSDictionary répondrai à la programmation KVC, telle 
que valueForKey ou setValue:forKey, juste comme il était  n'importe quel objet 
qui est connecté aux composants visuels en utilisant les liaisons (bindings) 
Cocoa.

Ça veut dire qu'on peut remplacer un NSManagedObject avec un NSDictionary, 
comme contenu d'un NSObjectController et tous marchera comme d'habitude.

Après l'édition des valeurs qui se trouvent dans le dictionnaire, on peut 
affecter les valeurs du dictionnaire vers un vrai object avec la méthode 
setValuesForKeysWithDictionary:

> Sorry for seeming obtuse (after all, that may be *really* how I am :)).

C'est assez difficile d'apprendre la programmation mais, s'il faut le faire 
dans une langue étrangère, ça c'est beaucoup plus difficile :-)

Si je m'étais trompé en traduction, n'hésites pas de m'avertir.

Joanna

--
Joanna Carter
Carter Consulting
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Bill Appleton
it needs to look like a scroll bar... is that possible?




On Mon, Apr 26, 2010 at 6:54 AM, Jack Nutting  wrote:

> On Mon, Apr 26, 2010 at 3:51 PM, Bill Appleton
>  wrote:
> > did anyone have some more color on question (2)  the need to create a raw
> > NSScroller and control it like a NSSlider  (min, max, value, proportion)
> is
> > that possible?
> >
> > in other words all the shared code for imaging the offset page is common,
> i
> > need a scroll bar that behaves like a puppet & DOES nothing
> >
>
> Could you perhaps just use an NSSlider?
>
> --
> // jack
> // http://nuthole.com
> // http://learncocoa.org
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Graham Cox

On 26/04/2010, at 11:51 PM, Bill Appleton wrote:

> in other words all the shared code for imaging the offset page is common, i
> need a scroll bar that behaves like a puppet & DOES nothing


NSScroller is just a control, it does nothing except tell you its value. While 
the HIG advises against it, it can be used in place of a slider or similar.

If you are using it to scroll a view though, it's much easier to use 
NSScrollView which owns two scrollbars and handles the positioning for you. 
Scrolling is generally much easier to deal with in Cocoa than in Carbon.

--Graham


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread vincent habchi
Le 26 avr. 2010 à 15:50, Jack Nutting a écrit :

> Well I haven't actually tried it yet, so don't thank me yet!  ;)  The
> docs for "initWithEntity:insertIntoManagedObjectContext :" do include
> the text "If context is not nil, this method..." though, which seems
> to imply that you should be able to send it a nil context. I really
> should try this out myself.

It seems to work. I've to write a few more lines and I'll let you know.
Vincent___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Joanna Carter
Hi Vincent

> nice, thanks a lot for talking some time explaining me this.

De rien.

> Your French is almost perfect, congratulations!; far superior to my own 
> English.

I am glad my lack of skill in technical French didn't get in the way :-)

Joanna

--
Joanna Carter
Carter Consulting

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Jack Nutting
On Mon, Apr 26, 2010 at 3:56 PM, Bill Appleton
 wrote:
> it needs to look like a scroll bar... is that possible?
>

Ah, no.  Of course not, silly me.

I worked on a project years ago that had a similar requirement. It
used a subclass of NSScrollView, I think, that managed to ignore what
the sliders were telling it do directly, and instead passed something
on to the underlying engine, which manually did the sliding.  It was a
horrible mess, and I hope you can avoid that approach. Try the
NSScroller approach if there's no way to squeeze your view
architecture into a proper scrollable Cocoa view.

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Paul Sanders
> did anyone have some more color on question (2)  the need to create a raw
> NSScroller and control it like a NSSlider  (min, max, value, proportion) is
> that possible?

Yes, just instantiate it and call initWithFrame.  Then add it to your window's 
content view, which will retain it so you can release it.  Other than that, 
consult the NSScroller docs (and read up on the target/action mechanism for 
NSControls so that you can catch events generated by the scroller).

Addendum to my earlier post: requests to draw come though your content view's 
drawRect: method (or said method of any subviews thereof), so yu can use that 
to trigger the drawing of any 'bare metal' widgets.  To force a redraw, call 
setNeedsDisplay or setNeedsDisplayInRect: on your content view.

I learnt all this stuff by reading about it and by experimenting with my toy 
Cocoa app...  It's a method that works.  Apple's Cocoa framework docs are 
actually very good.  They should all have been installed with Xcode.

Paul Sanders.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Bill Appleton
hi all,

so in the NSScroler docs there is no way to set the min, max, and value --
that is the problem

there is a way to set the proportion of the page...

or am i missing something?


thx




On Mon, Apr 26, 2010 at 7:06 AM, Paul Sanders wrote:

>  > did anyone have some more color on question (2)  the need to create a
> raw
> > NSScroller and control it like a NSSlider  (min, max, value, proportion)
> is
> > that possible?
>
> Yes, just instantiate it and call initWithFrame.  Then add it to your
> window's content view, which will retain it so you can release it.  Other
> than that, consult the NSScroller docs (and read up on the target/action
> mechanism for NSControls so that you can catch events generated by the
> scroller).
>
> Addendum to my earlier post: requests to draw come though your content
> view's drawRect: method (or said method of any subviews thereof), so yu can
> use that to trigger the drawing of any 'bare metal' widgets.  To force a
> redraw, call setNeedsDisplay or setNeedsDisplayInRect: on your content view.
>
>  I learnt all this stuff by reading about it and by experimenting with my
> toy Cocoa app...  It's a method that works.  Apple's Cocoa framework docs
> are actually very good.  They should all have been installed with Xcode.
>
> Paul Sanders.
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects (PS)

2010-04-26 Thread vincent habchi
Le 26 avr. 2010 à 15:50, Jack Nutting a écrit :

> Well I haven't actually tried it yet, so don't thank me yet!  ;)  The
> docs for "initWithEntity:insertIntoManagedObjectContext :" do include
> the text "If context is not nil, this method..." though, which seems
> to imply that you should be able to send it a nil context. I really
> should try this out myself.

It works. I found myself forced to copy more objects (because when two MOC are 
different you can't establish cross-MOC relationships), but it works allright. 
Now, I've not checked whether the objects get actually freed with a release: 
call. I'll see that with Instruments.

V.___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Paul Sanders
> so in the NSScroler docs there is no way to set the min, max, and value -- 
> that is the problem

http://developer.apple.com/Mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScroller_Class/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instm/NSScroller/setFloatValue:knobProportion:

If you want to support Tiger, you will have to use the deprecated method.  If 
not, don't.

Note that to learn all about class X, you may need to read up on its 
superclass(es).  In this particular instance, NSScroller is a subclass of 
NSControl and many of the things it can do are defined there.

Paul Sanders.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Changing folder attributes

2010-04-26 Thread Jens Alfke

On Apr 26, 2010, at 12:54 AM, Reinhard Segeler wrote:

> my app creates a folder on a MacServer-Volume (FileSharing), but can't change 
> the attributes of that folder using setAttributes:ofItemAtPath:error: . It 
> always receives the error: You do not have appropriate access privileges to 
> save file.

If you try to do the same thing from a shell, using mkdir and chmod, does it 
work or do you get errors?

> I have read and write previliges to the server volume

Are you sure you have the right privileges for the specific parent directory 
you’re creating the folder in?
Also, what type of server is this? AFP?

—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Can't drag a custom data object.

2010-04-26 Thread Jens Alfke

On Apr 26, 2010, at 5:58 AM, Billy Flatman wrote:

> I'm trying to put a custom object into past board in order to perform a drag 
> operation.

You can’t do that, for the same reason you can’t directly write a custom object 
to a file. The pasteboard basically stores bytes, so it has to be able to 
convert what you store in it to and from a stream of bytes. There are a limited 
number of data types it understands — strings, numbers, arrays, dictionaries 
and of course raw data.

>   ** This doesn't (actually stops drag and drop working for my 
> application until I logout).
>   [pboard setData:[items objectAtIndex:0] forType:kOutlineViewGroupType];

You’re passing the wrong type of object to the setData: parameter. Look at the 
header or the docs — it takes an NSData. You’re passing it some other custom 
object. The result is going to be an exception or a crash. (The reason this 
doesn’t produce a warning at compile time is because -objectAtIndex: just 
returns type id, which is compatible with anything (it’s like void* for 
objects.) You have to pay attention to what type of object you know is in the 
array.

If you want to put a custom object in the pasteboard, there are several ways:

(1) Wrap it in an NSValue via [NSValue valueWithPointer:]. This is kind of 
dangerous because you have to make sure the object won’t get dealloced before 
the pointer is eventually used, since -valueWithPointer: doesn’t retain the 
object.
(2) Store some value that refers to the object, like a row number or an access 
key. You have to make sure that value will continue to work, i.e. the row 
number remains correct.
(3) Implement a way to serialize the object into data or a dictionary/array. 
Implementing the NSCopying protocol is a standard way to do that.

The first two techniques are OK for drag-n-drop because the lifetime of the 
pasteboard is limited. If you want to implement copy and paste you probably 
need to go with #3 because the pasteboard could stay around for an arbitrary 
amount of time.

—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: iPad Programming Tutorial

2010-04-26 Thread ML

How about a good book that explains what IB does, how to set delegates, first 
responders, connect things up, etc

I think that misunderstanding prevents me from using IB as much as I really 
should.

- Original Message -
From: "Matt Moriarity" 
To: "Rick Mann" 
Cc: "ML" , "Cocoa-Dev List" 

Sent: Monday, April 26, 2010 7:44:34 AM
Subject: Re: iPad Programming Tutorial

I'm going to have to agree with Rick, IB is the way to go.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


[iPhone] Using iPhone's for development

2010-04-26 Thread Dave

Hi All,

We are thinking of getting a 2G device to test with, I've seen a few  
on eBay etc. that say they have been "Unlocked" and/or "Jailbroken".  
Is it ok to use a phone that has been "hacked" in this way as a  
development iPhone? I've had  quick look on the net and can't seem to  
find a definitive answer.


All the Best
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 arch...@mail-archive.com


Re: iPad Programming Tutorial

2010-04-26 Thread David Rowland

On Apr 26, 2010, at 8:15 AM, ML wrote:

> 
> How about a good book that explains what IB does, how to set delegates, first 
> responders, connect things up, etc
> 
> I think that misunderstanding prevents me from using IB as much as I really 
> should.
> 
> - Original Message -
> From: "Matt Moriarity" 
> To: "Rick Mann" 
> Cc: "ML" , "Cocoa-Dev List" 
> 
> Sent: Monday, April 26, 2010 7:44:34 AM
> Subject: Re: iPad Programming Tutorial
> 
> I'm going to have to agree with Rick, IB is the way to go.

I have avoided IB because I find its operation peculiar and its terminology 
abstract. When I create objects in code I have a much firmer idea of where they 
are, when they come into existence and what I can do with them. IB is yet 
another language to master. and you still have to write a fair amount of custom 
code.___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


[iPhone] File coping application

2010-04-26 Thread Arun
Hi All

Is it possible to copy files form iPhone on to a Mac when iPhone is
connected to USB?
If so how can we achieve this?

Thanks
Arun
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Changing folder attributes

2010-04-26 Thread Reinhard Segeler


Am 26.04.2010 um 16:36 schrieb Jens Alfke:



On Apr 26, 2010, at 12:54 AM, Reinhard Segeler wrote:

my app creates a folder on a MacServer-Volume (FileSharing), but  
can't change the attributes of that folder using  
setAttributes:ofItemAtPath:error: . It always receives the error:  
You do not have appropriate access privileges to save file.


If you try to do the same thing from a shell, using mkdir and chmod,  
does it work or do you get errors?


No problem



I have read and write previliges to the server volume


Are you sure you have the right privileges for the specific parent  
directory you’re creating the folder in?


I have to check that


Also, what type of server is this? AFP?


AFP



—Jens


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: iPad Programming Tutorial

2010-04-26 Thread Klaus Backert


On 26 Apr 2010, at 17:49, David Rowland wrote:


On Apr 26, 2010, at 8:15 AM, ML wrote:



How about a good book that explains what IB does, how to set  
delegates, first responders, connect things up, etc


I think that misunderstanding prevents me from using IB as much as  
I really should.

...

I'm going to have to agree with Rick, IB is the way to go.


I have avoided IB because I find its operation peculiar and its  
terminology abstract. When I create objects in code I have a much  
firmer idea of where they are, when they come into existence and  
what I can do with them. IB is yet another language to master. and  
you still have to write a fair amount of custom code.


One more reason to follow the advice above. And: Apple's documentation  
clearly states the how, where, when, what, etc. of objects created via  
Interface Builder. Read the fine manual! May be, you will recognize  
that IB is not a language but a tool -- it's easier to get a grip --,  
and that you do not have to write a fair amount of custom code. In  
your current situation you just don't know, you only assume.


Klaus

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: iPad Programming Tutorial

2010-04-26 Thread Henry McGilton

On Apr 26, 2010, at 8:15 AM, ML wrote:

> 
> How about a good book that explains what IB does, how to set delegates, first 
> responders, connect things up, etc

Here is an example of making a (simple) iPhone project all in code:

http://www.trilithon.com/download/CodeOnly.zip

There is a Cocoa Resource Programming Gude that covers Interface Builder issues.

Setting delegates is done i the same way as making connections between any 
other pair of
objects.  You control-drag a connection from the object that should have the 
reference (pointer)
to the object being referenced ( pointed at).

In general, you hardly ever need to play with the responder chain.

Connecting things together is as I described above in the context of delegates.


> I think that misunderstanding prevents me from using IB as much as I really 
> should.

An Interface Builder document (xib/nib) is simply a box full of serialised 
(freeze-dried, pickled, embalmed, archived, choose your metaphor)
objects, with connections between them in such a way that they (should, at 
least) form a complete object graph.

Objects in the XIB and on the design surface during design and construction 
time are live objects, 
exactly the same as if you had created them programatically.When you change 
attributes using
Interface Builder's Attributes Inspector, Interface Builder is sending messages 
to those objects, just
as if you had programatically sent those messages from code.  So in the end, 
there is nothing really magic
about Interface Builder.

At application run time, when the time comes to load the NIB using the Bundle 
Loader, the
important tasks that the loading process performs are (1) unarchiving the 
archived objects into memory
to form an object graph, and (2) using the information provided in File's Owner 
plus the already instantiated
'owner' object in the existing application's object graph to join the two 
object graphs together.

There are various (opinionated) factions on the subject of whether or not to 
use Interface Builder.
The choice is entirely yours.

That said, if and when the time cones to locali[sz]e your application, you will 
suddenly discover that
Interface Builder can and will save you tons of otherwise laborious drudge work.

I live to a certain degree in both camps.Doing a iPhone Tab Bar application 
via Interface Builder
I find to be laborious, error-prone, and klunky.But instead of writing 
loads of code, I write an XML
description of the starting architecture in a plist, and dynamically 
instantiate everything at launch time
in a fairly compact loop.

In applications where I need a lot of fiddly and finicky layout, I use 
Interface Builder for what it's good at.

Cheers,
. . . . . . . .Henry




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: 'Build and Analyze' with XCODE 3.2.2

2010-04-26 Thread David Duncan
On Apr 24, 2010, at 1:33 PM, Quincey Morris wrote:

> Also, you should preferably follow the memory management rules about naming 
> methods. Either autorelease gregorian before releasing it, or put "Create" 
> somewhere in your method name.


FYI "Create" is for functions, "new" is for methods. The analyzer won't 
recognize one where the other is proper. There are also adornments you can use 
to override the analyzer's understanding, but I can't recall them right now.
--
David Duncan
Apple DTS Animation and Printing

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: iPad Programming Tutorial

2010-04-26 Thread Henry McGilton

On Apr 26, 2010, at 8:49 AM, David Rowland wrote:

> 
> On Apr 26, 2010, at 8:15 AM, ML wrote:
> 
>> 
>> How about a good book that explains what IB does, how to set delegates, 
>> first responders, connect things up, etc
>> 
>> I think that misunderstanding prevents me from using IB as much as I really 
>> should.
>> 
>> - Original Message -
>> From: "Matt Moriarity" 
>> To: "Rick Mann" 
>> Cc: "ML" , "Cocoa-Dev List" 
>> 
>> Sent: Monday, April 26, 2010 7:44:34 AM
>> Subject: Re: iPad Programming Tutorial
>> 
>> I'm going to have to agree with Rick, IB is the way to go.
> 
> I have avoided IB because I find its operation peculiar and its terminology 
> abstract. When I create objects in code I have a much firmer idea of where 
> they are, when they come into existence and what I can do with them. IB is 
> yet another language to master. and you still have to write a fair amount of 
> custom code.

See my previous post on the subject.

I have found that in general, the one aspect of Interface Builder that baffles 
people the most is that it does not 'Write Code'.
People accustomed to IDEs such as Cafe or JBuilder et al keep insisting on 
'seeing the code'.To me, I  could care less.
When I'm trying to build the flight deck  of a starship, I don't have the time 
to investigate and peruse the detailed metallurgical characteristics
of the fasteners . . .

After that, File's Owner provides its own trouble, I suspect simply because the 
name is/was an unfortunate choice.
Maybe Nib's Owner might have been better.   But File's Owner is easier to come 
to grips with when you realise that
it's simply a connector of sorts to join two object graphs together.

Cheers,
. . . . . . . .Henry


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: 'Build and Analyze' with XCODE 3.2.2

2010-04-26 Thread Kyle Sluder
On Mon, Apr 26, 2010 at 9:24 AM, David Duncan  wrote:
> FYI "Create" is for functions, "new" is for methods. The analyzer won't 
> recognize one where the other is proper. There are also adornments you can 
> use to override the analyzer's understanding, but I can't recall them right 
> now.

They can be found here: http://clang-analyzer.llvm.org/annotations.html

I would advise sticking with the correct naming scheme, rather than
using the annotations to override their meaning. The annotations are
most useful when you have a delegate method that needs to return a
retained reference (-foo:newBar:). The analyzer won't pick up on "new"
anywhere but at the beginning of the method name.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: [iPhone] File coping application

2010-04-26 Thread Kyle Sluder
On Mon, Apr 26, 2010 at 9:04 AM, Arun  wrote:
> Is it possible to copy files form iPhone on to a Mac when iPhone is
> connected to USB?

No.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSTableview background image for column?

2010-04-26 Thread Sean McBride
On Sat, 24 Apr 2010 14:28:02 -0400, Izak van Langevelde said:

>An NSTableView needs a column with one single image, spanning the entire
>column.
>
>I have got this working by setting as the background colour of the
>NSTableView a pattern, consisting of the background image, scaled big
>enough so it does not tile. However, this is somewhat limiting with
>respect to column reordering and resizing.
>
>I considered using an NSImageView next to theNSTableView within the same
>NSScrollView, or making a table cell span all rows, but each of these
>has its own problems.
>
>Any suggestions on how to improve?

Have you looked at:


"ImageBackground shows how to draw an image in the background of an
NSOutlineView and NSTableView..."

Pathetically, searching the sample code section for 'table' does not
reveal this sample. :(

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: [iPhone] File coping application

2010-04-26 Thread Thomas Engelmeier

On 26.04.2010, at 18:04, Arun wrote:

> Is it possible to copy files form iPhone on to a Mac when iPhone is
> connected to USB?
> If so how can we achieve this?

For your personal pleasure: The iPhone is a MTP device, so you can use 
ImageCapture to copy "images" from / to your phone.

If you  don't want Stanza-like trouble and stay in the AppStore:  There is no 
official way.

HTH,
Thomas

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: [iPhone] File coping application

2010-04-26 Thread Mark Ritchie
Hey!

On 26/Apr/2010, at 9:04 AM, Arun wrote:
> Is it possible to copy files form iPhone on to a Mac when iPhone is
> connected to USB?

That depends on what kind of files! ;-)  
(Images for example are easily copied.)
What are you trying to do?
M.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Quincey Morris
On Apr 26, 2010, at 01:43, vincent habchi wrote:

> I need to create a short-lived NSManagedObject; ideally, I'd want it not to 
> be inserted in the Core Data underlying framework, because I need it only 
> during the display of an auxiliary window, and I don't want it saved anyway. 
> I've tried a simple alloc, an alloc and init, but to no avail: It seems to 
> create only the proxy object. Is there a way to do that?

Notwithstanding the discussion in this thread so far, I don't quite understand 
why you wouldn't do this the easy way: create a NSManagedObject in your managed 
context, and delete it when you're done with it.

The documentation explicitly describes the managed context as a "scratch pad", 
where objects can come and go as you need them.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Changing folder attributes

2010-04-26 Thread Jens Alfke

On Apr 26, 2010, at 9:12 AM, Reinhard Segeler wrote:

>>> my app creates a folder on a MacServer-Volume (FileSharing), but can't 
>>> change the attributes of that folder using 
>>> setAttributes:ofItemAtPath:error: . It always receives the error: You do 
>>> not have appropriate access privileges to save file.
>> 
>> If you try to do the same thing from a shell, using mkdir and chmod, does it 
>> work or do you get errors?
> 
> No problem

Hm. Could you show us the code you use to change the attributes?

—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Capturing frames in 64-bits arch

2010-04-26 Thread Ignacio Enriquez
Hi All.

I am working with QTKit.framework and I want to make my application
works in 64 also.
but I am having some troubles when capturing frames in 64bits arch
(from iSight).
I asked the same question in Quicktime-API list but no luck, so, maybe
here I can get some help ;)
( http://lists.apple.com/archives/quicktime-api/2010/Apr/msg00069.html )

The error:
2010-04-18 03:18:51.608 QTCam[7689:c503] *** QTCaptureSession warning:
Session received the following error while decompressing video: Error
Domain=NSOSStatusErrorDomain Code=-12905 "The operation couldn’t be
completed. (OSStatus error -12905.)". Make sure that the formats of
all video outputs are properly configured.

So, I suppose I have to change kCVPixelFormatType_24RGB from
attributes, but 64RGB didn't not work also.

mCaptureDecompressedOutput = [[QTCaptureDecompressedVideoOutput alloc] init];
[mCaptureDecompressedOutput setPixelBufferAttributes:[NSDictionary
dictionaryWithObjectsAndKeys:
 [NSNumber 
numberWithDouble:320.0], (id)kCVPixelBufferWidthKey,
 [NSNumber 
numberWithDouble:240.0], (id)kCVPixelBufferHeightKey,
 [NSNumber 
numberWithUnsignedInt:kCVPixelFormatType_24RGB],
(id)kCVPixelBufferPixelFormatTypeKey, nil]];

So I am stucked here.

BTW:numberWithUnsignedInt:kCVPixelFormatType_24RGB works in 32 bits.


Thanks in advance.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: [iPhone] File coping application

2010-04-26 Thread Ricky Sharp

On Apr 26, 2010, at 11:40 AM, Kyle Sluder wrote:

> On Mon, Apr 26, 2010 at 9:04 AM, Arun  wrote:
>> Is it possible to copy files form iPhone on to a Mac when iPhone is
>> connected to USB?
> 
> No.


Just to add though that you _can_ transfer files via WiFi.  But of course, only 
for those files that your particular app works with.
___
Ricky A. Sharp mailto:rsh...@instantinteractive.com
Instant Interactive(tm)   http://www.instantinteractive.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Joanna Carter
Hi Quincey

> Notwithstanding the discussion in this thread so far, I don't quite 
> understand why you wouldn't do this the easy way: create a NSManagedObject in 
> your managed context, and delete it when you're done with it.


If you are editing a list of objects, using a NSTableView, then one reason why 
you might not want to create temporary objects in the main context is that 
those objects get displayed in the NSTableView, even though you might not want 
them to be visible until the editing is finished.

If you work with the trick of using a secondary context for editing, then you 
have to manage the copying of property values to/from the temporary object, 
including relationships, which have to be resolved from the original context.

Which is why I use a temporary dictionary, because it allows me to freely 
interact with the property values, including relationships, without the need to 
work with a secondary context, as well as not affecting any UI components that 
might be displaying the original list.

Joanna

--
Joanna Carter
Carter Consulting

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Quincey Morris
On Apr 26, 2010, at 11:32, Joanna Carter wrote:

> If you are editing a list of objects, using a NSTableView, then one reason 
> why you might not want to create temporary objects in the main context is 
> that those objects get displayed in the NSTableView, even though you might 
> not want them to be visible until the editing is finished.
> 
> If you work with the trick of using a secondary context for editing, then you 
> have to manage the copying of property values to/from the temporary object, 
> including relationships, which have to be resolved from the original context.
> 
> Which is why I use a temporary dictionary, because it allows me to freely 
> interact with the property values, including relationships, without the need 
> to work with a secondary context, as well as not affecting any UI components 
> that might be displaying the original list.

Yes, I remember the discussion about this scenario: when the managed object 
represents a *future* permanent resident of the Core Data object graph. Outside 
of a discussion of that scenario, I wouldn't necessarily call this a 
"temporary" object.

In the OP's scenario, there is no suggestion he was trying to keep his 
temporary object out of the user interface. (In fact, his later clarification 
suggests the opposite.) That's why I was asking if the simple create it/delete 
it pattern wouldn't 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 arch...@mail-archive.com


Re: Capturing frames in 64-bits arch

2010-04-26 Thread douglas welton
Did you try kCVPixelFormatType_48RGB?

On Apr 26, 2010, at 1:26 PM, Ignacio Enriquez wrote:

> Hi All.
> 
> I am working with QTKit.framework and I want to make my application
> works in 64 also.
> but I am having some troubles when capturing frames in 64bits arch
> (from iSight).
> I asked the same question in Quicktime-API list but no luck, so, maybe
> here I can get some help ;)
> ( http://lists.apple.com/archives/quicktime-api/2010/Apr/msg00069.html )
> 
> The error:
> 2010-04-18 03:18:51.608 QTCam[7689:c503] *** QTCaptureSession warning:
> Session received the following error while decompressing video: Error
> Domain=NSOSStatusErrorDomain Code=-12905 "The operation couldn’t be
> completed. (OSStatus error -12905.)". Make sure that the formats of
> all video outputs are properly configured.
> 
> So, I suppose I have to change kCVPixelFormatType_24RGB from
> attributes, but 64RGB didn't not work also.
> 
> mCaptureDecompressedOutput = [[QTCaptureDecompressedVideoOutput alloc] init];
> [mCaptureDecompressedOutput setPixelBufferAttributes:[NSDictionary
> dictionaryWithObjectsAndKeys:
>[NSNumber 
> numberWithDouble:320.0], (id)kCVPixelBufferWidthKey,
>[NSNumber 
> numberWithDouble:240.0], (id)kCVPixelBufferHeightKey,
>[NSNumber 
> numberWithUnsignedInt:kCVPixelFormatType_24RGB],
> (id)kCVPixelBufferPixelFormatTypeKey, nil]];
> 
> So I am stucked here.
> 
> BTW:numberWithUnsignedInt:kCVPixelFormatType_24RGB works in 32 bits.
> 
> 
> Thanks in advance.
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/douglas_welton%40earthlink.net
> 
> This email sent to douglas_wel...@earthlink.net

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Creating temporary NSManagedObjects

2010-04-26 Thread Joanna Carter
Hi Quincey

> Yes, I remember the discussion about this scenario: when the managed object 
> represents a *future* permanent resident of the Core Data object graph. 
> Outside of a discussion of that scenario, I wouldn't necessarily call this a 
> "temporary" object.
> 
> In the OP's scenario, there is no suggestion he was trying to keep his 
> temporary object out of the user interface. (In fact, his later clarification 
> suggests the opposite.) That's why I was asking if the simple create 
> it/delete it pattern wouldn't work.

I would agree, in that case, it could be equally valid. The only other benefit 
I have found in using a dictionary, with the category, is the simplicity of 
copying the state to and from the original object.

But, I wouldn't make a doctrine out of it :-)

Joanna

--
Joanna Carter
Carter Consulting

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: [iPhone] File coping application

2010-04-26 Thread John Joyce

> Subject: Re: [iPhone] File coping application
> To: Arun 
> Cc: cocoa-dev@lists.apple.com
> Message-ID: <59e8cb02-f49c-4bfb-bffb-fa4fcfb21...@gmail.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> On 26.04.2010, at 18:04, Arun wrote:
> 
>> Is it possible to copy files form iPhone on to a Mac when iPhone is
>> connected to USB?
>> If so how can we achieve this?
> 
> For your personal pleasure: The iPhone is a MTP device, so you can use 
> ImageCapture to copy "images" from / to your phone.
> 
> If you  don't want Stanza-like trouble and stay in the AppStore:  There is no 
> official way.
> 
> HTH,
>   Thomas
Translation: 
 Though "possible", this is in direct violation of the agreement for the iPhone 
OS SDK.

@Thomas,
Correct as you are here, this potentially also could get you bonked off of the 
mailing list.
 ___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Capturing frames in 64-bits arch

2010-04-26 Thread Ignacio Enriquez
Yes I did. It didn't work.
I wonder what I am missing. maybe other additional setting?

On Tue, Apr 27, 2010 at 4:14 AM, douglas welton
 wrote:
> Did you try kCVPixelFormatType_48RGB?
>
> On Apr 26, 2010, at 1:26 PM, Ignacio Enriquez wrote:
>
>> Hi All.
>>
>> I am working with QTKit.framework and I want to make my application
>> works in 64 also.
>> but I am having some troubles when capturing frames in 64bits arch
>> (from iSight).
>> I asked the same question in Quicktime-API list but no luck, so, maybe
>> here I can get some help ;)
>> ( http://lists.apple.com/archives/quicktime-api/2010/Apr/msg00069.html )
>>
>> The error:
>> 2010-04-18 03:18:51.608 QTCam[7689:c503] *** QTCaptureSession warning:
>> Session received the following error while decompressing video: Error
>> Domain=NSOSStatusErrorDomain Code=-12905 "The operation couldn’t be
>> completed. (OSStatus error -12905.)". Make sure that the formats of
>> all video outputs are properly configured.
>>
>> So, I suppose I have to change kCVPixelFormatType_24RGB from
>> attributes, but 64RGB didn't not work also.
>>
>> mCaptureDecompressedOutput = [[QTCaptureDecompressedVideoOutput alloc] init];
>> [mCaptureDecompressedOutput setPixelBufferAttributes:[NSDictionary
>> dictionaryWithObjectsAndKeys:
>>[NSNumber 
>> numberWithDouble:320.0], (id)kCVPixelBufferWidthKey,
>>[NSNumber 
>> numberWithDouble:240.0], (id)kCVPixelBufferHeightKey,
>>[NSNumber 
>> numberWithUnsignedInt:kCVPixelFormatType_24RGB],
>> (id)kCVPixelBufferPixelFormatTypeKey, nil]];
>>
>> So I am stucked here.
>>
>> BTW:numberWithUnsignedInt:kCVPixelFormatType_24RGB works in 32 bits.
>>
>>
>> Thanks in advance.
>> ___
>>
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/douglas_welton%40earthlink.net
>>
>> This email sent to douglas_wel...@earthlink.net
>
>



-- 

慶應義塾大学大学院 理工学研究科
開放環境科学専攻 斎藤英雄研究室
修士2年 Guillermo Ignacio Enriquez G.
e-mail :  nach...@hvrl.ics.keio.ac.jp

_
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


conflict between Core Graphics and NSView graphics

2010-04-26 Thread Bill Appleton
hi all

i converted a bunch of quickdraw code to core graphics successfully -- it
worked

now i am converting a bunch of carbon UI code to cocoa

but when I draw text, my fonts are wrong and my  font sizes are much too big

i am getting the CGContextRef from the NSWindow in the drawRect handler, and
then setting the CG font and size, etc. like before

but it is as if I need to also set the NSFont or something like that

other graphics (lines, bitmaps, etc.) are drawing correctly

can someone shed some light on this and/or point me to some documentation?


thanks,

bill appleton
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread David Duncan
On Apr 26, 2010, at 12:24 PM, Bill Appleton wrote:

> but when I draw text, my fonts are wrong and my  font sizes are much too big
> 
> i am getting the CGContextRef from the NSWindow in the drawRect handler, and
> then setting the CG font and size, etc. like before


Try checking the text matrix. Cocoa Text will often use the text matrix to 
scale rather than setting the font size, so if you do both you get text that is 
way too big. Since the text matrix isn't saved/restored with the GState, this 
can often propagate from other text drawing you don't control (such as for 
other controls).
--
David Duncan
Apple DTS Animation and Printing

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Aki Inoue
Bill,

How are you rendering the text ?

We recommend sticking to Cocoa text rendering API in order to support proper 
Unicode rendering.

Thanks,

Aki

On Apr 26, 2010, at 12:24 PM, Bill Appleton wrote:

> hi all
> 
> i converted a bunch of quickdraw code to core graphics successfully -- it
> worked
> 
> now i am converting a bunch of carbon UI code to cocoa
> 
> but when I draw text, my fonts are wrong and my  font sizes are much too big
> 
> i am getting the CGContextRef from the NSWindow in the drawRect handler, and
> then setting the CG font and size, etc. like before
> 
> but it is as if I need to also set the NSFont or something like that
> 
> other graphics (lines, bitmaps, etc.) are drawing correctly
> 
> can someone shed some light on this and/or point me to some documentation?
> 
> 
> thanks,
> 
> bill appleton
> ___
> 
> 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/aki%40apple.com
> 
> This email sent to a...@apple.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Bill Appleton
hi Aki,

i am using CGContextShowGlyphsWithAdvances

i have a very large amount of core graphics code, i thought it was
compatible with cocoa

i see the text in the right spot but the size is gigantic



thanks,

bill





On Mon, Apr 26, 2010 at 12:34 PM, Aki Inoue  wrote:

> Bill,
>
> How are you rendering the text ?
>
> We recommend sticking to Cocoa text rendering API in order to support
> proper Unicode rendering.
>
> Thanks,
>
> Aki
>
> On Apr 26, 2010, at 12:24 PM, Bill Appleton wrote:
>
> > hi all
> >
> > i converted a bunch of quickdraw code to core graphics successfully -- it
> > worked
> >
> > now i am converting a bunch of carbon UI code to cocoa
> >
> > but when I draw text, my fonts are wrong and my  font sizes are much too
> big
> >
> > i am getting the CGContextRef from the NSWindow in the drawRect handler,
> and
> > then setting the CG font and size, etc. like before
> >
> > but it is as if I need to also set the NSFont or something like that
> >
> > other graphics (lines, bitmaps, etc.) are drawing correctly
> >
> > can someone shed some light on this and/or point me to some
> documentation?
> >
> >
> > thanks,
> >
> > bill appleton
> > ___
> >
> > 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/aki%40apple.com
> >
> > This email sent to a...@apple.com
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Aki Inoue
OK, sounds like you're being affected by the text matrix.

In CG, there are 3 font properties that determine the font rendering: font 
name, font size, and text matrix.
You need to manage all 3.

The easiest approach is to use -[NSFont setInContext:] to let the Cocoa object 
set all 3 properties for you.
Another approach is to reset the text matrix directly using 
CGContextSetTextMatrix.

Note that the translation part (tx and ty components) are directly tied to the 
text position (CGContextSetTextPosition).

You need to reset the text matrix before calling CGContextSetTextPosition, or 
you could just update the text position using CGContextSetTextMatrix.

Aki

On Apr 26, 2010, at 12:39 PM, Bill Appleton wrote:

> hi Aki,
> 
> i am using CGContextShowGlyphsWithAdvances
> 
> i have a very large amount of core graphics code, i thought it was compatible 
> with cocoa
> 
> i see the text in the right spot but the size is gigantic
> 
> 
> 
> thanks,
> 
> bill
> 
> 
> 
> 
> 
> On Mon, Apr 26, 2010 at 12:34 PM, Aki Inoue  wrote:
> Bill,
> 
> How are you rendering the text ?
> 
> We recommend sticking to Cocoa text rendering API in order to support proper 
> Unicode rendering.
> 
> Thanks,
> 
> Aki
> 
> On Apr 26, 2010, at 12:24 PM, Bill Appleton wrote:
> 
> > hi all
> >
> > i converted a bunch of quickdraw code to core graphics successfully -- it
> > worked
> >
> > now i am converting a bunch of carbon UI code to cocoa
> >
> > but when I draw text, my fonts are wrong and my  font sizes are much too big
> >
> > i am getting the CGContextRef from the NSWindow in the drawRect handler, and
> > then setting the CG font and size, etc. like before
> >
> > but it is as if I need to also set the NSFont or something like that
> >
> > other graphics (lines, bitmaps, etc.) are drawing correctly
> >
> > can someone shed some light on this and/or point me to some documentation?
> >
> >
> > thanks,
> >
> > bill appleton
> > ___
> >
> > 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/aki%40apple.com
> >
> > This email sent to a...@apple.com
> 
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Bill Appleton
thanks all!







On Mon, Apr 26, 2010 at 12:50 PM, Aki Inoue  wrote:

> OK, sounds like you're being affected by the text matrix.
>
> In CG, there are 3 font properties that determine the font rendering: font
> name, font size, and text matrix.
> You need to manage all 3.
>
> The easiest approach is to use -[NSFont setInContext:] to let the Cocoa
> object set all 3 properties for you.
> Another approach is to reset the text matrix directly using
> CGContextSetTextMatrix.
>
> Note that the translation part (tx and ty components) are directly tied to
> the text position (CGContextSetTextPosition).
>
> You need to reset the text matrix before calling CGContextSetTextPosition,
> or you could just update the text position using CGContextSetTextMatrix.
>
> Aki
>
> On Apr 26, 2010, at 12:39 PM, Bill Appleton wrote:
>
> hi Aki,
>
> i am using CGContextShowGlyphsWithAdvances
>
> i have a very large amount of core graphics code, i thought it was
> compatible with cocoa
>
> i see the text in the right spot but the size is gigantic
>
>
>
> thanks,
>
> bill
>
>
>
>
>
> On Mon, Apr 26, 2010 at 12:34 PM, Aki Inoue  wrote:
>
>> Bill,
>>
>> How are you rendering the text ?
>>
>> We recommend sticking to Cocoa text rendering API in order to support
>> proper Unicode rendering.
>>
>> Thanks,
>>
>> Aki
>>
>> On Apr 26, 2010, at 12:24 PM, Bill Appleton wrote:
>>
>> > hi all
>> >
>> > i converted a bunch of quickdraw code to core graphics successfully --
>> it
>> > worked
>> >
>> > now i am converting a bunch of carbon UI code to cocoa
>> >
>> > but when I draw text, my fonts are wrong and my  font sizes are much too
>> big
>> >
>> > i am getting the CGContextRef from the NSWindow in the drawRect handler,
>> and
>> > then setting the CG font and size, etc. like before
>> >
>> > but it is as if I need to also set the NSFont or something like that
>> >
>> > other graphics (lines, bitmaps, etc.) are drawing correctly
>> >
>> > can someone shed some light on this and/or point me to some
>> documentation?
>> >
>> >
>> > thanks,
>> >
>> > bill appleton
>> > ___
>> >
>> > 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/aki%40apple.com
>> >
>> > This email sent to a...@apple.com
>>
>>
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


why doesn't the compiler complain?

2010-04-26 Thread Matt Neuburg
I am so confused about something in Objective-C that I thought was perfectly
clear and that I understood perfectly well. Please give me some kind of dope
slap to get my brain back on track.

The Objective-C docs say:

"Methods in different classes that have the same selector (the same name)
must also share the same return and argument types. This constraint is
imposed by the compiler..."

I thought I'd test this assertion, and just the opposite seems to be true:
the compiler isn't imposing any constraints at all. This leaves me confused
about what the rule is.

Here's my test:

@interface MyClass : NSObject {
}
- (void) tryme: (NSString*) s;
@end

@implementation MyClass
- (void) tryme: (NSString*) s {
;
}
@end

@interface MyClass2 : NSObject {
}
- (void) tryme: (NSArray*) s;
@end

@implementation MyClass2
- (void) tryme: (NSArray*) s {
;
}
@end

Those are methods in different classes with the same name but different
argument types, right? Yet that code compiles just fine. What happened to
the constraint imposed by the compiler?

So now let's try actually calling tryme (in yet another class):

MyClass* thing = [[MyClass alloc] init];
NSString* s = @"Howdy";
[(id)thing tryme: s];

This, too, compiles with no problem. Why is the compiler not complaining
that tryme: is ambiguous? Isn't that what it's supposed to do? (That is why
I cast to an id, so that the compiler wouldn't be able to resolve tryme:.)

I must be missing something unbelievably fundamental. What is it? Thx -

m.

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



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: why doesn't the compiler complain?

2010-04-26 Thread Jens Alfke


On Apr 26, 2010, at 1:01 PM, Matt Neuburg wrote:

"Methods in different classes that have the same selector (the same  
name)

must also share the same return and argument types. This constraint is
imposed by the compiler..."


It's more like "should", and the reason is because of the ambiguity of  
sending the message when the receiver type isn't known. In my  
experience you just get a warning when the parser has seen two  
incompatible declarations of the same selector and tries to resolve  
its use in a message to 'id'.



   MyClass* thing = [[MyClass alloc] init];
   NSString* s = @"Howdy";
   [(id)thing tryme: s];

This, too, compiles with no problem. Why is the compiler not  
complaining
that tryme: is ambiguous? Isn't that what it's supposed to do? (That  
is why
I cast to an id, so that the compiler wouldn't be able to resolve  
tryme:.)


I would also expect a warning there. Had the parser seen both MyClass  
and MyClass2's interfaces by that point, i.e. did you #import both of  
their headers?


—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: why doesn't the compiler complain?

2010-04-26 Thread Greg Parker
On Apr 26, 2010, at 1:01 PM, Matt Neuburg wrote:
> I am so confused about something in Objective-C that I thought was perfectly
> clear and that I understood perfectly well. Please give me some kind of dope
> slap to get my brain back on track.
> 
> The Objective-C docs say:
> 
> "Methods in different classes that have the same selector (the same name)
> must also share the same return and argument types. This constraint is
> imposed by the compiler..."

Note "imposed" by the compiler, not "enforced". 

The restriction exists because different parameter types can be passed in 
different ways at the machine code level. If the call site uses one set of 
parameter types and the implementation uses another set of types, then you may 
crash or get mangled data. 

On the other hand, sometimes you get mismatched types that are not-unsafe or 
even desirable, thanks to Objective-C's duck-typing ability. So "must" in the 
docs is merely "should", if you're careful.


> I thought I'd test this assertion, and just the opposite seems to be true:
> the compiler isn't imposing any constraints at all. This leaves me confused
> about what the rule is.
> 
> Here's my test:
> 
> - (void) tryme: (NSString*) s;
[...]
> - (void) tryme: (NSArray*) s;
> 
> Those are methods in different classes with the same name but different
> argument types, right? Yet that code compiles just fine. What happened to
> the constraint imposed by the compiler?
> 
> So now let's try actually calling tryme (in yet another class):
> 
>MyClass* thing = [[MyClass alloc] init];
>NSString* s = @"Howdy";
>[(id)thing tryme: s];
> 
> This, too, compiles with no problem. Why is the compiler not complaining
> that tryme: is ambiguous? Isn't that what it's supposed to do? (That is why
> I cast to an id, so that the compiler wouldn't be able to resolve tryme:.)

In this test, the mismatch is an NSString* parameter vs an NSArray* parameter. 
That mismatch is "safe": the compiled code for the call site looks the same 
either way. The compiler does not warn about this by default. 

If you turn on -Wstrict-selector-match for this test, you do get a warning:

% cc -c test.m
(no warning)
% cc -c test.m -Wstrict-selector-match
test.m: In function ‘main’:
test.m:30: warning: multiple methods named ‘-tryme:’ found
test.m:5: warning: using ‘-(void)tryme:(NSString *)s’
test.m:16: warning: also found ‘-(void)tryme:(NSArray *)s’

The compiler warns more aggressively for mismatches that do affect the call 
site's code. Those are more likely to be actual bugs, rather than correct but 
loosely-typed code. For example, if you change your example's parameter types 
to NSString* vs int, you'll get the warning even without any extra warning 
flags.

% cc -c test.m 
test.m: In function ‘main’:
test.m:30: warning: multiple methods named ‘-tryme:’ found
test.m:5: warning: using ‘-(void)tryme:(NSString *)s’
test.m:16: warning: also found ‘-(void)tryme:(int)s’


-- 
Greg Parker  gpar...@apple.com Runtime Wrangler


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Jens Alfke


On Apr 26, 2010, at 12:50 PM, Aki Inoue wrote:

In CG, there are 3 font properties that determine the font  
rendering: font name, font size, and text matrix.

You need to manage all 3.


Is the text matrix just used for special effects like obliquing? Using  
it to scale the text could produce the wrong results if the font has  
behaviors that are nonlinear with the point size, since those  
behaviors would be based on the font size not the scaling in the text  
matrix.


In other words, it's possible that a glyph at 24pt is not identical to  
the same glyph at 12pt scaled up by a factor of 2. Some fonts change  
their proportions and stroke widths at different point sizes to  
improve legibility. (This "optical scaling" was actually common in the  
days of metal type, vanished with optical and computer typesetting,  
and has I believe returned with OpenType.)


The thing developers need to keep in mind is that, if you're drawing  
12pt text that's been zoomed in to 200%, you should keep the font size  
at 12 and scale the drawing coords by 2, instead of just changing the  
font size to 24.


—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: [iPhone] File coping application

2010-04-26 Thread Jens Alfke
Copying files while docked can be done with iPhone OS 3.2 (i.e. on the  
iPad). This is how you import/export iWork documents, for example, or  
get PDFs into apps like GoodReader. But it can't be done under control  
of the app, or even in the Finder — currently the user has to go  
through a really hard-to-find and limited UI in iTunes. (It's one of  
the worst user experiences I've seen come out of Apple in a long time,  
and I hope they fix it ASAP.)


—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Aki Inoue
We always us the text matrix instead of font size.

While it is true that the advancements and glyph outline could be affected by 
the font point size down in the font system, the CG graphics model doesn't work 
that way.

What we recommend is to stick to the Cocoa Text System that tries very hard to 
keep these inconsistencies hidden from the apps 8-).

Aki

On Apr 26, 2010, at 1:29 PM, Jens Alfke wrote:

> 
> On Apr 26, 2010, at 12:50 PM, Aki Inoue wrote:
> 
>> In CG, there are 3 font properties that determine the font rendering: font 
>> name, font size, and text matrix.
>> You need to manage all 3.
> 
> Is the text matrix just used for special effects like obliquing? Using it to 
> scale the text could produce the wrong results if the font has behaviors that 
> are nonlinear with the point size, since those behaviors would be based on 
> the font size not the scaling in the text matrix.
> 
> In other words, it's possible that a glyph at 24pt is not identical to the 
> same glyph at 12pt scaled up by a factor of 2. Some fonts change their 
> proportions and stroke widths at different point sizes to improve legibility. 
> (This "optical scaling" was actually common in the days of metal type, 
> vanished with optical and computer typesetting, and has I believe returned 
> with OpenType.)
> 
> The thing developers need to keep in mind is that, if you're drawing 12pt 
> text that's been zoomed in to 200%, you should keep the font size at 12 and 
> scale the drawing coords by 2, instead of just changing the font size to 24.
> 
> —Jens

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


NSManagedObject, retain count and dealloc:

2010-04-26 Thread vincent habchi
Hi again,

I am unable to see a NSManagedObject go through the dealloc: method, even after 
its removal from the MOC. It seems these objects are created after a 
initWithEntity:insertIntoMOC: with an initial retain count of 2, and, of 
course, it is impossible to make the retain count (by honest means) drop below 
2. Is this normal expected behavior?

Thanks,
Vincent___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSManagedObject, retain count and dealloc:

2010-04-26 Thread Sean McBride
On Mon, 26 Apr 2010 23:14:04 +0200, vincent habchi said:

>I am unable to see a NSManagedObject go through the dealloc: method,
>even after its removal from the MOC. It seems these objects are created
>after a initWithEntity:insertIntoMOC: with an initial retain count of 2,
>and, of course, it is impossible to make the retain count (by honest
>means) drop below 2. Is this normal expected behavior?

Probably.  Why do you ask?  What do you want to do in dealloc?  Do you
know about willTurnIntoFault?

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSManagedObject, retain count and dealloc:

2010-04-26 Thread Joanna Carter
Hi Vincent

> I am unable to see a NSManagedObject go through the dealloc: method, even 
> after its removal from the MOC. It seems these objects are created after a 
> initWithEntity:insertIntoMOC: with an initial retain count of 2, and, of 
> course, it is impossible to make the retain count (by honest means) drop 
> below 2. Is this normal expected behavior?

The docs state that the MOC retains a reference to the MO until it is saved, so 
with the reference you are holding, that should make 2.

Joanna

--
Joanna Carter
Carter Consulting

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


white screen windows at first

2010-04-26 Thread Bill Appleton
hi all,

when my windows are first shown there is no drawing inside, they are white

but when i slowly move the mouse over to the close box and the close box
responds to the mouse hover suddenly they draw their content properly

does this ring any bells with people? i'm not sure where to look in the docs
for this one

i have properly subclassed the NSView and the drawRect message is working...
do i need to do something else when I first show a window?




thanks,

bill appleton
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: white screen windows at first

2010-04-26 Thread Nick Zitzmann

On Apr 26, 2010, at 3:35 PM, Bill Appleton wrote:

> when my windows are first shown there is no drawing inside, they are white
> 
> but when i slowly move the mouse over to the close box and the close box
> responds to the mouse hover suddenly they draw their content properly
> 
> does this ring any bells with people?

Are you ordering your windows in the main thread, or in another thread or block?

Nick Zitzmann


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: white screen windows at first

2010-04-26 Thread Paul Sanders
It sounds like [NSWindow flushWindow] isn't getting called. 
Nothing is sent to the window server until that happens.  In a 
'normal' Cocoa app, this is taken care of in the event loop but 
in your case that evidently isn't happening.  It might be good 
enough just to call it at the end of your drawRect: method, but 
calling it too often hurts performance and, depending on exactly 
what is being drawn when, can cause 'screen flash'.

Paul Sanders.

- Original Message - 
From: "Bill Appleton" 
To: "cocoa-dev list" 
Sent: Monday, April 26, 2010 10:35 PM
Subject: white screen windows at first


hi all,

when my windows are first shown there is no drawing inside, they 
are white

but when i slowly move the mouse over to the close box and the 
close box
responds to the mouse hover suddenly they draw their content 
properly

does this ring any bells with people? i'm not sure where to look 
in the docs
for this one

i have properly subclassed the NSView and the drawRect message 
is working...
do i need to do something else when I first show a window?

thanks,

bill appleton



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: white screen windows at first

2010-04-26 Thread Bill Appleton
they are all in a single thread, but it is like this

[NSApplication sharedApplication];

init a bunch of stuff

create a bunch of windows and show them

 [NSApp run];

is this causing the issue?



thx

bill









On Mon, Apr 26, 2010 at 2:40 PM, Nick Zitzmann  wrote:

>
> On Apr 26, 2010, at 3:35 PM, Bill Appleton wrote:
>
> > when my windows are first shown there is no drawing inside, they are
> white
> >
> > but when i slowly move the mouse over to the close box and the close box
> > responds to the mouse hover suddenly they draw their content properly
> >
> > does this ring any bells with people?
>
> Are you ordering your windows in the main thread, or in another thread or
> block?
>
> Nick Zitzmann
> 
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: white screen windows at first

2010-04-26 Thread Bill Appleton
i added flush window to the drawRect method -- no help

it IS calling draw rect right before the window is shown & then you see it
--- all white



thx

bill





On Mon, Apr 26, 2010 at 2:47 PM, Paul Sanders wrote:

> It sounds like [NSWindow flushWindow] isn't getting called.
> Nothing is sent to the window server until that happens.  In a
> 'normal' Cocoa app, this is taken care of in the event loop but
> in your case that evidently isn't happening.  It might be good
> enough just to call it at the end of your drawRect: method, but
> calling it too often hurts performance and, depending on exactly
> what is being drawn when, can cause 'screen flash'.
>
> Paul Sanders.
>
> - Original Message -
> From: "Bill Appleton" 
> To: "cocoa-dev list" 
> Sent: Monday, April 26, 2010 10:35 PM
> Subject: white screen windows at first
>
>
> hi all,
>
> when my windows are first shown there is no drawing inside, they
> are white
>
> but when i slowly move the mouse over to the close box and the
> close box
> responds to the mouse hover suddenly they draw their content
> properly
>
> does this ring any bells with people? i'm not sure where to look
> in the docs
> for this one
>
> i have properly subclassed the NSView and the drawRect message
> is working...
> do i need to do something else when I first show a window?
>
> thanks,
>
> bill appleton
>
>
>
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSManagedObject, retain count and dealloc:

2010-04-26 Thread Kyle Sluder
On Mon, Apr 26, 2010 at 2:14 PM, vincent habchi  wrote:
> I am unable to see a NSManagedObject go through the dealloc: method, even 
> after its removal from the MOC. It seems these objects are created after a 
> initWithEntity:insertIntoMOC: with an initial retain count of 2, and, of 
> course, it is impossible to make the retain count (by honest means) drop 
> below 2. Is this normal expected behavior?

As far as you're concerned, it's perfectly valid behavior for every
object in your application to never see -dealloc called, ever. As long
as you are playing by the memory management rules, you shouldn't care
one whit about when -dealloc is called. Those who work with -finalize
in a GC environment are already familiar with this drill.

If your object is holding on to some resource which you need it to
release, write a method called -invalidate or -letGoOfImportantThing
or something and call that at a deterministic time.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: why doesn't the compiler complain?

2010-04-26 Thread Matt Neuburg
On or about 4/26/10 1:22 PM, thus spake "Greg Parker" :

> On Apr 26, 2010, at 1:01 PM, Matt Neuburg wrote:
>> Here's my test:
>> MyClass:
>> - (void) tryme: (NSString*) s;
>> MyClass2:
>> - (void) tryme: (NSArray*) s;
>>MyClass* thing = [[MyClass alloc] init];
>>NSString* s = @"Howdy";
>>[(id)thing tryme: s];
>> 
> In this test, the mismatch is an NSString* parameter vs an NSArray* parameter.
> That mismatch is "safe": the compiled code for the call site looks the same
> either way. The compiler does not warn about this by default.

Thanks for this extensive reply; it taught me a lot.

Here's something interesting. If I reverse the declaration order of MyClass
and MyClass2, like this:

>> MyClass2:
>> - (void) tryme: (NSArray*) s;
>> MyClass:
>> - (void) tryme: (NSString*) s;
>>MyClass* thing = [[MyClass alloc] init];
>>NSString* s = @"Howdy";
>>[(id)thing tryme: s];

...Now the compiler *does* complain about that last line - it ways I'm
passing a string when an array was expected.

So I guess the compiler treats the *first* declaration of a method
name-and-signature that it encounters as the "real" one.

Now, that's okay, I guess (especially since there's a warning I can turn on
to detect even this level of conflict - thanks for explaining about that),
as long as the compiler is correctly foreshadowing the behavior of the
runtime. I take it from what you say about the compiled code being the same
that it is... m.

-- 
matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Mike Abdullah

On 26 Apr 2010, at 20:24, Bill Appleton wrote:

> hi all
> 
> i converted a bunch of quickdraw code to core graphics successfully -- it
> worked
> 
> now i am converting a bunch of carbon UI code to cocoa
> 
> but when I draw text, my fonts are wrong and my  font sizes are much too big
> 
> i am getting the CGContextRef from the NSWindow in the drawRect handler, and
> then setting the CG font and size, etc. like before

Further to the other answers, this part surprises me. I think you want 
[[NSGraphicsContext currentContext] graphicsPort] instead to get to the 
CGContext.

Mike.___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


-[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSDictionaryController)

2010-04-26 Thread Jack Repenning
One of my testers (and, naturally, none of the test systems I can get my hands 
on) reports this Console error when performing a certain operation:

 -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class 
(NSDictionaryController)

I think I sorta know what some of it means, but I'm not sure about it all.

I think it means NSKeyedUnarchiver had trouble. I think NSKeyedUnarchiver is 
probably involved in instantiating my nib. The nib involved in the failing 
operation does, indeed, have an NSDictionaryController. I guess that the fact 
that the message mentions that (relatively unusual) class means 
NSKeyedUnarchiver found the nib, and made at least a bit of sense of it all.

But, does this mean "I found your NSDictionaryController, but something's wrong 
with it and I can't decode it"? That is, something busted inside my NSDC?

Or, does it mean "I know I'm supposed to be looking for an NSDC, but dang if I 
can find the bugger"? That is, is there a platform version consideration here?  
The tester with the troubles runs Tiger; I build on Snow Leopard using SDK 
10.4u and deployment target 10.4. I haven't heard from any other Tiger testers, 
troubled or not, so perhaps this is an SL->Tiger versionitis issue? But 
not-so-very-long-ago builds, from this same configuration, work for this 
tester, so that seems ruled out. Is Tiger simply not expected to grok Snow 
Leopard NSDCs?


-==-
Jack Repenning
jackrepenn...@tigris.org
Project Owner
SCPlugin
http://scplugin.tigris.org
"Subversion for the rest of OS X"


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSDictionaryController)

2010-04-26 Thread Nick Zitzmann

On Apr 26, 2010, at 5:23 PM, Jack Repenning wrote:

> One of my testers (and, naturally, none of the test systems I can get my 
> hands on) reports this Console error when performing a certain operation:
> 
> -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class 
> (NSDictionaryController)
[...]
> But, does this mean "I found your NSDictionaryController, but something's 
> wrong with it and I can't decode it"? That is, something busted inside my 
> NSDC?

No.

> Or, does it mean "I know I'm supposed to be looking for an NSDC, but dang if 
> I can find the bugger"? That is, is there a platform version consideration 
> here?  The tester with the troubles runs Tiger; I build on Snow Leopard using 
> SDK 10.4u and deployment target 10.4. I haven't heard from any other Tiger 
> testers, troubled or not, so perhaps this is an SL->Tiger versionitis issue? 
> But not-so-very-long-ago builds, from this same configuration, work for this 
> tester, so that seems ruled out. Is Tiger simply not expected to grok Snow 
> Leopard NSDCs?

It's not expected to grok NSDCs at all. The class documentation states that the 
class was added in Leopard.

Nick Zitzmann


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: conflict between Core Graphics and NSView graphics

2010-04-26 Thread Bill Appleton
that CGContextRef is the same as [[thewind graphicsContext] graphicsPort] in
the scope if the drawRect routine

(i am away from that machine, the code is probably wrong, but you can see
what i mean)

so the two methods return the same context





On Mon, Apr 26, 2010 at 3:58 PM, Mike Abdullah wrote:

>
> On 26 Apr 2010, at 20:24, Bill Appleton wrote:
>
> > hi all
> >
> > i converted a bunch of quickdraw code to core graphics successfully -- it
> > worked
> >
> > now i am converting a bunch of carbon UI code to cocoa
> >
> > but when I draw text, my fonts are wrong and my  font sizes are much too
> big
> >
> > i am getting the CGContextRef from the NSWindow in the drawRect handler,
> and
> > then setting the CG font and size, etc. like before
>
> Further to the other answers, this part surprises me. I think you want
> [[NSGraphicsContext currentContext] graphicsPort] instead to get to the
> CGContext.
>
> Mike.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSDictionaryController)

2010-04-26 Thread Chris Parker
Hi Jack,

On 26 Apr 2010, at 4:23 PM, Jack Repenning wrote:

> One of my testers (and, naturally, none of the test systems I can get my 
> hands on) reports this Console error when performing a certain operation:
> 
> -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class 
> (NSDictionaryController)
> 
> I think I sorta know what some of it means, but I'm not sure about it all.
> 
> I think it means NSKeyedUnarchiver had trouble. I think NSKeyedUnarchiver is 
> probably involved in instantiating my nib. The nib involved in the failing 
> operation does, indeed, have an NSDictionaryController. I guess that the fact 
> that the message mentions that (relatively unusual) class means 
> NSKeyedUnarchiver found the nib, and made at least a bit of sense of it all.
> 
> But, does this mean "I found your NSDictionaryController, but something's 
> wrong with it and I can't decode it"? That is, something busted inside my 
> NSDC?
> 
> Or, does it mean "I know I'm supposed to be looking for an NSDC, but dang if 
> I can find the bugger"?

It's this one. Well, it means "Hey, I found one, but I don't know how to unpack 
it."

>  That is, is there a platform version consideration here?  The tester with 
> the troubles runs Tiger; I build on Snow Leopard using SDK 10.4u and 
> deployment target 10.4. I haven't heard from any other Tiger testers, 
> troubled or not, so perhaps this is an SL->Tiger versionitis issue? But 
> not-so-very-long-ago builds, from this same configuration, work for this 
> tester, so that seems ruled out. Is Tiger simply not expected to grok Snow 
> Leopard NSDCs?

Tiger is (as you note) 10.4/10.4u; NSDictionaryController is tagged as being 
available in 10.5 (Leopard) and later.

So Tiger's unarchiver doesn't know what to do with an archived 
NSDictionaryController. There's a setting in Interface Builder which should 
warn you about this kind of thing - if you're setting the deployment target for 
the nib correctly then IB should warn you that you're encoding something that 
10.4 knows nothing about.

.chris

-- 
Chris Parker
iPhone (formerly Cocoa) Frameworks
Apple Inc.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSDictionaryController)

2010-04-26 Thread Jack Repenning
On Apr 26, 2010, at 4:34 PM, Chris Parker wrote:

> if you're setting the deployment target for the nib correctly then IB should 
> warn you that you're encoding something that 10.4 knows nothing about.

Ah, swell ... yet one more spot to configure this. With your help, I found "nib 
info" in IB, with a "Deployment Target" list, currently set to 10.5, and 
correcting it to 10.4 produces an error, just as you say.

It seems like there ought to be a single central place to set deployment 
target, is there not? Is the fact that I somehow got mis-matched target 
settings in Xcode and IB worth a bug report? Bearing in mind that I may not be 
able to give solid historical info: this project has been under development 
since OS X 10.2, with multiple tool-chain upgrades, reconfigurations, and the 
like; I could imagine that some sequences of UI interactions would legitimately 
reach this confused state, and I certainly couldn't deny doing them.

-==-
Jack Repenning
jackrepenn...@tigris.org
Domain Administrator
http://www.tigris.org




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: white screen windows at first

2010-04-26 Thread Fritz Anderson
On 26 Apr 2010, at 5:04 PM, Bill Appleton wrote:

> they are all in a single thread, but it is like this
> 
> [NSApplication sharedApplication];
> 
> init a bunch of stuff
> 
> create a bunch of windows and show them
> 
> [NSApp run];
> 
> is this causing the issue?

What backing type are you setting for your windows? NSBackingStoreBuffered (or 
"Buffered" in the Memory section of the IB attributes inspector for the window) 
is the only legal type any more. 

— F

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSDictionaryController)

2010-04-26 Thread Chris Parker

On 26 Apr 2010, at 5:03 PM, Jack Repenning wrote:

> On Apr 26, 2010, at 4:34 PM, Chris Parker wrote:
> 
>> if you're setting the deployment target for the nib correctly then IB should 
>> warn you that you're encoding something that 10.4 knows nothing about.
> 
> Ah, swell ... yet one more spot to configure this. With your help, I found 
> "nib info" in IB, with a "Deployment Target" list, currently set to 10.5, and 
> correcting it to 10.4 produces an error, just as you say.
> 
> It seems like there ought to be a single central place to set deployment 
> target, is there not?

That'd be nice. :)

> Is the fact that I somehow got mis-matched target settings in Xcode and IB 
> worth a bug report?

Absolutely. At present, I don't think there's anything automagic happening to 
keep that in sync. Please file a bug.

> Bearing in mind that I may not be able to give solid historical info: this 
> project has been under development since OS X 10.2, with multiple tool-chain 
> upgrades, reconfigurations, and the like; I could imagine that some sequences 
> of UI interactions would legitimately reach this confused state, and I 
> certainly couldn't deny doing them.

Our tool chain shouldn't be making this sort of thing any harder or more 
confusing than it already is. It seems completely reasonable to me that if I've 
set my Xcode project's deployment target to the 10.4u SDK, then the resources I 
create for that project should track the project.

.chris

-- 
Chris Parker
iPhone Frameworks
Apple Inc.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Charles Srstka
On Apr 26, 2010, at 9:32 AM, Paul Sanders wrote:

> If you want to support Tiger, you will have to use the deprecated method.  If 
> not, don't.

You don’t *have* to use the deprecated method — you can simply test for the OS 
X version and only use the deprecated method if the version is lower than 10.5.

Charles___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


question about "read-only" rule for Memory Management

2010-04-26 Thread Philip Mobley
Assume that an array of images is loaded at the start of the app.  

There are a number of views which will be displaying multiple "copies" of the 
image, but they will be accessing the image array as a read-only property, and 
I do not plan to have these views adjust the reference count for each image.  

Question:  is the BELOW method named appropriately?

- (UIImage *) getImageWithTag:(NSString *)tag;

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Bill Appleton
are you saying there is a way to set the min, max and value on an
nsscroller? sorry, not clear on that


thx

bill




On Mon, Apr 26, 2010 at 6:46 PM, Charles Srstka wrote:

> On Apr 26, 2010, at 9:32 AM, Paul Sanders wrote:
>
> If you want to support Tiger, you will have to use the deprecated method.
> If not, don't.
>
>
> You don’t *have* to use the deprecated method — you can simply test for the
> OS X version and only use the deprecated method if the version is lower than
> 10.5.
>
> Charles
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: question about "read-only" rule for Memory Management

2010-04-26 Thread Jens Alfke

On Apr 26, 2010, at 6:57 PM, Philip Mobley wrote:

> Question:  is the BELOW method named appropriately?
> 
> - (UIImage *) getImageWithTag:(NSString *)tag;

Usually Cocoa method names drop the “get” prefix, so ideally the name would 
just be “imageWithTag:”.

But yes, there’s no need to say “copy” since you’re not creating copies of the 
images. (And even if you were, you could just autorelease them before returning 
them, so the caller wouldn’t have to worry about releasing them; so you 
wouldn’t need to call it out in the method name.)

—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: NSApplicationMain question

2010-04-26 Thread Jens Alfke

On Apr 26, 2010, at 7:13 PM, Bill Appleton wrote:

> are you saying there is a way to set the min, max and value on an
> nsscroller? sorry, not clear on that

Um, yes; just use the accessors inherited from NSControl.

—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


awakeFromFetch Called Multiple Times

2010-04-26 Thread Milen Dzhumerov
Hi all,

I've been under the impression that awakeFromFetch / awakeFromInsert were 
supposed to be called in pairs with will/didTurnIntoFault (i.e., never have two 
consecutive awakeX calls). I'm now observing that awakeFromFetch is getting 
called twice in succession during a context merge and just wanted to ask 
whether it's normal for me to expect that behaviour (multiple awakeX calls in 
succession)? The docs do not mention anything specific on the subject.

Thanks,
M

Backtrace 1: 
http://dl.dropbox.com/u/645995/Screen%20shot%202010-04-26%20at%2010.43.40.png
Backtrace 2: 
http://dl.dropbox.com/u/645995/Screen%20shot%202010-04-26%20at%2010.43.56.png___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


How to add search filters like those in Finder?

2010-04-26 Thread Maya Trifonova

Hi all,

I need to implement add/remove filters for search results like those  
in Finder with the "+" and "-" and "save search" buttons (Those that  
appear under the spotlite search field when something is typed in it).  
When the "+" button is pushed another filter appears with popup  
buttons like "Kind", "Last open date", "Last modified date". When the  
"-" is pushed the filter disappears.


My question is.. what kind of cocoa UI element is the whole line (with  
the add/remove buttons and popup buttons) and how should I implement  
showing and hiding? I couldn't find sample code with similar UI  
elements.


Regards,
Maya



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: iPad Programming Tutorial

2010-04-26 Thread Matt Moriarity
I'm going to have to agree with Rick, IB is the way to go.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Make About window respond to ⌘W in UI-less app lication

2010-04-26 Thread Michael Dippery
I'm building a Cocoa application that runs as an item in the status bar, and 
I'm using LSUIElement to prevent the app's icon from appearing in the Dock. 
This application has an About window and an item to activate that window, using 
the standard Cocoa mechanism for doing so (that is, -[NSApplication 
orderFrontStandardAboutPanel:]).

It works great except for one thing: unlike most About windows, it shows up 
_underneath_ all other windows, rather than on top. I worked around this by 
creating an IBAction in my app's controller that first brings the app to the 
front, and then shows the window, like so:

- (IBAction)orderFrontStandardAboutPanel:(id)sender
{
[NSApp activateIgnoringOtherApps:YES];
[NSApp orderFrontStandardAboutPanel:sender];
}

This causes the About window to appear on top of other windows, but the window 
does not respond to the ⌘W keyboard event; instead, I just get the system alert 
beep, indicating that nothing is in place to handle the event. Since I don't 
have a reference to the About window (as it's created by NSApplication) I can't 
figure out how to hook up a mechanism for handling the keyboard event, and it 
doesn't seem to get passed to my app controller, even though it's a delegate of 
NSApp (if I understand the responder chain correctly, NSApp will pass some 
unhandled events on to its delegate).

Is there a way to get the About window to respond to ⌘W?


Thanks,




Michael Dippery
mdipp...@gmail.com | www.monkey-robot.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


Re: Make About window respond to ⌘W in UI-le ss application

2010-04-26 Thread Kyle Sluder
On Mon, Apr 26, 2010 at 3:21 PM, Michael Dippery  wrote:
> Is there a way to get the About window to respond to ⌘W?

If you're an LSUIElement app, you don't have a menu bar. Therefore you
don't get to respond to menu key equivalents.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

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

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


  1   2   >