On Mon, Dec 14, 2009 at 10:39 PM, Tino Rachui
wrote:
> Why does setting a frame on the layer increments its retain count?
> What am I missing?
Stop caring about retain count. Follow the memory management rules
and be done with it.
--Kyle Sluder
___
C
This puzzles me a bit:
...
NSUInteger rc;
CALayer *layer = [CALayer layer];
rc = [layer retainCount];
// rc == 1 as expected
layer.frame = CGRectMake(...);
rc = [layer retainCount];
// now rc == 2, it's not clear to me why
...
Why does setting a frame on the layer increments its retain count?
Wha
gMail.com wrote:
Thanks, in the meantime I realized that I had to change imagePtr
from int
into an NSInteger. Now it works. Do you think it is ok?
The standardized size_t typedef would be a better choice than
NSInteger. The latter is signed.
Handle imagesH = NewHandleClear(t
On Dec 14, 2009, at 9:59 PM, PCWiz wrote:
> What if I used NSInvocationOperation like this:
>
> NSInvocationOperation *myOperation = [[NSInvocationOperation alloc]
> initWithTarget:self
>selector:@selector(doResourceHungryTask) object:nil];
> [operationQueue addOperation:myOperation];
>
> "
On 14 Dec 2009, at 11:06, gMail.com wrote:
> Handle imagesH = NewHandleClear(totImages * oneImageSize);
Wait, Handle? NewHandleClear? Your use of these functions suggests that you may
be working from a dangerously old textbook. There's really no reason to use
them in new code._
Ah I understand, that makes sense. Thanks.
On 2009-12-14, at 9:09 PM, Nick Zitzmann wrote:
>
> On Dec 14, 2009, at 9:07 PM, PCWiz wrote:
>
>> So to make it clear, I invoke the method as an NSInvocationOperation then in
>> the method I do this whenever I need to access the mutable dictionary:
>
On Dec 14, 2009, at 9:07 PM, PCWiz wrote:
> So to make it clear, I invoke the method as an NSInvocationOperation then in
> the method I do this whenever I need to access the mutable dictionary:
>
> - (void)doResourceHungryTask {
> ...
> @synchronized (myDictionary) {
>
Ok, I think I understand this after reading this document:
http://developer.apple.com/mac/articles/cocoa/managingconcurrency.html
So to make it clear, I invoke the method as an NSInvocationOperation then in
the method I do this whenever I need to access the mutable dictionary:
- (void)doResourc
Putting my “Moderator/Dev Publications Engineer/Writer hat on”
I’ve asked Jerry off-list for the radar number to follow up on the developer
documentation issue. If it isn’t a technical issue, it could be redirected
there I suppose, but that’s the only reason I can think of.
I’ve asked my manag
On Dec 14, 2009, at 8:59 PM, PCWiz wrote:
> "doResourceHungryTask" would be a method in my delegate class. Would I still
> need to lock/unlock (I'm modifying the class's properties from itself, not
> another class)? I'm not sure on the exact workings of NSInvocationOperation,
> I just found ou
What if I used NSInvocationOperation like this:
NSInvocationOperation *myOperation = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(doResourceHungryTask) object:nil];
[operationQueue addOperation:myOperation];
"doResourceHungryTask" would be a method in my delegate cla
I am not grasping how coordinates work in a rotated iPhone app, and I'm
hoping someone will explain them.
My goal is a scroll view consisting of two equal "pages" side by side with
the iPhone sideways (landscape). I have accomplished this, but I don't
understand how I did it; I used pure trial and
On Dec 14, 2009, at 6:54 PM, PCWiz wrote:
> On 2009-12-14, at 5:51 PM, Nick Zitzmann wrote:
>
>> On Dec 14, 2009, at 5:19 PM, PCWiz wrote:
>>
>>> I need to modify an NSMutableDictionary in my delegate class from within an
>>> NSOperation subclass. What's the best way to do this? I could just us
Some time ago we had a discussion as to whether documentation bugs should be
reported to the "Did this document help you?" link at the bottom, or by filing
a Bug Report. The conclusion at the time was that, although both were
acceptable, the formal Bug Report was better.
Apparently, no more.
On Dec 14, 2009, at 5:54 PM, PCWiz wrote:
> Its being loaded into an NSOperationQueue, and I'm using methods like
> setObject:forKey: on the dictionary, not replacing the whole thing.
Then you need to lock and unlock everything that reads from or writes to the
dictionary. Properties are no sub
Its being loaded into an NSOperationQueue, and I'm using methods like
setObject:forKey: on the dictionary, not replacing the whole thing.
Thanks
On 2009-12-14, at 5:51 PM, Nick Zitzmann wrote:
>
> On Dec 14, 2009, at 5:19 PM, PCWiz wrote:
>
>> I need to modify an NSMutableDictionary in my dele
On Dec 14, 2009, at 5:19 PM, PCWiz wrote:
> I need to modify an NSMutableDictionary in my delegate class from within an
> NSOperation subclass. What's the best way to do this? I could just use the
> property setter method, but is this even acceptable?
More details, please. Is your operation en
I'm trying to use guessesForWordRange:inString:language:inSpellDocumentWithTag:
and have it use automatic language guessing, but it doesn't seem to work.
At first I was just passing a word, and despite it being in Russian letters, I
figured it didn't have enough context to guess. So I passed
I need to modify an NSMutableDictionary in my delegate class from within an
NSOperation subclass. What's the best way to do this? I could just use the
property setter method, but is this even acceptable?
Thanks___
Cocoa-dev mailing list (Cocoa-dev@lis
On 14 Dec 2009, at 23:01, David Hirsch wrote:
> (After drafting the first version of this email, I found a sort-of solution,
> but I do not understand why it works. I thought that simple properties
> (e.g., object.foo) essentially just called the foo:/setFoo: methods,
> particularly if you us
Sorry - found the primary problem. Should have been this line:
Instance *instanceToAlter = [newConfig.instances
objectAtIndex:randInstance];
instead of:
Instance *instanceToAlter = [self.instances
objectAtIndex:randInstance];
However, I'm still mystified by the manifestation of the erro
(After drafting the first version of this email, I found a sort-of
solution, but I do not understand why it works. I thought that simple
properties (e.g., object.foo) essentially just called the foo:/setFoo:
methods, particularly if you used @property (assign). That is
apparently not the
On Dec 14, 2009, at 3:04 PM, Scott Ribe wrote:
Smooth scrolling is an abomination anyway, by way of Microsoft, a
feature
that looked cool to some developer but has awful usability.
With line-by-line scrolling you can actually read the top or bottom
lines as
they go by, and determine your pl
RegexKit is the best (read: simplest) way to get regular expression support
into your Cocoa apps. http://regexkit.sourceforge.net It's also possible to
use NSPredicate for simple matching.
You can find a couple of other options listed on this page:
http://cocoaheads.byu.edu/resources/regex
I was sort of suspecting that regular expression matches would be supported by
NSString yet I find no message interface for supporting regular expressions.
So, is the only capability for handling regular expressions in Objective-C the
Posix Regex library?
phil
phys...@mac.com
Thanks. Those are relatively new. I had forgotten about them. I think
that did solve a few problems. However, I found that it doesn't set the
container or frame length. Unfortunately, that API is private, so I had to
find another way.
I'm flipping text both H and/or V, scaling, and slow scroll
Sorry ... I had cloned from an sdef file that I had lying around. In its app
suite was an override of the 'open' AppleScript command which was not
applicable to the current app.___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post
Thank you for the thoughts, guys.
Sean, I just verified that Apple's DepartmentAndEmployees responds OK.
But today, after making some other changes, my app is behaving differently.
With AEDebugReceives=1, I see that it receives the SSys/odoc Apple Event with
the file url in the data. What's s
Smooth scrolling is an abomination anyway, by way of Microsoft, a feature
that looked cool to some developer but has awful usability.
With line-by-line scrolling you can actually read the top or bottom lines as
they go by, and determine your place in the document as it scrolls. With
smooth scrolli
Many thanks and very good to know.
On Mon, Dec 14, 2009 at 3:55 PM, Henry McGilton (Boulevardier) <
appledevelo...@trilithon.com> wrote:
>
> On Dec 14, 2009, at 12:45 PM, Eric E. Dolecki wrote:
>
> I was receiving malloc double free errors when a view removed itself, so
> all
> of the releases I
On Dec 14, 2009, at 12:45 PM, Eric E. Dolecki wrote:
> I was receiving malloc double free errors when a view removed itself, so all
> of the releases I was doing in the view I commented out, the view killing
> itself after it animates from visual view:
>
> - (void) killMe:(NSString *)animationID
Thanks to all ... I was unaware of the "Open With Rosetta" option in
Get Info.
I just had the user uncheck it and my code is running fine.
So, how did it get checked in the first place ... hmm mystery as the
user says she did not do it
She did have a dealer tech rep out a few days ago, I
I was receiving malloc double free errors when a view removed itself, so all
of the releases I was doing in the view I commented out, the view killing
itself after it animates from visual view:
- (void) killMe:(NSString *)animationID finished:(NSNumber *)finished
context:(void *)context {
[self.v
On Dec 14, 2009, at 12:16 PM, Matthew Lindfield Seager wrote:
> That belongs to the preceding LSTypeIsPackage key.
Yea, I was still sleeping when I responded to that last post. ;) Turned out
that resource CFBundleDisplayName/CFBundleDocumentTypes should not have even
been in the plist file
On Dec 14, 2009, at 1:21 PM, Rippit the Ogg Frog wrote:
> It can happen that there are Rosetta bugs that don't occur on native PowerPC
> hardware. While that shouldn't ever be the case, we all know that
> programmers are only human.
Well, for starters, the garbage collector doesn't work under
From your crash log:
Code Type: PPC (Translated)
"Translated" - does that mean it's running under Rosetta on Intel?
It can happen that there are Rosetta bugs that don't occur on native
PowerPC hardware. While that shouldn't ever be the case, we all know
that programmers are only huma
On 14 Dec 2009, at 19:40, David Blanton wrote:
>
>
> I ask this here as I have seen questions on Crash Reports.
>
> This is is Universal Binary ... why is there any PPC involved as it is
> running on Intel
>
> This is an iMac
Code type says it all. "PPC (Translated)". i.e. the user has forc
That looks an awful lot like it's running via rosetta. Perhaps the
user has done Get Info on your app and ticked the 'Open using Rosetta'
box?
2009/12/14 David Blanton :
>
>
> I ask this here as I have seen questions on Crash Reports.
>
> This is is Universal Binary ... why is there any PPC invo
I ask this here as I have seen questions on Crash Reports.
This is is Universal Binary ... why is there any PPC involved as it is
running on Intel
This is an iMac
Can anyone shed some light for me ? Or tell me where to go with this
type of issue ..
Thanks
db
Process: Conve
> Thanks, in the meantime I realized that I had to change imagePtr from int
> into an NSInteger. Now it works. Do you think it is ok?
Well you found the crash, and the code now looks like it is "ok" in terms of
allocating the right amount of memory. But it's still a confusing mess that
is difficul
Not directly related to your problem but just for your info...
On Tuesday, December 15, 2009, Joe The Programmer
wrote:
>Regardless, there seems to be an erroneous in there.
That belongs to the preceding LSTypeIsPackage key.
___
Cocoa-dev mailing li
Thanks, looks like what I need :-)
On 2009-12-14, at 11:42 AM, Ross Carter wrote:
> On Dec 13, 2009, at 8:55 PM, PCWiz wrote:
>
>> Hi,
>>
>> I am, for lack of a better word, "enabling" links in my
>> NSMutableAttributedString by applying the NSLinkAttributeName attribute to
>> them, and I'm c
Thanks, in the meantime I realized that I had to change imagePtr from int
into an NSInteger. Now it works. Do you think it is ok?
#define kDepth 32
NSInteger oneImageSize = width * height * (kDepth >> 3);
Handle imagesH = NewHandleClear(totImages * oneImageSize);
NSInteger
On Dec 14, 2009, at 10:50 AM, Gordon Apple wrote:
Any ideas on how to force a full layout and then prevent NSTextView
from
further mucking with it?
One of NSLayoutManager's -ensureLayout... methods would be a good bet
here.
Douglas Davidson
_
Apparently, I'm not the only one who has experienced this. NSTextView (or
NSLayoutManager) is lazy. It does stuff in the background that is driving
me nuts. I need to do a full layout, not just what's visible, so I can get
a reliably accurate measure of the total physical text layout length. I'
On Dec 14, 2009, at 10:27, gMail.com wrote:
> if I compile this code against "32-bits Universal", it works.
> If I compile this code against "64-bit Intel", it doesn't work.
> I get a bad access error just on memcpy. What do I miss? I use:
>
>Base SDK 10.6
>i386 ppc ppc64 ppc7400 ppc970 x
On Dec 13, 2009, at 8:55 PM, PCWiz wrote:
> Hi,
>
> I am, for lack of a better word, "enabling" links in my
> NSMutableAttributedString by applying the NSLinkAttributeName attribute to
> them, and I'm changing their color from the default blue to a different color
> using NSForegroundColorAttr
Have you read the 64 bit transition guide?
http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/Cocoa64BitGuide/Introduction/Introduction.html
Your question (use of int) suggests not.
On 14 Dec 2009, at 18:27, gMail.com wrote:
> Hi,
> if I compile this code against "32-bits Univ
On Dec 14, 2009, at 1:27 PM, gMail.com wrote:
> Hi,
> if I compile this code against "32-bits Universal", it works.
> If I compile this code against "64-bit Intel", it doesn't work.
> I get a bad access error just on memcpy. What do I miss? I use:
>
>Base SDK 10.6
>i386 ppc ppc64 ppc7400
On Dec 11, 2009, at 6:45 PM, Chunk 1978 wrote:
> i haven't yet started to study OpenGL, but i just came across a java
> sample online that creates a water effect, and the sample code was
> surprisingly quite small.
>
> here is the java example: http://www.neilwallis.com/java/water.html
>
> esse
Le 14 déc. 2009 à 19:13, Sean McBride a écrit :
> On 12/12/09 11:12 PM, Jerry Krinock said:
>
>> Working on a Core Data document-based app. Executing the following
>> AppleScript:
>>
>> tell application "MyApp"
>> open POSIX file "/path/to/SomeDocument"
>> end tell
>>
>> results in progr
Hi,
if I compile this code against "32-bits Universal", it works.
If I compile this code against "64-bit Intel", it doesn't work.
I get a bad access error just on memcpy. What do I miss? I use:
Base SDK 10.6
i386 ppc ppc64 ppc7400 ppc970 x86_64
GCC 4.2 or 4.0
Target Mac OS X 10.6
On 12/12/09 11:12 PM, Jerry Krinock said:
>Working on a Core Data document-based app. Executing the following
>AppleScript:
>
>tell application "MyApp"
> open POSIX file "/path/to/SomeDocument"
>end tell
>
>results in program receiving signal EXC_BAD_ACCESS here
This works in my NSPersiste
And indeed, your plist is broken. CFBundleDisplayName should be a string not
an array. It seems that what is "CFBundleDisplayName" should be
"CFBundleDocumentTypes".
--
Julien
On Mon, Dec 14, 2009 at 3:29 PM, Joe The Programmer <
joetheappleprogram...@gmail.com> wrote:
>
> On Dec 14, 2009, at 4
On 13 dec 2009, at 23.06, Joar Wingfors wrote:
>> Two occurrences of the following massage are appearing in the console:
>> -[NSCFArray _getCString:maxLength:encoding:]: unrecognized selector sent to
>> instance 0x4016e0
>
> That's almost certainly an indication of a memory management error in
On 11 Dec 2009, at 17:57, Stephen Blinkhorn wrote:
I'm writing the Cocoa GUI for an audio unit plugin and I've run into
a problem. In one host app I'm not receiving mouse events in my
custom sliders/buttons etc. My drop down menus work fine but they
are subclasses of NSPopUpMenu and NSPop
On Dec 14, 2009, at 4:28 AM, Julien Jalon wrote:
> It's not necessarily a memory management problem. As this happens very early
> in the application launch, when Launch Services uses your Info.plist to
> register the application, your problem might also be that an entry supposed
> to be a stri
On Dec 14, 2009, at 5:48 AM, Kiran Kumar S wrote:
Have you changed the storetype to binary in info.plist file
The info.plist file (used for development) currently has four document
types, default, binary, sqlite, and xml. I started with the apple
template which has the three document type
Have you changed the storetype to binary in info.plist file
Regards
SKiran
On 14-Dec-09, at 6:11 PM, Richard Somers wrote:
I have a Core Data document based application.
Saving the file as XML or SQLite works fine.
Saving as binary results in an error: *** -[NSKeyedArchiver
encodeValue
On 14 Dec 2009, at 18:09, Graham Cox wrote:
>
> On 14/12/2009, at 10:00 PM, Graham Cox wrote:
>
>>
>> On 14/12/2009, at 9:56 PM, Gerriet M. Denkmann wrote:
>>
>>> I have an NSTableView with just one column, filled by some
>>> NSArrayController.
>>>
>>> Initially the items are not in any rec
I have a Core Data document based application.
Saving the file as XML or SQLite works fine.
Saving as binary results in an error: *** -[NSKeyedArchiver
encodeValueOfObjCType:at:]: this archiver cannot encode structs.
The struct in question is a transformable attribute using a custom
value
When I use rangeOfString: options with NSDiacriticInsensitiveSearch not only
the tone marks are ignored, but also some vowels.
Same problem with NSPredicate "someKey =[d] someValue".
It is true that in unicode-speak both the tone marks and the ignored vowels are
categorized as Nonspacing_Ma
Hi all, just throwing this one out there, see if it's worth anything.
I'm having a problem tracking down a very elusive memory management bug. It's a
simple over-release, somewhere, but extremely rarely. The problem is that the
only reports I've had of it so far are field reports indicating a cr
It's not necessarily a memory management problem. As this happens very early
in the application launch, when Launch Services uses your Info.plist to
register the application, your problem might also be that an entry supposed
to be a string is in fact an array.
On Mon, Dec 14, 2009 at 9:09 AM, Joe
On 14/12/2009, at 10:00 PM, Graham Cox wrote:
>
> On 14/12/2009, at 9:56 PM, Gerriet M. Denkmann wrote:
>
>> I have an NSTableView with just one column, filled by some NSArrayController.
>>
>> Initially the items are not in any recognizable order.
>> When I click on the NSTableHeaderView a tri
On 14/12/2009, at 9:56 PM, Gerriet M. Denkmann wrote:
> I have an NSTableView with just one column, filled by some NSArrayController.
>
> Initially the items are not in any recognizable order.
> When I click on the NSTableHeaderView a triangle appears and now the items
> are nicely sorted.
>
>
I have an NSTableView with just one column, filled by some NSArrayController.
Initially the items are not in any recognizable order.
When I click on the NSTableHeaderView a triangle appears and now the items are
nicely sorted.
Is it possible (either in InterfaceBuilder or programmatically) to ma
On Dec 14, 2009, at 12:52 AM, Kyle Sluder wrote:
> Turning on GC is not the solution to your problem. Fixing your memory
> management bugs is the solution.
On Dec 14, 2009, at 12:54 AM, Joar Wingfors wrote:
> For a trivial app it might be. For anything else, it would not be. GC and RC
> are fu
68 matches
Mail list logo