Re: sync core-data store between OS X and iOS

2010-08-26 Thread Martin Hewitson

On Aug 26, 2010, at 6:39 AM, Nick Zitzmann wrote:

 
 On Aug 25, 2010, at 10:07 PM, Martin Hewitson wrote:
 
 I just wanted to confirm what I've read. Basically, it seems to be true that 
 there is currently no official apple API which allows one to sync a 
 core-data store between OS X and iOS. Am I correct in this statement?
 
 Yes, you are.

That's what I feared. Too bad. How are others doing this then? Or are they not? 
I couldn't find any 3rd party solutions - only ones that work over bonjour 
which typically have the 'same network' problem.

Martin

 
 Nick Zitzmann
 http://www.chronosnet.com/
 
 
 


Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer 
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: martin.hewit...@aei.mpg.de
WWW: http://www.aei.mpg.de/~hewitson






___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


Performance issue

2010-08-26 Thread Vijayakumar_Thota
Dear list,

I am working on the performance issues of an application. I am facing a 
difficulty in finding out how many times a method is called in different 
contexts.

Suppose there is a method called 'setItem'. I need the report which tells 
something like the method 'setItem' is called 12 times at runtime in specific 
event action.

Is there any tool in MAC which gives the report on how many times a method is 
called. I have seen the different templates in instruments tool, but I am not 
getting, which will give the right solution.

Please share any information if you have something or correct me if anything I 
am doing wrong.

Thanks,
vijay

Mahindra Satyam powered IT for the 2010 FIFA World Cup(TM).
To learn more, visit: www.mahindrasatyam.com/fifa/index.asp


DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.
___

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

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

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

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


[OT]making app new modules display from within the app and not from the app store.

2010-08-26 Thread Gustavo Pizano


Hello all, I know this isn't the right place so please don't behead me if I 
offend you, but if you could help me, Im will be happy to hear you.

We are developing an application with interactive children modules. The idea is 
that each time a new module is ready it will be submitted to Apple for approval 
and then our app and only our app should display the new module. But then when 
you buy it will take you to the app store and then it will download it to our 
app bundle.

As an example the MacUser app which they post their magazines, and then you can 
buy individually each magazine, but if you try to to search for a single 
magazine in the app store you don't find it, BUT once form within the app click 
a specific magazine, the app store opens and you can download the magazine.

Is there any kind of special agreement between the developer company and Apple?

Thanks I hope somebody can give me a clue on what shall we do.


Gustavo
 
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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 scope

2010-08-26 Thread Eric E. Dolecki
This is a noob question I'm sure.

I have a rootViewController. In it is a NSString thats been declared. The
rootViewController pushes another view onto the NavigationViewController...
loading that view. I'd like the loaded view to be able to access that string
variable. However, I am currently getting a null for it.


*RootViewController*


- (void)viewDidLoad {
myString = @foo;

}

- (NSString *)getString {
return myString;
}

- (void)displaySecondView:(id)sender {
UIViewController *menuViewController = [[MenuViewController alloc]
init];
menuViewController.title = @Menu;
self.navigationItem.backBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:@Now Playing
 style: UIBarButtonItemStyleBordered
target:nil
action:nil];
[self.navigationController pushViewController:menuViewController
animated:YES];
[menuViewController release];
}

*And now the view being pushed...
*
in the .h I import RootViewController

RootViewController *rootViewController

@property(nonatomic,retain) RootViewController *rootViewController
--
in the .m

@synthesize rootViewController

- (void)viewDidLoad {
NSString *tmp = [rootViewController getSourceLabel];
NSLog(@%@,tmp); // (null)
}

All I want to do is access methods in the RootViewController...







Interactive Designer and Developer
Google Voice: (508) 656-0622
http://blog.ericd.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: NSCoding between iOS and Mac OS X

2010-08-26 Thread Nathan Day
What about binary property lists, they should be interchangeable between iOS 
and Mac OS X?

On 26/08/2010, at 1:29 AM, Ricky Sharp wrote:

 A similar question came up recently. 
 
 While some objects (e.g. NSNumber) things should be binary compatible. But 
 you may run into issues.
 
 Also depends upon what objects you are coding. Mac OS X uses NSColor whereas 
 iOS uses UIColor. 
 
 I would recommend using an intermediate normalized format instead. Then write 
 independent code for each platform. 
 
 If archiving colors, capture normalized values like color mode (ARGB, HSL), 
 color components, etc. Then, rebuild up objects as needed. 
 
 For text data, I would use UTF-8 with the original text being normalized. 
 
 Sent from my iPhone
 
 On Aug 25, 2010, at 8:43 AM, Nathan Day nathan_...@mac.com wrote:
 
 Does anybody know whether NSCoding can be used to transfer data between iOS 
 and Mac OS X. Is this documented as guaranteed to work. I have tried to do a 
 google search but I got nothing, probably searching for the wrong thing.
 
 Nathan Day
 http://homepage.mac.com/nathan_day/
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/rsharp%40mac.com
 
 This email sent to rsh...@mac.com

Nathan Day
http://homepage.mac.com/nathan_day/

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: Performance issue

2010-08-26 Thread Uli Kusterer
On Aug 26, 2010, at 12:48 PM, Vijayakumar_Thota wrote:
 I am working on the performance issues of an application. I am facing a 
 difficulty in finding out how many times a method is called in different 
 contexts.
 
 Suppose there is a method called 'setItem'. I need the report which tells 
 something like the method 'setItem' is called 12 times at runtime in specific 
 event action.
 
 Is there any tool in MAC which gives the report on how many times a method is 
 called. I have seen the different templates in instruments tool, but I am not 
 getting, which will give the right solution.
 
 Please share any information if you have something or correct me if anything 
 I am doing wrong.


 Have a look at Instruments, and Shark. they came with Xcode in your Dev Tools 
installation. 

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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 scope

2010-08-26 Thread Eric E. Dolecki
What I have done is when instantiating the viewcontroller to push into the
navigationviewcontroller is to call a method on the viewcontroller before
the push, thus setting the var and not trying to attempt a get. It works.
Still curious about the get though - can that be done?


Interactive Designer and Developer
Google Voice: (508) 656-0622
http://blog.ericd.net



On Thu, Aug 26, 2010 at 8:49 AM, Eric E. Dolecki edole...@gmail.com wrote:

 This is a noob question I'm sure.

 I have a rootViewController. In it is a NSString thats been declared. The
 rootViewController pushes another view onto the NavigationViewController...
 loading that view. I'd like the loaded view to be able to access that string
 variable. However, I am currently getting a null for it.


 *RootViewController*
 

 - (void)viewDidLoad {
 myString = @foo;
 
 }

 - (NSString *)getString {
 return myString;
 }

 - (void)displaySecondView:(id)sender {
 UIViewController *menuViewController = [[MenuViewController alloc]
 init];
 menuViewController.title = @Menu;
 self.navigationItem.backBarButtonItem =
 [[UIBarButtonItem alloc] initWithTitle:@Now Playing
  style: UIBarButtonItemStyleBordered
 target:nil
 action:nil];
 [self.navigationController pushViewController:menuViewController
 animated:YES];
 [menuViewController release];
 }

 *And now the view being pushed...
 *
 in the .h I import RootViewController

 RootViewController *rootViewController

 @property(nonatomic,retain) RootViewController *rootViewController
 --
 in the .m

 @synthesize rootViewController

 - (void)viewDidLoad {
 NSString *tmp = [rootViewController getSourceLabel];
 NSLog(@%@,tmp); // (null)
 }

 All I want to do is access methods in the RootViewController...







 Interactive Designer and Developer
 Google Voice: (508) 656-0622
 http://blog.ericd.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: Crashes in _Unwind_Resume

2010-08-26 Thread Benjamin Rister
Greg Parker wrote:

 You might try installing an @try/@catch block in main. If the unwinder is 
 working long enough to get there then you can log something to help debug 
 further. You can use `...@catch (NSException *e)` to check for Objective-C 
 exceptions and `...@catch (...)` to check for C++ exceptions.

Excellent, thanks for all the info and the suggestion. I’ll do this and see if 
anything drops out of it.


vincent habchi wrote:

 By the way, both thread 0 and 2 seem to be in the same routine by the time it 
 crashes. Are you sure all your variables are thread safe?

That function is CFRunLoopRun, which is explicitly meant for use on different 
threads. (Yes, they’re separate run loops.)


Joar Wingfors wrote:

 The default system compiler on Mac OS X is GCC, not LLVM.

True enough, but Xcode and other non-trivial apps are compiled with LLVM, and 
for quite some time the message out of Apple’s devtools team has been to 
migrate to LLVM. I even seem to recall hearing at WWDC that the only reason 
they didn’t change the default compiler in some recent version of Xcode was 
because it just seemed wrong to do that in a maintenance release. I still can’t 
use pure LLVM due to Clang bugs, but GCC LLVM (which is what devtools 
advocates) appears to be working well.


Roland King wrote:

 Adding a try/catch around some main bits of the app found the real issue for 
 me. 

Another good suggestion, thanks. This may be a bit hard for me, because this 
app has a lot of dispatching to the main thread, but between Greg’s suggestion 
and yours, perhaps I can get a critical clue logged.


Thanks, everyone. I’ll give it all a shot and we’ll see how it goes.

Benjamin Rister___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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 scope

2010-08-26 Thread Dave DeLong
Well to me it looks like you're never assigning anything into the second 
viewcontroller's rootViewController property, which means it'll be nil...

Dave

Sent from my iPhone

On Aug 26, 2010, at 7:50 AM, Eric E. Dolecki edole...@gmail.com wrote:

 What I have done is when instantiating the viewcontroller to push into the
 navigationviewcontroller is to call a method on the viewcontroller before
 the push, thus setting the var and not trying to attempt a get. It works.
 Still curious about the get though - can that be done?
 
 
 Interactive Designer and Developer
 Google Voice: (508) 656-0622
 http://blog.ericd.net
 
 
 
 On Thu, Aug 26, 2010 at 8:49 AM, Eric E. Dolecki edole...@gmail.com wrote:
 
 This is a noob question I'm sure.
 
 I have a rootViewController. In it is a NSString thats been declared. The
 rootViewController pushes another view onto the NavigationViewController...
 loading that view. I'd like the loaded view to be able to access that string
 variable. However, I am currently getting a null for it.
 
 
 *RootViewController*
 
 
 - (void)viewDidLoad {
myString = @foo;

 }
 
 - (NSString *)getString {
return myString;
 }
 
 - (void)displaySecondView:(id)sender {
UIViewController *menuViewController = [[MenuViewController alloc]
 init];
menuViewController.title = @Menu;
self.navigationItem.backBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:@Now Playing
 style: UIBarButtonItemStyleBordered
target:nil
action:nil];
[self.navigationController pushViewController:menuViewController
 animated:YES];
[menuViewController release];
 }
 
 *And now the view being pushed...
 *
 in the .h I import RootViewController
 
 RootViewController *rootViewController
 
 @property(nonatomic,retain) RootViewController *rootViewController
 --
 in the .m
 
 @synthesize rootViewController
 
 - (void)viewDidLoad {
NSString *tmp = [rootViewController getSourceLabel];
NSLog(@%@,tmp); // (null)
 }
 
 All I want to do is access methods in the RootViewController...
 
 
 
 
 
 
 
 Interactive Designer and Developer
 Google Voice: (508) 656-0622
 http://blog.ericd.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/davedelong%40me.com
 
 This email sent to davedel...@me.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


How to change name and location of core dump files

2010-08-26 Thread Parimal Das
Hello

I need to enable 'core dumps' for my app.
I am doing this by using 'setrlimit()' function to change ulimit from
default(zero) to unlimited.

Now when i crash my app, it creates a dump file at /cores/core.xxx   where
xxx is the PID.
How i can change this core name to a more readable one, say core.myApp.
Also can i change the default location of core generation??

The problem is, when there are multiple cores dumped in /cores, the only way
to identify the related core is by timestamp of file.
Now user either need to remember the time of crash or PID (process id) to
get the correct core from my app.

What can we do here? Or i am missing some very obvious point ?
Thanks in Advance

-Parimal Das
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


invoke menu tracking programmatically

2010-08-26 Thread Nava Carmon
Hi,

Is it possible to invoke NSMenu tracking programmatically?

Thanks, 

Nava Carmon

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: [OT]making app new modules display from within the app and not from the app store.

2010-08-26 Thread Wyatt Webb

On Aug 26, 2010, at 4:05 AM, Gustavo Pizano wrote:

 Hello all, I know this isn't the right place so please don't behead me if I 
 offend you, but if you could help me, Im will be happy to hear you.
 
 We are developing an application with interactive children modules. The idea 
 is that each time a new module is ready it will be submitted to Apple for 
 approval and then our app and only our app should display the new module. But 
 then when you buy it will take you to the app store and then it will download 
 it to our app bundle.
 
 As an example the MacUser app which they post their magazines, and then you 
 can buy individually each magazine, but if you try to to search for a single 
 magazine in the app store you don't find it, BUT once form within the app 
 click a specific magazine, the app store opens and you can download the 
 magazine.
 
 Is there any kind of special agreement between the developer company and 
 Apple?
 
 Thanks I hope somebody can give me a clue on what shall we do.

Actually, you aren't too far off topic. MacUser does this with the In App 
Purchase features using the Store Kit framework. You don't have to submit each 
module, but you will have to set up your app to deal with your newly arriving 
content. I recommend you start reading through the docs here:

In App Purchase Programming Guide
http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html

Wyatt___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: [OT]making app new modules display from within the app and not from the app store.

2010-08-26 Thread Gustavo Pizano
Wyatt

Thanks a lot, I didn't know about this.. 

I will look into it right away.



Gustavo

On Aug 26, 2010, at 4:47 PM, Wyatt Webb wrote:

 
 On Aug 26, 2010, at 4:05 AM, Gustavo Pizano wrote:
 
 Hello all, I know this isn't the right place so please don't behead me if I 
 offend you, but if you could help me, Im will be happy to hear you.
 
 We are developing an application with interactive children modules. The idea 
 is that each time a new module is ready it will be submitted to Apple for 
 approval and then our app and only our app should display the new module. 
 But then when you buy it will take you to the app store and then it will 
 download it to our app bundle.
 
 As an example the MacUser app which they post their magazines, and then you 
 can buy individually each magazine, but if you try to to search for a single 
 magazine in the app store you don't find it, BUT once form within the app 
 click a specific magazine, the app store opens and you can download the 
 magazine.
 
 Is there any kind of special agreement between the developer company and 
 Apple?
 
 Thanks I hope somebody can give me a clue on what shall we do.
 
 Actually, you aren't too far off topic. MacUser does this with the In App 
 Purchase features using the Store Kit framework. You don't have to submit 
 each module, but you will have to set up your app to deal with your newly 
 arriving content. I recommend you start reading through the docs here:
 
 In App Purchase Programming Guide
 http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html
 
 Wyatt

___

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

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

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

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


A question

2010-08-26 Thread Behrang Saeedzadeh
Hi,

I have a domain name that might be interesting for iPhone, iPad, and
Mac software developers. Can I advertise it in this
mailing list?

Thanks in advance,
Behrang Saeedzadeh
http://www.behrang.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: A question

2010-08-26 Thread Joshua Tidsbury
 
 Hi,
 
 I have a domain name that might be interesting for iPhone, iPad, and
 Mac software developers. Can I advertise it in this
 mailing list?

No.

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: sync core-data store between OS X and iOS

2010-08-26 Thread Nick Zitzmann

On Aug 26, 2010, at 12:01 AM, Martin Hewitson wrote:

 That's what I feared. Too bad. How are others doing this then? Or are they 
 not? I couldn't find any 3rd party solutions - only ones that work over 
 bonjour which typically have the 'same network' problem.

We wrote our own sync engine for syncing data between NoteLife and SOHO Notes. 
I think you'll have to do this as well.

Nick Zitzmann
http://www.chronosnet.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


Mixing CPP and Obj-C

2010-08-26 Thread koko
I want to add Obj-C to classes in a  CPP static library that is used  
by Mac and Windows apps. I have set the compile type to cpp.objc so  
that the file extension can remain .cpp and compile on Windows.  I am  
#ifdef'ing functions that use Cocoa.


My question is memory management. Should functions allocate/release  
auto release pools?


-koko
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: Mixing CPP and Obj-C

2010-08-26 Thread Dave Carrigan
On Aug 26, 2010, at 9:11 AM, k...@highrolls.net wrote:
 I want to add Obj-C to classes in a  CPP static library that is used by Mac 
 and Windows apps. I have set the compile type to cpp.objc so that the file 
 extension can remain .cpp and compile on Windows.  I am #ifdef'ing functions 
 that use Cocoa.
 
 My question is memory management. Should functions allocate/release auto 
 release pools?


Autorelease pools are not scoped to any particular class or function, so 
probably not, unless you're using the library in an application that doesn't 
have an autorelease pool, which would be pretty rare. You would also need to 
create a new pool in any thread other than the main one, and drain it at thread 
exit.

If an object gets autoreleased and there is no autorelease pool in place for 
it, you'll see a big warning in the console, so just look for those. If you 
don't see one, then you're OK. 

-- 
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: Mixing CPP and Obj-C

2010-08-26 Thread koko

Thanks Dave.

On Aug 26, 2010, at 10:17 AM, Dave Carrigan wrote:


On Aug 26, 2010, at 9:11 AM, k...@highrolls.net wrote:
I want to add Obj-C to classes in a  CPP static library that is  
used by Mac and Windows apps. I have set the compile type to  
cpp.objc so that the file extension can remain .cpp and compile on  
Windows.  I am #ifdef'ing functions that use Cocoa.


My question is memory management. Should functions allocate/release  
auto release pools?



Autorelease pools are not scoped to any particular class or  
function, so probably not, unless you're using the library in an  
application that doesn't have an autorelease pool, which would be  
pretty rare. You would also need to create a new pool in any thread  
other than the main one, and drain it at thread exit.


If an object gets autoreleased and there is no autorelease pool in  
place for it, you'll see a big warning in the console, so just look  
for those. If you don't see one, then you're OK.


--
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA




___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: sync core-data store between OS X and iOS

2010-08-26 Thread Keary Suska
On Aug 26, 2010, at 12:01 AM, Martin Hewitson wrote:

 On Aug 26, 2010, at 6:39 AM, Nick Zitzmann wrote:
 
 On Aug 25, 2010, at 10:07 PM, Martin Hewitson wrote:
 
 I just wanted to confirm what I've read. Basically, it seems to be true 
 that there is currently no official apple API which allows one to sync a 
 core-data store between OS X and iOS. Am I correct in this statement?
 
 Yes, you are.
 
 That's what I feared. Too bad. How are others doing this then? Or are they 
 not? I couldn't find any 3rd party solutions - only ones that work over 
 bonjour which typically have the 'same network' problem.

Marcus S. Zarra, author of Core Data: Apple's API for Persisting Data on Mac 
OS X has done exactly that, ZSync: http://www.zarrastudios.com/ZSync/ZSync.html

HTH,

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

___

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

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

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

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


Re: How to change name and location of core dump files

2010-08-26 Thread Mark Ritchie
Hey!

On 26/Aug/2010, at 7:29 AM, Parimal Das wrote:
 How i can change this core name to a more readable one, say core.myApp.
 Also can i change the default location of core generation??


Be careful as this is controlled system wide, not per process. ;-)  

And to be clear, I've not messed with this in a long long time so please try on 
a TEST system first!

sysctl is what you're looking for:
$ sysctl -a kern.corefile
kern.corefile: /cores/core.%P


From bsd/kern/kern_proc.c in xnu-1504.7.4 (OSX 10.6.4)
/*
 * proc_core_name(name, uid, pid)
 * Expand the name described in corefilename, using name, uid, and pid.
 * corefilename is a printf-like string, with three format specifiers:
 *  %N  name of process (name)
 *  %P  process id (pid)
 *  %U  user id (uid)
 * For example, %N.core is the default; they can be disabled completely
 * by using /dev/null, or all core files can be stored in /cores/%U/%N-%P.
 * This is controlled by the sysctl variable kern.corefile (see above).
 */

Enjoy!
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: Mixing CPP and Obj-C

2010-08-26 Thread Shawn Erickson
On Thu, Aug 26, 2010 at 9:11 AM,  k...@highrolls.net wrote:
 I want to add Obj-C to classes in a  CPP static library that is used by Mac
 and Windows apps. I have set the compile type to cpp.objc so that the file
 extension can remain .cpp and compile on Windows.  I am #ifdef'ing functions
 that use Cocoa.

 My question is memory management. Should functions allocate/release auto
 release pools?

It depends. Autorelease pools are a per thread thing (a stack of pools
could exist per thread). If your methods are being called from the
main thread in an NSApplication derived application then you have an
autorelease pool at the event loop level being managed for you. If
they are being called form secondary threads then you need to ensure
an autorelease pool exists and is drained periodically, assuming  code
running on that thread deals with any objective-c objects.

Now you may want to create nested autorelease pools to further limit
the accumulation of temporary objects even when the AppKit framwork is
managing a top level autorelease pool for you.

Review...

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAutoreleasePools.html

-Shawn
___

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

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

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

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


Re: Mixing CPP and Obj-C

2010-08-26 Thread koko

Thanks Shawn. I will review the referenced article.

-koko

On Aug 26, 2010, at 11:06 AM, Shawn Erickson wrote:


On Thu, Aug 26, 2010 at 9:11 AM,  k...@highrolls.net wrote:
I want to add Obj-C to classes in a  CPP static library that is  
used by Mac
and Windows apps. I have set the compile type to cpp.objc so that  
the file
extension can remain .cpp and compile on Windows.  I am #ifdef'ing  
functions

that use Cocoa.

My question is memory management. Should functions allocate/release  
auto

release pools?


It depends. Autorelease pools are a per thread thing (a stack of pools
could exist per thread). If your methods are being called from the
main thread in an NSApplication derived application then you have an
autorelease pool at the event loop level being managed for you. If
they are being called form secondary threads then you need to ensure
an autorelease pool exists and is drained periodically, assuming  code
running on that thread deals with any objective-c objects.

Now you may want to create nested autorelease pools to further limit
the accumulation of temporary objects even when the AppKit framwork is
managing a top level autorelease pool for you.

Review...

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAutoreleasePools.html

-Shawn



___

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

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

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

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


NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread koko
I have an accessory view in an NSOpenPanel which contains a  
NSComboBox. The combo box is a list of file extensions.  When the user  
selects an entry the action method calls --setAllowedFileTypes. All  
these mechanics work properly.  The issue: The open panel does not  
respond to the new allowed file types.


What I am trying to accomplish is a dynamic filter as we see in a  
Windows open file dialog.


Am I barking up the wrong or impossible tree here?


___

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

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

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

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


Re: invoke menu tracking programmatically

2010-08-26 Thread Nava Carmon
Some more details:

I have a status menu with a NSSearchField and menu items (I know the best way 
to implement it - to make a window with a table, but this is done already). 
When search field is active and user presses up  down arrows, I'd like to 
start menu tracking, that is that the user will be able to move with arrow keys 
between menu items. I can catch moveUp and moveDown selectors. How can I cause 
the menu to become a key responder?

Thanks,

Nava

On Aug 26, 2010, at 5:46 PM, Nava Carmon wrote:

 Hi,
 
 Is it possible to invoke NSMenu tracking programmatically?
 
 Thanks, 
 
 Nava Carmon
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/ncarmon%40mac.com
 
 This email sent to ncar...@mac.com


Nava Carmon
ncar...@mac.com

Think good and it will be good!

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: Performance issue

2010-08-26 Thread Ken Thomases
On Aug 26, 2010, at 8:39 AM, Uli Kusterer wrote:

 On Aug 26, 2010, at 12:48 PM, Vijayakumar_Thota wrote:
 I am working on the performance issues of an application. I am facing a 
 difficulty in finding out how many times a method is called in different 
 contexts.
 
 Suppose there is a method called 'setItem'. I need the report which tells 
 something like the method 'setItem' is called 12 times at runtime in 
 specific event action.
 
 Is there any tool in MAC which gives the report on how many times a method 
 is called. I have seen the different templates in instruments tool, but I am 
 not getting, which will give the right solution.
 
 Please share any information if you have something or correct me if anything 
 I am doing wrong.
 
 
 Have a look at Instruments, and Shark. they came with Xcode in your Dev Tools 
 installation. 

Shark and most of the instruments in Instruments are statistical samplers, not 
exact function-call measurement.  Also, Vijay already mentioned familiarity 
with Instruments.

Vijay, you might want to look into Saturn and the function instrumentation 
features of gcc.  They are documented here: 
http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/SaturnUserGuide/.

Another tool is DTrace.  You can use it manually or build a custom instrument 
in Instruments using DTrace as the underlying engine.  A quick one-liner 
example:

sudo dtrace -n 'objc$target:MyClass:-setItem?:entry { ustack(); }' -p pid of 
my process


However, it is pretty rare that the statistical tools are not sufficient for 
performance analysis, so you might want to reconsider whether you really need 
an exact function-call measurement.

Regards,
Ken

___

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

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

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

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


Re: NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread Corbin Dunn

On Aug 26, 2010, at 10:41 AM, k...@highrolls.net wrote:

 I have an accessory view in an NSOpenPanel which contains a NSComboBox. The 
 combo box is a list of file extensions.  When the user selects an entry the 
 action method calls --setAllowedFileTypes. All these mechanics work properly. 
  The issue: The open panel does not respond to the new allowed file types.

What do you mean does not respond?
Is it not drawing right? Try calling -validateVisibleColumns. 

corbin

 
 What I am trying to accomplish is a dynamic filter as we see in a Windows 
 open file dialog.
 
 Am I barking up the wrong or impossible tree here?
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/corbind%40apple.com
 
 This email sent to corb...@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: NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread Thomas Davie

On 26 Aug 2010, at 18:41, k...@highrolls.net wrote:

 I have an accessory view in an NSOpenPanel which contains a NSComboBox. The 
 combo box is a list of file extensions.  When the user selects an entry the 
 action method calls --setAllowedFileTypes. All these mechanics work properly. 
  The issue: The open panel does not respond to the new allowed file types.
 
 What I am trying to accomplish is a dynamic filter as we see in a Windows 
 open file dialog.
 
 Am I barking up the wrong or impossible tree here?

Simple solution – don't try to hack Mac OS to be windows.  Different UIs are 
different, let them be so, you users are using macs for a reason.

Bob___

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

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

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

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


Re: NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread koko
By 'does not respond' I was referring to the view not validating, I  
was not calling -validateVisibleColumns. Now, using -setAllowdFieTypes  
and calling -validateVisibleColumns the view is still not validated. I  
do not know if this is because my  array of type is upper case or if  
case is irrelevant.


I did implement - (BOOL)panel:(id)sender shouldShowFilename:(NSString  
*)filename
checking for directories an case of extensions and calling - 
validateVisibleColumns in my combox box of extensions action method.   
Works great.


-koko





On Aug 26, 2010, at 3:06 PM, Corbin Dunn wrote:



On Aug 26, 2010, at 10:41 AM, k...@highrolls.net wrote:

I have an accessory view in an NSOpenPanel which contains a  
NSComboBox. The combo box is a list of file extensions.  When the  
user selects an entry the action method calls -- 
setAllowedFileTypes. All these mechanics work properly.  The issue:  
The open panel does not respond to the new allowed file types.


What do you mean does not respond?
Is it not drawing right? Try calling -validateVisibleColumns.

corbin



What I am trying to accomplish is a dynamic filter as we see in a  
Windows open file dialog.


Am I barking up the wrong or impossible tree here?


___

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

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

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

This email sent to corb...@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: NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread koko
I beg to differ with you.  This is not a hack as the methods to  
achieve this result all all public Cocoa api's.


Our market (machine embroidery) realizes 29 file types. A customer may  
have a machine that recognizes 3 or 4 of these.  Giving them the  
ability to filter file types from an open panel is quite reasonable  
and has nothing to do with their preference of Mac over Windows.


Check this out and comment please http://highrolls.net/open_filter.png

-koko


On Aug 26, 2010, at 4:32 PM, Thomas Davie wrote:



On 26 Aug 2010, at 18:41, k...@highrolls.net wrote:

I have an accessory view in an NSOpenPanel which contains a  
NSComboBox. The combo box is a list of file extensions.  When the  
user selects an entry the action method calls -- 
setAllowedFileTypes. All these mechanics work properly.  The issue:  
The open panel does not respond to the new allowed file types.


What I am trying to accomplish is a dynamic filter as we see in a  
Windows open file dialog.


Am I barking up the wrong or impossible tree here?


Simple solution – don't try to hack Mac OS to be windows.  Different  
UIs are different, let them be so, you users are using macs for a  
reason.


Bob


___

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

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

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

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


Re: NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread Laurent Daudelin
It should be doable. A few applications offer this kind of filtering. Photoshop 
comes to mind. Not sure why it's not working for you, though, sorry.

-Laurent.
-- 
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 
http://www.nemesys-soft.com/
Logiciels Nemesys Software  
laur...@nemesys-soft.com

On Aug 26, 2010, at 17:00, k...@highrolls.net wrote:

 I beg to differ with you.  This is not a hack as the methods to achieve this 
 result all all public Cocoa api's.
 
 Our market (machine embroidery) realizes 29 file types. A customer may have a 
 machine that recognizes 3 or 4 of these.  Giving them the ability to filter 
 file types from an open panel is quite reasonable and has nothing to do with 
 their preference of Mac over Windows.
 
 Check this out and comment please http://highrolls.net/open_filter.png
 
 -koko
 
 
 On Aug 26, 2010, at 4:32 PM, Thomas Davie wrote:
 
 
 On 26 Aug 2010, at 18:41, k...@highrolls.net wrote:
 
 I have an accessory view in an NSOpenPanel which contains a NSComboBox. The 
 combo box is a list of file extensions.  When the user selects an entry the 
 action method calls --setAllowedFileTypes. All these mechanics work 
 properly.  The issue: The open panel does not respond to the new allowed 
 file types.
 
 What I am trying to accomplish is a dynamic filter as we see in a Windows 
 open file dialog.
 
 Am I barking up the wrong or impossible tree here?
 
 Simple solution – don't try to hack Mac OS to be windows.  Different UIs are 
 different, let them be so, you users are using macs for a reason.
 
 Bob

___

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

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

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

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


Re: NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread Quincey Morris
On Aug 26, 2010, at 10:41, k...@highrolls.net wrote:

 I have an accessory view in an NSOpenPanel which contains a NSComboBox. The 
 combo box is a list of file extensions.  When the user selects an entry the 
 action method calls --setAllowedFileTypes. All these mechanics work properly. 
  The issue: The open panel does not respond to the new allowed file types.
 
 What I am trying to accomplish is a dynamic filter as we see in a Windows 
 open file dialog.

You should probably post your code at this point, since several people (myself 
included) aren't sure exactly what you've done, or what you're expecting to 
happen.

However, I will point out that NSComboBox is a strange choice for a control to 
filter file types. As I keep having to say on this list, a NSComboBox is a kind 
of text field, not a kind of menu. While it doesn't seem impossible to use a 
combo box in this situation, it's going to take support code to behave like a 
menu choice. Perhaps that's where the problem lies.

You'll get better help on this list if you ask more technically accurate 
questions. Ambiguous language, like does not respond or dynamic filter as we 
see in ... Windows, forces us to guess what you're expecting, so we can't 
respond helpfully.


___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: [SOLVED] NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread koko

For those interested in my solution.

@interface FSAccessoryView : NSView {
@public

NSOpenPanel *m_NSOpenPanel;
NSMutableArray  *m_fileTypes;
NSInteger   m_idx;
IBOutletNSTextField *m_stitches, *m_colors, *m_inches, 
*m_millimeters;
IBOutletNSComboBox *m_filterDescriptions;
}

@end



FSAccessoryView is added to the open panel. It contains a NSComboBox,  
set non-editable and some other controls that do not bear on this  
discussion.
-selectFileTypes is wired to the combo box. The -setNeedsDisplay call  
causes my preview to be drawn.
m_fileTypes is an Array of Arrays containing file extensions.  
m_filterDescriptions populates the combo box.



@implementation FSAccessoryView

- (IBAction)selectFileTypes:(id)sender {

NSInteger idx = [sender indexOfSelectedItem];
if(idx  -1)
{
m_idx = idx;
[m_NSOpenPanel validateVisibleColumns];
}
}

- (void)panelSelectionDidChange:(id)sender { [self  
setNeedsDisplay:YES]; }


- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename {

BOOL dir;
	[[NSFileManager defaultManager] fileExistsAtPath:filename  
isDirectory:dir];

if(dir) return YES;
else
{
NSString *ext = [filename pathExtension];
NSString *lcext = [ext lowercaseString];
NSString *ucext = [ext uppercaseString];
		if([[m_fileTypes objectAtIndex:m_idx] containsObject:lcext] ||  
[[m_fileTypes objectAtIndex:m_idx] containsObject:ucext]) 		return YES;

}
return NO;
}

- (BOOL)isFlipped { return YES;}

- (void)drawRect:(NSRect)rect {

code to draw a preview
}
@end





On Aug 26, 2010, at 6:42 PM, Quincey Morris wrote:


On Aug 26, 2010, at 10:41, k...@highrolls.net wrote:

I have an accessory view in an NSOpenPanel which contains a  
NSComboBox. The combo box is a list of file extensions.  When the  
user selects an entry the action method calls -- 
setAllowedFileTypes. All these mechanics work properly.  The issue:  
The open panel does not respond to the new allowed file types.


What I am trying to accomplish is a dynamic filter as we see in a  
Windows open file dialog.


You should probably post your code at this point, since several  
people (myself included) aren't sure exactly what you've done, or  
what you're expecting to happen.


However, I will point out that NSComboBox is a strange choice for a  
control to filter file types. As I keep having to say on this list,  
a NSComboBox is a kind of text field, not a kind of menu. While it  
doesn't seem impossible to use a combo box in this situation, it's  
going to take support code to behave like a menu choice. Perhaps  
that's where the problem lies.


You'll get better help on this list if you ask more technically  
accurate questions. Ambiguous language, like does not respond or  
dynamic filter as we see in ... Windows, forces us to guess what  
you're expecting, so we can't respond helpfully.



___

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

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

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net

This email sent to k...@highrolls.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: [SOLVED][CORRECTION] NSOpenPanel -setAllowedFileTypes

2010-08-26 Thread koko
m_filterDescriptions is the NSComboBox. It is populated before the  
open panel is displayed.


-koko

On Aug 26, 2010, at 7:37 PM, k...@highrolls.net wrote:


For those interested in my solution.

@interface FSAccessoryView : NSView {
@public

NSOpenPanel *m_NSOpenPanel;
NSMutableArray  *m_fileTypes;
NSInteger   m_idx;
	IBOutlet	NSTextField *m_stitches, *m_colors, *m_inches,  
*m_millimeters;

IBOutletNSComboBox *m_filterDescriptions;
}

@end



FSAccessoryView is added to the open panel. It contains a  
NSComboBox, set non-editable and some other controls that do not  
bear on this discussion.
-selectFileTypes is wired to the combo box. The -setNeedsDisplay  
call causes my preview to be drawn.
m_fileTypes is an Array of Arrays containing file extensions.  
m_filterDescriptions populates the combo box.



@implementation FSAccessoryView

- (IBAction)selectFileTypes:(id)sender {

NSInteger idx = [sender indexOfSelectedItem];
if(idx  -1)
{
m_idx = idx;
[m_NSOpenPanel validateVisibleColumns];
}
}

- (void)panelSelectionDidChange:(id)sender { [self  
setNeedsDisplay:YES]; }


- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename {

BOOL dir;
	[[NSFileManager defaultManager] fileExistsAtPath:filename  
isDirectory:dir];

if(dir) return YES;
else
{
NSString *ext = [filename pathExtension];
NSString *lcext = [ext lowercaseString];
NSString *ucext = [ext uppercaseString];
		if([[m_fileTypes objectAtIndex:m_idx] containsObject:lcext] ||  
[[m_fileTypes objectAtIndex:m_idx] containsObject:ucext]) 		return  
YES;

}
return NO;
}

- (BOOL)isFlipped { return YES;}

- (void)drawRect:(NSRect)rect {

code to draw a preview
}
@end





On Aug 26, 2010, at 6:42 PM, Quincey Morris wrote:


On Aug 26, 2010, at 10:41, k...@highrolls.net wrote:

I have an accessory view in an NSOpenPanel which contains a  
NSComboBox. The combo box is a list of file extensions.  When the  
user selects an entry the action method calls -- 
setAllowedFileTypes. All these mechanics work properly.  The  
issue: The open panel does not respond to the new allowed file  
types.


What I am trying to accomplish is a dynamic filter as we see in a  
Windows open file dialog.


You should probably post your code at this point, since several  
people (myself included) aren't sure exactly what you've done, or  
what you're expecting to happen.


However, I will point out that NSComboBox is a strange choice for a  
control to filter file types. As I keep having to say on this list,  
a NSComboBox is a kind of text field, not a kind of menu. While it  
doesn't seem impossible to use a combo box in this situation, it's  
going to take support code to behave like a menu choice. Perhaps  
that's where the problem lies.


You'll get better help on this list if you ask more technically  
accurate questions. Ambiguous language, like does not respond or  
dynamic filter as we see in ... Windows, forces us to guess what  
you're expecting, so we can't respond helpfully.



___

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

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

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net

This email sent to k...@highrolls.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/koko%40highrolls.net

This email sent to k...@highrolls.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


This is a test

2010-08-26 Thread koko
I was notified that I requested to be removed from the list. I did  
not. I am testing my ability to communicate.


-koko
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


[Moderator] Re: A question

2010-08-26 Thread Scott Anguish
No.

And this message is off topic in and of itself. It has nothing to do with Cocoa 
programming.


On Aug 26, 2010, at 10:53 AM, Behrang Saeedzadeh wrote:

 Hi,
 
 I have a domain name that might be interesting for iPhone, iPad, and
 Mac software developers. Can I advertise it in this
 mailing list?
 
 Thanks in advance,
 Behrang Saeedzadeh
 http://www.behrang.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/scott%40cocoadoc.com
 
 This email sent to sc...@cocoadoc.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


[moderator] Re: This is a test

2010-08-26 Thread Scott Anguish
Posting test messages to a list of 8000+ members isn’t appropriate.

Please contact the admins if you feel you’ve been removed or received such a 
message.


On Aug 26, 2010, at 10:43 PM, k...@highrolls.net wrote:

 I was notified that I requested to be removed from the list. I did not. I am 
 testing my ability to communicate.
 
 -koko
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/scott%40cocoadoc.com
 
 This email sent to sc...@cocoadoc.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: [moderator] Re: This is a test

2010-08-26 Thread koko

My humble apologies. Sometimes I get outside of my mind.

-koko


On Aug 26, 2010, at 9:36 PM, Scott Anguish wrote:


Posting test messages to a list of 8000+ members isn’t appropriate.

Please contact the admins if you feel you’ve been removed or  
received such a message.



On Aug 26, 2010, at 10:43 PM, k...@highrolls.net wrote:

I was notified that I requested to be removed from the list. I did  
not. I am testing my ability to communicate.


-koko
___

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

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

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

This email sent to sc...@cocoadoc.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