On 2/10/17, 9:19 AM, "Keary Suska"
<cocoa-dev-bounces+cocoadev=xericdesign@lists.apple.com on behalf of
cocoa-...@esoteritech.com> wrote:
>
>> On Feb 10, 2017, at 9:12 AM, Trygve Inda <cocoa...@xericdesign.com>
>>wrote:
>>
>> When I close
When I close an NSDocument, it puts up a sheet offering (Don¹t Save,
Cancel, Save).
Is there a way to intercept this? I would like to disable the Save button
for a demo version of our app. I could mark the document as having no
changes, but then it would just close directly and not allow a cancel
>
>> On Aug 15, 2016, at 3:41 AM, Stephane Sudre wrote:
>>
>> . you could redefine the class name in the .pch of one project.
>
> +1 — I’ve had to do this before, and it works fine. Just add
> #define MyDisplayManager MyDisplayManager_PP
> or whatever.
>
> The caveat is
I have a Pref Pane and a Screen Saver module. They both share a common
helper class (MyDisplayManager).
When the pref pane has been loaded and I go into the screen saver (or vis
versa), because the host app is System preferences, I get:
Class MyDisplayManager is implemented in both One of
> To do it as one fetch you can set your predicate (or a sub predicate)
> as: [NSPredicate predicateWithFormat:@"%K in %@", primaryKey, keys] where
> primaryKey is the name of your ID property, and keys is an array of ID
> values which are "interesting" (as defined by the rest of your code).
>
> On Aug 6, 2016, at 1:46 AM, Trygve Inda <cocoa...@xericdesign.com> wrote:
>> For example, I would need to add items with ID# 204, 765, 983, 124, and 458
>> to the array. This seems like with Core Data it would be 5 different
>> fetches. Or is there some efficient
> Little different perspective, Core Data tends to work drop dead easy for
> simple stuff. Small data set with simple functionality should work straight
> out of the box easy.
>
> And there is nothing wrong with creating a manual array of managed objects
> from a Core Data result set.
Currently
I am considering moving an app to Core Data. Currently it manages an array
of InterestingObjects. I use NSArrayControllers and TableViews. Everything
works.
I have two cases:
1. I have one array of all InterestingObjects and I set different predicates
on the array controller to show only those
I have a class where I would like to have a method name like:
-(void)setMaximumOperations:(NSInteger)operations
{
[[self operationQueue] setMaxConcurrentOperationCount:operations];
... Do other stuff ...
}
Is this a bad idea? There is no property called "maximumOperations" in my
class but
>>
>> I would think that even with a retain it could get weird...
>>
>> The main thread wants to use the imageRef property so it calls:
>>
>> myRef = [window.imageRef];
>> [myref retain];
>>
>> If right between these calls, the worker thread calls setImageRef (on a
>> property with atomic,
>
>> On 27 Jul 2016, at 12:05 PM, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>> How is it retained by the main thread without an explicit retain call?
>>
>> I would be no different than a main thread calling:
>>
>> someVar [[MyObj alloc]
>
>> On 27 Jul 2016, at 10:05, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>>>
>>
>> How is it retained by the main thread without an explicit retain call?
>
> are you not using ARC? If you are then all such references, both variable and
>
>> On 27 Jul 2016, at 09:33, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>>
>>
>> If the worker thread calls window.imageRep = myResult; it is possible that
>> the main thread is in the mi
> e.g.
>
> worker thread:
>
> while( self.running )
> {
> // do work
>
> window.imageRep = myResult; // window.imageRep is (atomic, copy)
>
> [performOnMainThread: window.setNeedsDisplay]; // this is obviously
> pseudocode!
> }
>
>
> main thread, when it needs to terminate worker
> On Jul 22, 2016, at 19:29 , Graham Cox wrote:
>>
>> If the worker thread is waiting for -performOnMainThread to complete, it
>> *cannot* possibly get a call from the main thread to terminate
>
> I nodded agreement when I first read this, then “but wait!” …
>
> Your
>> Currently it blocks at this point, but I need to avoid that.
>
> It’s not really clear why this needs to be avoided. The time to draw the
> pixels should be a few milliseconds, a small fraction of the time your thread
> needs to run, even at its fastest.
Because the main thread sometimes
>
>> On 22 Jul 2016, at 4:08 PM, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>> I don't think the second part will work because of my workflow:
>>
>> At Launch: Create pixel buffer that is 1000 x 1000 pixels
>>
>> Looping thread
>>
>> This is how it works now, but we are running into a rare deadlock situation
>> where the main thread asks the worker thread to end (and waits until it does
>> so) while the worker thread is waiting for the image to be displayed.
>
> If the window has a imageRep property that is (atomic,
>
>> On 22 Jul 2016, at 4:40 PM, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>>
>>> With half an eye on performance, if you *do* strictly need a copy of the
>>> bitmap, note that NSBitmapImageRep conforms to NSCopying. You don’t have to
>>
> With half an eye on performance, if you *do* strictly need a copy of the
> bitmap, note that NSBitmapImageRep conforms to NSCopying. You don’t have to
> turn it into a TIFF and back again.
>
> Also, you don’t even need an NSImage - the NSImageRep can be drawn directly.
A little deeper
>
>> On 22 Jul 2016, at 3:37 PM, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>> I create an NSBitmapImageRep:
>>
>> [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
>> pixelsWide:pixelSize.width
>> pixelsHigh:pixelSize.height
>
I create an NSBitmapImageRep:
[[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
pixelsWide:pixelSize.width
pixelsHigh:pixelSize.height
bitsPerSample:8
samplesPerPixel:4
hasAlpha:YES
isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
bitmapFormat:NSAlphaFirstBitmapFormat
I have a custom window that basically eliminates the large title area.
When you drag a normal window to a second screen, as the drag is in
progress, the window appears semi-transparent on the second screen until
enough of the window covers the second screen, whereupon it becomes opaque
on the
I have a core data document-based app at the document level is a Core Data
type called Library, with a one to many relationship to type Element.
Element has a few properties but I want to allow the user to add others (of
type string only at this point).
So I have Element:
String name
String
My product is a System Preferences Pane. Its principal class is MyPrefPane
and is defined correctly in the Info.plist file under NSPrincipalClass.
The bug I am seeing happens when trying to install a new version over the
top of an older one if (and only if) System Preferences is closed or System
> This may be relevant, though it does talk about issues with pref panes as
> well.
>
> http://mjtsai.com/blog/2016/03/31/gatekeeper-bug-in-mac-os-x-10-11-4/
Yup. That sums it up.
The short story: tested with a default Xcode command line tool that says
"Hello World".
1) Build a command line
My app is built on 10.11.3. It is a prefPane with one command line tool and
three app bundles (four helper tools) in it's bundle. I am getting
GateKeeper warnings on 10.11.4 systems, but not on anything else.
It is manually codesigned with my Developer ID... first the helper tool
frameworks, then
I have a thread that is invoked with:
[NSThread detachNewThreadSelector:@selector(threadMethod:) toTarget:self
withObject:self];
It uses NSConditionLock and works well.
This thread performs a complex process but does it slowly so as to not use
much processor time. I specify how long I want it
> Ahh, the case of ambiguous ui
>
> Perhaps Disable OK while editing a cell; enable when edit ends, so
> Return Return accepts then closes?
>
> Gary
So how do I tell when editing begins since the control delegate is not
called when editing actually begins, but rather when the first key is
I have an NSTableView in a sheet. The sheet has an OK button which closes
the sheet (and is the default blue button).
If I am editing a line of text in the NSTableView and press return, I want
the editing to stop and be accepted, but I don't want the sheet to close due
to the OK button accepting
I am no longer able to generate a receipt after exiting with code 173.
When I launch, I get a box saying that the app was purchased on another
computer and that I need to validate it. I enter my Apple ID and password,
but I get "An unexpected error occurred while signing in"
The Apple ID could
I have an open bug report
rdar://24316348
Apple asked for an example to reproduce which I sent on January 27, but I
have heard nothing since. This is a fairly simple bug (NSTextFields can't
fully justify on 10.11).
How long should I expect to wait for a response?
Thanks,
Trygve
> If your hosting provider still charges an arm and a leg for SSL, switch.
I need SSL for multiple subdomains. My host (Pair Networks) charges $449/yr
for such a certificate. That seems really expensive. What are others paying
for this? I have been very happy with Pair as we run a complex server
I have image data that is stored in a 150mb file which I use mmap to read.
The image data is pulled into a NSBitmapImageRep pixel by pixel and
eventually shows on the screen. Only a subset of the pixel in the mmap file
are pulled into a single NSBitmapImageRep.
A few customers (and I have seen
I am trying to track down a difficult bug on a customer's machine.
I have inserted [NSThread callStackSymbols] at a critical place in the app
where I want to see how it got there.
When running a debug version, either in the debugger or not, I see:
2/3/16 10:53:51.070 PM MyApp Core[22398]: (
> Also, have you looked into setting up HTTPS on those servers instead of
> working around its absence? Part of the reason Apple added ATS was to nudge
> app developers to make their network connections more secure, which will
> benefit users.
It is basically a cost issue. It is expensive to set
> On 26 Jan 2016, at 9:55 pm, Trygve Inda <cocoa...@xericdesign.com> wrote:
>
>> connection failed: (null) The resource could not be loaded because the App
>> Transport Security policy requires the use of a secure connection.
>> http://www.earthdeskcloudhost02.c
>
>> On Jan 27, 2016, at 7:32 AM, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>> It is basically a cost issue. It is expensive to set up SSL certificates on
>> 8 different servers... It would cost us about $700/yr
>
> Sounds like you’re being
I am still getting an error despite my Info.plist beign configured correctly
(as far as I can tell).
Calls to http on my domain (xericdesign.com) work. Calls via http to my
other domain (earthdeskcloudhost02.com) do not work.
connection failed: (null) The resource could not be loaded because the
> If it's autolayout, double-check it, especially the priorities; it might be
> hugging more than you expect. What does the UI layout debugger show? I've
> found some layout surprises that way.
>
It is not using Auto-Layout. I tried creating one with
> On Jan 24, 2016, at 07:24 , Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>> It is not using Auto-Layout. I tried creating one with Auto-Layout and it
>> doesn't work either.
>
> For interest’s sake:
>
> a. If you specify the text field as being left
When running in 10.11, my fully justified text fields are no longer so...
They are left justified only.
Is there a fix for this?
Trygve
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
>
>> On Jan 23, 2016, at 7:44 PM, Trygve Inda <cocoa...@xericdesign.com> wrote:
>>
>> When running in 10.11, my fully justified text fields are no longer so...
>> They are left justified only.
>>
>> Is there a fix for this?
>
> Use an NSTextVi
One of my projects is a System Preference Pane. With 10.11, Xcode's debugger
can't debug it as I get a "can't attach to System Preferences because of
System Integrity Protection".
How can I debug my prefpane under 10.11, as I have done in every OS back to
10.3?
My main thread periodically downloads some data from a website. This is
extracted into an NSArray (non-mutable) and placed in a property:
@property (atomic, retain) NSArray* myArray;
[self setMyArray:webArray];
Ok so far... The atomic ensures that the property can be set correctly
even if other
On Aug 14, 2015, at 6:59 PM, Trygve Inda cocoa...@xericdesign.com wrote:
My main thread periodically downloads some data from a website. This is
extracted into an NSArray (non-mutable) and placed in a property:
@property (atomic, retain) NSArray* myArray;
NSString* someString
I have an NSTextField that is static and has multiple lines. Because of the
different font used in Yosemite, the line spacing is thicker and when
running on Yosemite, it requires more vertical space.
Is there a way to align the text to the bottom of the content box, rather
than the top?
It seems Apple is using retain rather than copy for NSString properties in
an NSManagedObject subclass.
I was always under the impression that copy should be used for NSString, so
why the retain??
Trygve
___
Cocoa-dev mailing list
“Setter methods on queue-based managed object contexts are thread-safe. You
can invoke these methods directly on any thread”
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreData
Framework/Classes/NSManagedObjectContext_Class/index.html
In Apple's example, they
On Jul 28, 2015, at 10:14 AM, Trygve Inda cocoa...@xericdesign.com wrote:
On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote:
I gather that when using NSPrivateQueueConcurrencyType, all operations (a
fetch for example) have to be done within a performBlock call
I gather that when using NSPrivateQueueConcurrencyType, all operations (a
fetch for example) have to be done within a performBlock call.
Apple has sample code here:
https://developer.apple.com/library/mac/samplecode/Earthquakes/History/Histo
On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote:
I gather that when using NSPrivateQueueConcurrencyType, all operations (a
fetch for example) have to be done within a performBlock call.
...
Then later, this context is used outside a performBlock:
NSArray
On 28 Jul 2015, at 9:12 pm, Trygve Inda cocoa...@xericdesign.com wrote:
I gather that when using NSPrivateQueueConcurrencyType, all operations (a
fetch for example) have to be done within a performBlock call.
...
Then later, this context is used outside a performBlock:
NSArray
My Preference Pane is able to import/export data in a custom format and I'd
like to put this into a document with a specific filename extension. This
obviosuly works for apps, but is ther ea way to do it with a Pref Pane?
If the user double clicked a document, I'd want System preferences to open
In my delegate:
-(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray
*)transactions
I call: (to make sure we are on the main thread):
case SKPaymentTransactionStatePurchased:
[self
performSelectorOnMainThread:@selector(completeTransaction:)
On Jan 29, 2015, at 9:44 PM, Trygve Inda cocoa...@xericdesign.com wrote:
However, naming conventions expect copy to not
be autoreleased so should the above really be:
return ([copy retain]);
Yes, if you're really still not using ARC ;-)
—Jens
I am not using ARC - this is a large
On Jan 30, 2015, at 7:26 AM, Trygve Inda cocoa...@xericdesign.com wrote:
On Jan 29, 2015, at 9:44 PM, Trygve Inda cocoa...@xericdesign.com wrote:
However, naming conventions expect copy to not
be autoreleased so should the above really be:
return ([copy retain]);
Yes, if you're
I have a custom class (MyCustomClass) and within another class I need to
have MyCustomClass be a property whereby I make a copy (vs retaining).
MyCustomClass is quite complex and so I was considering using:
-(id)copyWithZone:(NSZone *)zone
{
MyCustomClass* copy = [NSKeyedUnarchiver
On 2015/01/26, at 14:54, Eric Schlegel eri...@apple.com wrote:
Even if you force it under the menubar, you won’t see its content show up in
the menubar; the menubar window pulls its blurred content exclusively from
the desktop image.
-eric
But you could then create some excessive
On 26 Jan 2015, at 05:39, Trygve Inda cocoa...@xericdesign.com wrote:
I have created a borderless NSWindow. Is there a way to force it to appear
under the menu bar so that the content of the window shows through the
translucent menu bar?
The OS seems to be resizing or repositioning my
On Jan 25, 2015, at 12:33 , Trygve Inda cocoa...@xericdesign.com wrote:
It does seem like if I remove a call to
NSData* imageData = [[self myImageRep]
representationUsingType:NSJPEGFileType properties:imageProperties];
It no longer crashes, but the crash happens 3-5 seconds after
I have created a borderless NSWindow. Is there a way to force it to appear
under the menu bar so that the content of the window shows through the
translucent menu bar?
The OS seems to be resizing or repositioning my window to prevent it from
sliding under the menu bar even when positioned
What are you using for memory management then? Manual, GC?
Sent from my iPad
On 25 Jan 2015, at 22:57, Trygve Inda cocoa...@xericdesign.com wrote:
On Jan 25, 2015, at 12:33 , Trygve Inda cocoa...@xericdesign.com wrote:
It does seem like if I remove a call to
NSData* imageData
I am getting a very weird, random crash in:
libsystem_kernel.dylib`__workq_kernreturn:
0x7fff8381de60: movl $0x2000170, %eax
0x7fff8381de65: movq %rcx, %r10
0x7fff8381de68: syscall
0x7fff8381de6a: jae0x7fff8381de74; __workq_kernreturn + 20
0x7fff8381de6c: movq %rax,
Apple says:
It is not safe to remove, replace, or add to a mutable collection’s elements
while enumerating through it. If you need to modify a collection during
enumeration, you can either make a copy of the collection and enumerate using
the copy or collect the information you require during
I am getting an error in the Console when shutting down a FSEvent monitor
I have verified that [self prefBundlePath] points to a valid directory (a
prefpane bundle).
BUG in libdispatch client: kevent[EVFILT_WRITE] delete: No such file or
directory - 0x2
-(void)addFileEventCallback
{
On Jan 17, 2015, at 2:27 PM, Trygve Inda cocoa...@xericdesign.com wrote:
I am getting an error in the Console when shutting down a FSEvent monitor
I have verified that [self prefBundlePath] points to a valid directory (a
prefpane bundle).
BUG in libdispatch client: kevent[EVFILT_WRITE
I call:
NSData* bookmarkData = [url
bookmarkDataWithOptions:NSURLBookmarkCreationMinimalBookmark
includingResourceValuesForKeys:nil
relativeToURL:nil
error:inError];
And later:
NSDictionary* dict = [NSURL resourceValuesForKeys:[NSArray
arrayWithObject:NSURLPathKey] fromBookmarkData:[self
On 6 Jan 2015, at 16:25, Trygve Inda cocoa...@xericdesign.com wrote:
What then is the best way to do what I need?
I am saving a bookmark to a file and later on I need to display the filename
associated with that Bookmark.
Currently I am getting the path and taking the last component
On Jan 6, 2015, at 8:43 PM, Trygve Inda cocoa...@xericdesign.com wrote:
Ultimately what I need to able to do is compare a bookmark to a path.
Why? Or rather, what is the reason underlying that one?
I am keeping a database of files that the user adds to a database.
Internally I keep
On Jan 6, 2015, at 7:40 PM, Kyle Sluder k...@ksluder.com wrote:
On Jan 6, 2015, at 5:05 PM, Trygve Inda cocoa...@xericdesign.com wrote:
If I bookmark a file and the case of any folders or the file itself changes,
then later when I extract the path from the bookmark I want it to reflect
On 5 Jan 2015, at 10:11 AM, Trygve Inda cocoa...@xericdesign.com wrote:
I am using URLByResolvingBookmarkData .
If I make a Bookmark to a file:
/Volumes/Macintosh HD/Documents/MyFile.txt
and later resolve it with URLByResolvingBookmarkData, I get the original path
as expected
I am using URLByResolvingBookmarkData .
If I make a Bookmark to a file:
/Volumes/Macintosh HD/Documents/MyFile.txt
and later resolve it with URLByResolvingBookmarkData, I get the original
path as expected.
Then if I change the filename to MYFILE.txt in the Finder and resolve the
bookmark
I am running 10.9.5 with two displays.
I call:
// Prepare status item
[self setStatusItem:[[NSStatusBar systemStatusBar]
statusItemWithLength:24]];
[statusItem setEnabled:YES];
[statusItem setHighlightMode:YES];
[statusItem setMenu:statusMenu];
[statusItem setImage:[NSImage
I have an array of objects that looks like:
{
NSString* name;
NSDate*date;
NSArray* words;
}
The words array looks like:
{
NSString* id;
NSString* word;
}
I need to build a Predicate Row template to result in a way to search for
names, dates, and words. The first two
{
NSString* name;
NSDate*date;
NSArray* words;
}
Objects;
The words array looks like:
{
NSString* id;
NSString* word;
}
Words;
As a follow up:
When I use a left expression of:
@words.word
And a modifier of: NSAnyPredicateModifier
My predicate ends up as:
ANY words.word
FYI, I use my 17 with my 27 Thunderbolt display and it works fine under all
Mac operating systems from the past few years.
Using it with a 15 retina MBP also works fine. It's more readable than the
15.
This is just for reference.
Is there a Thunderbolt adaptor for your 30?
It is
I have a 30 Apple Cinema Display that used to be hooked up to a 17 MBP. I
just upgraded to a 15 MBP with Retina display and have the 30 Cinema
display hooked up to it via a Dual Link Adapter.
So I have the built-in retina display and a 30 non retina display.
I am running 10.9.5.
On my old
I have a project that involves several different targets.
Included in all this is a set of related utility methods that need to be
used by different sections of the code. I am wondering how is the best way
to do this so that I don't have the same utility methods written in
different places.
1. I
This crash is when trying to read from a file (130mb) that has been mmap'd.
It only happens rarely, and only when waking from sleep, but happens on both
10.8 and 10.9. It is almost like the mmap memory is not available right when
the system is woken up
Any ideas?
Exception Type:
On 12 Jul 2014, at 10:05 pm, Trygve Inda cocoa...@xericdesign.com wrote:
---someProperty (Custom NSObject)
--propertyA (NSNumber)
--propertyB (NSNumber)
--propertyC (NSNumber)
Properties A, B and C use a binding to connect them to a user interface item
with something like
On 12 Jul 2014, at 10:05 pm, Trygve Inda cocoa...@xericdesign.com wrote:
---someProperty (Custom NSObject)
--propertyA (NSNumber)
--propertyB (NSNumber)
--propertyC (NSNumber)
Properties A, B and C use a binding to connect them to a user interface item
with something like
On 14 Jul 2014, at 7:29 am, Trygve Inda cocoa...@xericdesign.com wrote:
Is NSInteger treated the same way? This page does not mention it:
NSInteger is a typedef for 'long', which size depends on the platform (32/64
bit), so valueForKey: will wrap it as a NSNumber using type 'long
On 14 Jul 2014, at 7:29 am, Trygve Inda cocoa...@xericdesign.com wrote:
Is NSInteger treated the same way? This page does not mention it:
NSInteger is a typedef for 'long', which size depends on the platform (32/64
bit), so valueForKey: will wrap it as a NSNumber using type 'long
My object layout looks like:
-MyObject (custom NSObject)
---someProperty (Custom NSObject)
--propertyA (NSNumber)
--propertyB (NSNumber)
--propertyC (NSNumber)
Properties A, B and C use a binding to connect them to a user interface item
with something like:
Bind to MyObject with key
I have a nib that has several custom objects instantiated in it:
NIB
-ObjectA // contains outlets ABC
-ObjectB // contains outlets DEF
When object A receives awakeFromNib, I know that outlets A, B and C are
hooked up, but it is also safe to call a method in ObjectB that requires
ObjectB to have
The nib is only ‘awake’ after all connections in the graph have been made.
On Jul 4, 2014, at 11:18 PM, Trygve Inda cocoa...@xericdesign.com wrote:
So the bottom line is:
When an object in a nib receives awakeFromNib are all the outlets throughout
the entire nib hooked up, or only those
On Jul 4, 2014, at 8:18 PM, Trygve Inda cocoa...@xericdesign.com wrote:
When an object in a nib receives awakeFromNib are all the outlets throughout
the entire nib hooked up, or only those outlets in the object that is
receiving awakeFromNib?
All the outlets are hooked up. But not all
On 5 Jul 2014, at 1:56 pm, Trygve Inda cocoa...@xericdesign.com wrote:
As long as A can call into B C and know that B C have their outlets
hooked up, that's fine.
You can rely on all outlets being connected. What you can't rely on is the
order in which each object's -awakeFromNib
I have an app that normally exists as a System Preference Pane. To get it to
work in an app, and share the same code as the prefPane, I built a small
host app that simply loads the prefPane (a Mach-O bundle) with:
[self setPaneObject:[[[paneClass alloc] initWithBundle:paneBundle]
autorelease]];
On 22 Jun 2014, at 00:20, Trygve Inda cocoa...@xericdesign.com wrote:
FSPathMakeRef is deprecated in 10.8, but LSSetItemAttribute requires an
FSRef. Is there a correct way to create an FSRef or perhaps there is a
replacement for LSSetItemAttribute to modernize:
LSSetItemAttribute(fsRef
I have an app that was easy to get into the pre-sandbox App Store and am
trying to find a way to get it back in there.
There are actually two apps.. A GUI and a Renderer.
The GUI controls all the settings, starts and stops the renderer and, while
the renderer is running, sends messages to the
FSPathMakeRef is deprecated in 10.8, but LSSetItemAttribute requires an
FSRef. Is there a correct way to create an FSRef or perhaps there is a
replacement for LSSetItemAttribute to modernize:
LSSetItemAttribute(fsRef, kLSRolesAll, kLSItemQuarantineProperties, NULL);
Thoughts?
I would think 'copy' would still be ok with this (for example in the case of
NSStrings) since that should still be released. For 'assign' I can see the
advantage.
It’s not just an advantage, it’s avoiding a crasher, most likely, and where
it’s not, it’s avoiding silently corrupting an
On 19 Jun 2014, at 3:30 pm, Trygve Inda cocoa...@xericdesign.com wrote:
Should I be doing:
self.myProperty = [coder decodeObjectForKey:kMyProperty];
(isn't that effectively the same as a getter/setter)?
Yep, it's the same, so you will gain nothing there.
Guessing it would
If I have a class:
@interface MyClass : NSObject
{
NSNumber*myNumber;
}
@property (nonatomic, retain) NSNumber* myNumber;
And in the class implementation I have:
-(void)doSomething
{
// it could get this string from anywhere, not always a constant
NSString* myString =
On 19 Jun 2014, at 4:53 am, Daniel DeCovnick danhd...@mac.com wrote:
Yes. You can either use key-value coding: [[self valueForKey:myString]
release];
[value release];
These invocations of -release appear to be erroneous. Why do you have them
there? If you think they should be
On 19 Jun 2014, at 10:57 am, Trygve Inda cocoa...@xericdesign.com wrote:
The method propertyKeys (below) is used to simplify and shorten the code in
these classes since I want to encode/decode and (upon dealloc), release all
the properties.
-(void)dealloc
{
for (NSString* key
A performance related argument: using property getters and setters in
-initWithCoder: and -encodeWithCoder: can bring with them serious performance
issues. Might not matter in your case, or in most cases, but it really adds up
if you have a large and complex object graph. A recent exercise
I need to store a large collection of settings (not application preferences,
but parameters describing how complex data is to be displayed) and am
looking for pros/cons as to the best way.
At the top I have a class called MySettings. Within this I need to have
groups of related settings. They can
1 - 100 of 439 matches
Mail list logo