Re: How to get all the path of an application present on the disk

2013-03-21 Thread anni saini
Thanks Tim, I tried it however I won't able to find any path attribute. Search result is having following attributes: kMDItemContentTypeTree,     kMDItemContentType,     kMDItemPhysicalSize,     kMDItemLanguages,     kMDItemKind,     kMDItemDisplayName,     kMDItemContentModificationDate,     kMDI

Number of chars

2013-03-21 Thread Luca Ciciriello
Hi all. I'm using in my iOS project some Objective-C++ modules. Here I have some conversion from NSString to C++11 std::string. After this conversion I found (correctly) in my std::string some 2-byte characters. My question is: How can I count the number of chars and not the numbers of byte in

Re: Number of chars

2013-03-21 Thread Luther Baker
I don't think your example makes sense. How is 'num of char of "test"' ever 3? In a particular string representation, all letters are each, generally represented with the same number of bytes. On Mar 21, 2013, at 3:27 AM, Luca Ciciriello wrote: > Hi all. > I'm using in my iOS project some Obj

Re: Number of chars

2013-03-21 Thread Luca Ciciriello
An example of string is the italian word "più". Here I can visually count 3 chars: p, i and ù. But if I use "più".size() the result is 4 std::string ppp = "più"; size_t sss = ppp.size(); here sss is 4. L. On Mar 21, 2013, at 9:48 AM, Luther Baker wrote: > I don't think your example makes s

Re: Number of chars

2013-03-21 Thread Jean-Daniel Dupas
Le 21 mars 2013 à 09:27, Luca Ciciriello a écrit : > Hi all. > I'm using in my iOS project some Objective-C++ modules. Here I have some > conversion from NSString to C++11 std::string. After this conversion I found > (correctly) in my std::string some 2-byte characters. > My question is: How

Re: Number of chars

2013-03-21 Thread Roland King
On 21 Mar, 2013, at 5:07 PM, Luca Ciciriello wrote: > An example of string is the italian word "più". > Here I can visually count 3 chars: p, i and ù. But if I use "più".size() the > result is 4 > > std::string ppp = "più"; > size_t sss = ppp.size(); > > here sss is 4. > > L. > Not total

unwind custom segue and uinavigationcontroller

2013-03-21 Thread Torsten Curdt
I have a hard time understanding the segue unwinding. I have a simple storyboard setup. UIViewController with UINavigationController. On a table cell click a custom segue pushes a new UIViewController onto the navigation stack. But then pressing the "back" button in the navigation bar, it only use

LTO and debugging

2013-03-21 Thread Luca Ciciriello
Is it normal that no breakpoint is reached (disabled?) when the Link-Time Optimization is enabled? Luca. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderat

Re: Global (all-user) preferences for an application

2013-03-21 Thread Jerry Krinock
On 2013 Mar 20, at 06:01, Scott Ribe wrote: > And I don't think it would be inconsistent at all--sandboxing gives us all > sorts of access based on bundle identifier already. Yes, I see what you mean, and I agree it would make sense. The problem is that Mac OS X now has two security systems

Re: How to get all the path of an application present on the disk

2013-03-21 Thread Jerry Krinock
On 2013 Mar 20, at 10:57, Matt Neuburg wrote: > I recently broke my own app … by turning off Spotlight! Nice, Matt! Yes, Spotlight is great - when it works - but I've always felt that it was a tad presumptuous of Apple to provide an API for *developing* with it. It's fuzzy even when it's *

Re: Number of chars

2013-03-21 Thread Glenn L. Austin
On Mar 21, 2013, at 2:34 AM, Jean-Daniel Dupas wrote: > > Le 21 mars 2013 à 09:27, Luca Ciciriello a > écrit : > >> Hi all. >> I'm using in my iOS project some Objective-C++ modules. Here I have some >> conversion from NSString to C++11 std::string. After this conversion I found >> (correc

Re: Number of chars

2013-03-21 Thread Luca Ciciriello
Ok, thanks. Luca. On Mar 21, 2013, at 3:43 PM, Glenn L. Austin wrote: > > On Mar 21, 2013, at 2:34 AM, Jean-Daniel Dupas wrote: > >> >> Le 21 mars 2013 à 09:27, Luca Ciciriello a >> écrit : >> >>> Hi all. >>> I'm using in my iOS project some Objective-C++ modules. Here I have some >>> c

Re: Global (all-user) preferences for an application

2013-03-21 Thread Jean Suisse
>> Isn't resorting to a SMJobBless helper tool endowed with XPC capabilities >> just for storing a few must-be-global preference a little overkill? > > No, it's not overkill. If it seems like overkill to you, you should > re-evaluate your need to set "a few must-be-global preferences". Writin

Re: Global (all-user) preferences for an application

2013-03-21 Thread Jean Suisse
> On Mar 16, 2013, at 6:14 AM, Jean Suisse wrote: >> To be user-friendly my app would need to use per-user preferences and global >> preferences (i.e. that applies to all users). The former I can manage. The >> later… well, short of coding a helper tool just for dealing with preferences >> stor

Re: Global (all-user) preferences for an application

2013-03-21 Thread Jean Suisse
>> No, it's not overkill. If it seems like overkill to you, you should >> re-evaluate your need to set "a few must-be-global preferences". Writing to >> /Library/ *is* a *big* deal. > > Sure seems to me like signed package com.foo.bar should be able to write into > /Library/Application Suppor

Re: Triggering an NSTextStorage Bug

2013-03-21 Thread Timothy Wood
On Mar 20, 2013, at 12:01 PM, Kyle Sluder wrote: > The reason it's limited to 19 bits is because for speed purposes > NSParagraphStyle implements its own inline retain count rather than > relying on NSObject's external refcount table. Which is also why you > can't make ARC weak references to NSPa

Re: How to get all the path of an application present on the disk

2013-03-21 Thread Ken Thomases
On Mar 21, 2013, at 9:39 AM, Jerry Krinock wrote: > To the original question, I don't think there's an easy way to do this. I > don't think Launch Services remembers any more than the most > recently-recognized version. There's one Launch Services function which returns paths for all copies of

Re: LTO and debugging

2013-03-21 Thread Andreas Grosam
On 21.03.2013, at 15:05, Luca Ciciriello wrote: > Is it normal that no breakpoint is reached (disabled?) when the Link-Time > Optimization is enabled? > > Luca. This is probably the effect of the optimizer: there is simply no corresponding match for the source line and code anymore after LTO

iOS 6 EKEvent calendar access process

2013-03-21 Thread Alex Zavatone
I'm creating an iOS program that uses a custom local calendar to display contents based on calendar events. With that in mind, I thought it best to use a local calendar just for this app, creating it and deleting it as needed, so as not to mess with any other calendars on the device. Since I'm

Re: iOS 6 EKEvent calendar access process

2013-03-21 Thread Alex Kac
There is no such thing as a private calendar. Your intentions don't actually matter - if you want access to the Calendar API, that means access to all calendar data. You have two choices: 1) Create your own calendar API/data store. That is the only true way to make it invisible to the user. 2)

Re: LTO and debugging

2013-03-21 Thread vincent habchi
On 21 mars 2013, at 16:45, Andreas Grosam wrote: > > On 21.03.2013, at 15:05, Luca Ciciriello wrote: > >> Is it normal that no breakpoint is reached (disabled?) when the Link-Time >> Optimization is enabled? >> >> Luca. > > This is probably the effect of the optimizer: there is simply no >

Re: unwind custom segue and uinavigationcontroller

2013-03-21 Thread Matt Neuburg
On Thu, 21 Mar 2013 13:47:46 +0100, Torsten Curdt said: >I have a hard time understanding the segue unwinding. I know quite a lot about segue unwinding. See my book for lots of info: http://www.apeth.com/iOSBook/ch19.html#_unwind_segues And the downloadable examples at my github site go into ev

Re: Number of chars

2013-03-21 Thread Luther Baker
I apologize for leading you the wrong way Luca! -Luther On Thu, Mar 21, 2013 at 9:46 AM, Luca Ciciriello < luca_cicirie...@hotmail.com> wrote: > Ok, thanks. > > Luca. > > On Mar 21, 2013, at 3:43 PM, Glenn L. Austin > wrote: > > > > > On Mar 21, 2013, at 2:34 AM, Jean-Daniel Dupas > wrote: >

Re: iOS 6 EKEvent calendar access process

2013-03-21 Thread Alex Zavatone
So, iOS 6 grants you access to all calendars or none of them and that's it? In reading the documentation and in the request message on iOS 6, what I'd read implied that you could be granted access to the one calendar you wish to access. I guess not. Wow. Looking over requestAccestToEntityTy

Re: Number of chars

2013-03-21 Thread Aki Inoue
Please note that std::string does not provide the localized behavior for collation, searching, case mapping, etc that our customers are accustomed to. If you're handling user visible strings, we recommend sticking to NSString at least for those operations. Also, looking for a safe byte boundary

Re: iOS 6 EKEvent calendar access process

2013-03-21 Thread Mike Abdullah
On 21 Mar 2013, at 18:02, Alex Zavatone wrote: > So, iOS 6 grants you access to all calendars or none of them and that's it? > > In reading the documentation and in the request message on iOS 6, what I'd > read implied that you could be granted access to the one calendar you wish to > acces

Re: Number of chars

2013-03-21 Thread Jens Alfke
On Mar 21, 2013, at 11:10 AM, Aki Inoue wrote: > Please note that std::string does not provide the localized behavior for > collation, searching, case mapping, etc that our customers are accustomed to. > If you're handling user visible strings, we recommend sticking to NSString at > least for

Re: iOS 6 EKEvent calendar access process

2013-03-21 Thread Alex Zavatone
Awesome. I'll put it in this afternoon and file an open radar as well. From what Alex explained, I'd just expected that this was just a partially implemented feature but honestly, this all or none data access to all calendars seems more than useless from a user's perspective IMO. On Mar 21, 2

Re: Triggering an NSTextStorage Bug

2013-03-21 Thread Seth Willits
On Mar 21, 2013, at 8:35 AM, Timothy Wood wrote: > On Mar 20, 2013, at 12:01 PM, Kyle Sluder wrote: >> The reason it's limited to 19 bits is because for speed purposes >> NSParagraphStyle implements its own inline retain count rather than >> relying on NSObject's external refcount table. Which is

Re: Number of chars

2013-03-21 Thread Luca Ciciriello
No problem :-) Luca On Mar 21, 2013, at 5:59 PM, Luther Baker wrote: > I apologize for leading you the wrong way Luca! > > -Luther > > > > On Thu, Mar 21, 2013 at 9:46 AM, Luca Ciciriello > wrote: > Ok, thanks. > > Luca. > > On Mar 21, 2013, at 3:43 PM, Glenn L. Austin wrote: > > > >

Re: How to get all the path of an application present on the disk

2013-03-21 Thread Charles Srstka
On Mar 21, 2013, at 9:39 AM, Jerry Krinock wrote: > The only way to do this may be to search the whole drive, stopping each time > you find a directory (package) which looks like an app (.app extension, > presence of Contents/Info.plist, etc.), and examining the CFBundleIdentifier > in that In

Re: How to get all the path of an application present on the disk

2013-03-21 Thread Tim Schröder
.. yes, this is funny. There is a kMDItemPath attribute in the NSMetadataItem array, but calling [item attributes] won't show it. See https://developer.apple.com/library/mac/#documentation/Carbon/Reference/MetadataAttributesRef/Reference/CommonAttrs.html#//apple_ref/doc/uid/TP40001694-SW1 for a

@class

2013-03-21 Thread H Miersch
hi. what exactly does @class do? and what does "forward declaration" mean? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.

iOS restricted distribution security question - is this the right place to ask it?

2013-03-21 Thread Alex Zavatone
I just ran in to a problem with an iOS app that is signed with an enterprise distribution profile (which is only supposed to allow the app to be installed on a few machines) being completely defeated if our unrestricted distribution profile is already installed on the iOS device. Basically, if

Re: @class

2013-03-21 Thread Roger Dalal
Google.com. Roger Dalal On Mar 21, 2013, at 4:45 PM, H Miersch wrote: > hi. > > what exactly does @class do? > > and what does "forward declaration" mean? > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin req

Re: @class

2013-03-21 Thread Jean Suisse
A few minutes search gave me this. While I haven't taken a deep look to these resources, they do look good. - What's a forward declaration ? (several languages including Obj-C) http://en.wikipedia.org/wiki/Forward_declaration - When to use a forward declaration (C++): http://stackoverflow.com/qu

Re: iOS restricted distribution security question - is this the right place to ask it?

2013-03-21 Thread Alex Zavatone
FYI, I created a different app ID, created another restricted distribution profile, republished the app and the problem appears to not be present. Install is restricted as expected. At first glance, it looks like if you have a distro profile for an iOS app that uses an app ID (wildcard in this

Re: Triggering an NSTextStorage Bug

2013-03-21 Thread Seth Willits
On Mar 21, 2013, at 11:39 AM, Seth Willits wrote: >>> The reason it's limited to 19 bits is because for speed purposes >>> NSParagraphStyle implements its own inline retain count rather than >>> relying on NSObject's external refcount table. Which is also why you >>> can't make ARC weak references

Re: Triggering an NSTextStorage Bug

2013-03-21 Thread Alex Zavatone
Any way to make sure it also goes into the openradar site? On Mar 21, 2013, at 7:14 PM, Seth Willits wrote: > On Mar 21, 2013, at 11:39 AM, Seth Willits wrote: > The reason it's limited to 19 bits is because for speed purposes NSParagraphStyle implements its own inline retain count r

Re: Number of chars

2013-03-21 Thread Aki Inoue
On Mar 21, 2013, at 6:05 PM, Andrew Thompson wrote: > > > On Mar 21, 2013, at 2:10 PM, Aki Inoue wrote: > >> For that matter, UTF-32 (aka UCS-4) is not safe to find the truncation >> boundary just at the 4-byte boundary. > > You're thinking of combining marks here? Yes. > It's generally c

PDF Images and NSSharingService

2013-03-21 Thread Graham Cox
Hi all, I'm just wondering whether anyone has much experience of using NSSharingService yet? I'm using the NSSharingServicePicker to pretty much handle everything, and my data consists of an NSImage initialised using PDF data I generate. I haven't tested actual connection to an external servic

Re: Number of chars

2013-03-21 Thread dangerwillrobinsondanger
To add to this a bit, you will want to consider normalizing you strings before and after conversion. This gives you some sense of consistency with regard to composed/decomposed characters. There are various normalized forms and NSString provides convenient methods. Choosing a normalized for

exc bad access when change the contentSize of popover

2013-03-21 Thread Peng Gu
** I have a button to trigger the popover, and a checkbox on the popover. The state checkbox of the checkbox is bound to a field 'checkboxState' of an NSManagedObject. Here is the scenario: 1. I click the button, the popover will show up. 2. I check the checkbox on the popover, then the po

Re: Watching a file for changes.

2013-03-21 Thread Christ Levesque
If you mean in a text edit is it so easy you can use observing mechanism on object that has changed. For instance you have a text edit app and you assume input to this app an NSString. Well you make a new class inherited from NSString and when this class's ivars changed you use addObserver:forK

Uncooperative Services Menu

2013-03-21 Thread David Burnard
At the moment our app doesn't support Services, so we don't register any types with registerServicesMenuSendTypes and when our app receives validRequestorForSendType we return nil. But we do have edit boxes, and they register their support for text types all on their own. We have a shortcut C

Re: Uncooperative Services Menu

2013-03-21 Thread Shane Stanley
On 21/03/2013, at 8:28 AM, David Burnard wrote: > At the moment our app doesn't support Services, so we don't register any > types with registerServicesMenuSendTypes > and when our app receives validRequestorForSendType we return nil. > > But we do have edit boxes, and they register their supp