On Nov 19, 2008, at 3:59 AM, mmalcolm crawford wrote:
On Nov 18, 2008, at 10:01 AM, Brian Stern wrote:
OK Erik, I'll bite. What you describe above is correct as far as
it goes. However, when you say all the memory management is
handled in one place, of course it's two. The object has
On Nov 19, 2008, at 10:29 AM, Greg Titus wrote:
On Nov 19, 2008, at 7:00 AM, Brian Stern wrote:
This leaves us for now with two solutions:
(a) Greg's (override setView:) which is more future-proof but is
in many respects academically unsatisfying.
(b) For non-top-level-object, specify
be unloaded many times. And that's all fine. It just doesn't
make any sense to load it in response to a memory warning.
That's why I said upthread that self.view will never be non-nil.
I'm starting to think that maybe using the assign properties is the
better way to handle this.
--
Brian Stern
. The official guideline is, AFAIK, to not
call through your properties in init / dealloc.
For whatever reason UIViewController sets its view property to nil
from its dealloc method. Greg's override of setView is based on this
behavior.
--
Brian Stern
[EMAIL PROTECTED
to want
to retain an outlet. Having outlets be retained by default gives my
code no benefit, and causes some complications.
--
Brian Stern
[EMAIL PROTECTED]
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
. The problem is that the base class
doesn't always release its view in response to a memory warning and as
far as I can tell the subclass has no clean way of telling if the view
will be released or has been released. That's the problem.
--
Brian Stern
[EMAIL PROTECTED
the
UIViewController unloads its view, and not otherwise.
Hope this helps,
- Greg
On Nov 18, 2008, at 10:01 AM, Brian Stern wrote:
OK Erik, I'll bite. What you describe above is correct as far as
it goes. However, when you say all the memory management is
handled in one place, of course it's two
iPhone
developers found non-Apple forums to discuss iPhone development so any
guidance that Apple might have had over how to write proper apps has
been very late in coming.
I do use IB for a lot of my UI on iPhone but quite a bit of it is in
code also.
--
Brian Stern
[EMAIL PROTECTED
On Nov 17, 2008, at 6:19 PM, Kyle Sluder wrote:
On Mon, Nov 17, 2008 at 5:25 PM, Brian Stern
[EMAIL PROTECTED] wrote:
I can tell you that the majority of iPhone developers are refusing
to use
IB. The reasons I usually see are
I didn't get the implication that the OP was doing iPhone
this isn't (only)
related to didReceiveMemoryWarning (which I hadn't considered related
to this problem until you raised it).
Is this the way that things are supposed to work on iPhone OS?
--
Brian Stern
[EMAIL PROTECTED]
___
Cocoa-dev mailing list
On Nov 17, 2008, at 10:17 PM, Luke the Hiesterman wrote:
On Nov 17, 2008, at 7:12 PM, Brian Stern wrote:
OK, this issue has come up for me very recently. It appears that
on iPhoneOS IBOutlets are retained, regardless of the presence of
properties. Even worse, in the presence
On Nov 17, 2008, at 10:53 PM, Luke the Hiesterman wrote:
On Nov 17, 2008, at 7:46 PM, Brian Stern wrote:
On Nov 17, 2008, at 10:17 PM, Luke the Hiesterman wrote:
On Nov 17, 2008, at 7:12 PM, Brian Stern wrote:
OK, this issue has come up for me very recently. It appears
On Nov 17, 2008, at 11:05 PM, Roland King wrote:
OK, this issue has come up for me very recently. It appears
that on iPhoneOS IBOutlets are retained, regardless of the
presence of properties. Even worse, in the presence of an
assign property the outlet is still retained. Whatever
On Nov 17, 2008, at 11:20 PM, Luke the Hiesterman wrote:
On Nov 17, 2008, at 8:17 PM, Brian Stern wrote:
I think it makes more sense to release the Outlets in viewDidLoad.
Why would you be releasing outlets when the view just loaded?
Generally releasing happens when you're ready
. All three act the same.
--
Brian Stern
[EMAIL PROTECTED]
___
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
On Nov 17, 2008, at 11:51 PM, mmalcolm crawford wrote:
On Nov 17, 2008, at 7:12 PM, Brian Stern wrote:
On Nov 17, 2008, at 9:11 PM, mmalcolm crawford wrote:
One other consideration, particularly in iPhone applications, is
where you might have outlets to subviews of a main view that might
On Nov 18, 2008, at 12:11 AM, Roland King wrote:
Brian Stern wrote:
On Nov 17, 2008, at 11:35 PM, Roland King wrote:
Yes, but this is exactly the point. If I have no property for
an Outlet it's still retained. If I have a property for an
outlet that is assign, and not retain
On Nov 18, 2008, at 12:13 AM, mmalcolm crawford wrote:
On Nov 17, 2008, at 8:53 PM, Brian Stern wrote:
Here's my test project:
http://bellsouthpwp2.net/b/r/brians99/projects/TestPropertiesAndOutlets.zip
There are three labels that are outlets. One has a retain
property, one an assign
the deallocs to match those retains.
--
Brian Stern
[EMAIL PROTECTED]
___
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
On Nov 18, 2008, at 12:59 AM, Roland King wrote:
Hey Brian -
Outlets for iPhone OS are established by calling
setValue:forKeyPath:. The behavior of setValue:forKeyPath: is
that if a setter exists, it is called. If a setter does not
exist, the instance variable is looked up and set
and compare them. This could give a kind of simplistic %
difference.
--
Brian Stern
[EMAIL PROTECTED]
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
Apple has made an iPhone forum for iPhone developers available here
http://devforums.apple.com/
On Oct 27, 2008, at 6:19 PM, Karan, Cem (Civ, ARL/CISD) wrote:
Like the subject says, can we ask iPhone questions yet? I'm stumped
and I need help.
of this for the last six months.
Apple has been peeing in the iPhone development pool for a while.
Until now they haven't taken a dump in the pool. I'll say that this
new forum is a baby-step in the right direction. But it all remains
to be seen.
--
Brian Stern
[EMAIL PROTECTED
On Oct 5, 2008, at 6:08 PM, Jim Correia wrote:
On Oct 5, 2008, at 5:41 PM, Brian Stern wrote:
My main reason was just cleanliness. Looking more closely at the
code however, most of which I didn't write, there are some runloop
sources that are removed and calls to NSObject
];
}
What prevents the tableview from being dealloced before the
datasource? In that case the datasource is messaging a stale pointer.
I think that something higher up in the ownership graph needs to
manage this, like the window controller.
--
Brian Stern
[EMAIL PROTECTED
the release of their target or after the die
entirely. I couldn't figure out what to wait for.
This question of stopping threads has been mentioned numerous times in
the archives but I didn't see this issue addressed.
Any thoughts?
--
Brian Stern
[EMAIL PROTECTED
On Oct 5, 2008, at 4:52 PM, Jim Correia wrote:
On Oct 5, 2008, at 4:43 PM, Brian Stern wrote:
This is the question I really wanted to ask:
I have an object X that is alloc/inited on the main thread. This
object creates some NSThreads with
detachNewThreadSelector:toTarget:withObject
It seems that what you want is an inline C function. I don't think
this is part of the C language standard but gcc seems to have its own
method of doing this. Just do a find on 'inline' in the Frameworks to
see how it's done. Look at CGBase.h for instance.
On Oct 3, 2008, at 8:32 AM,
On Oct 1, 2008, at 12:47 PM, James wrote:
Quick question, what do they mean by Released and Unreleased
software (just want the terminology correct).
While I'm not a lawyer I read those sentences several times also.
What I believe it means is that released versions of the iPhone OS are
to
keep up. The time to decide what new lists should exist is quickly
passing. The people that this affects most are the subscribers to
this list and we should have a say in what happens.
It sounds like the lawyers are still in charge.
--
Brian Stern
[EMAIL PROTECTED
Is there an obj-C equivalent to Java's System.arraycopy() which will
allow me to easily copy a segment of an NSArray into a new array?
subarrayWithRange:
Returns a new array containing the receiver’s elements that fall
within the limits specified by a given range.
Apparently NSUserDefaults delays its saving until the next time
through the event loop, perhaps by using one of the
performSelector:afterDelay calls, or something like that. Is it
possible that this is what's causing your issues?
I ran into this problem when trying to save user defaults
by release. Usually the release is the next line after the
addObject:, not at the end of the method as the OP used.
You can count this as 'a really good reason' or not but IMO the OP has
no reason to autorelease the object as you suggest.
--
Brian Stern
[EMAIL PROTECTED
. With a few
utility routines to handle this for you this should be simple and safe.
Or:
Use NSData, add a category to NSData containing: dataWithUTCDateTime:,
add the appropriate accesor for UTCDateTime and/or for the members of
UTCDateTime.
--
Brian Stern
[EMAIL PROTECTED
On Aug 4, 2008, at 11:56 AM, John Velman wrote:
After making changes to move the download from sqlite to sqlite3, and
checking that I have /usr/local/lib/libsqlite3.a, and putting
/usr/local/lib in the library search path of the project, the source
for
the Demo compiles but does not link.
potential for new versions of Cocoa to add new
methods that conflict with your own methods.
--
Brian Stern
[EMAIL PROTECTED]
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list
On Jul 9, 2008, at 10:44 AM, Chris Paveglio wrote:
I'm trying to make sure that this part of my code is good and clean
and not leaking. I believe that I have it right (but still think I
have something wrong).
This code makes a list of file paths, and then copies the files or
folders from
On Jun 10, 2008, at 5:05 PM, Paul Archibald wrote:
Comrades:
I am working on a file-handling Cocoa app that (at this point) has a
single window. We are adding a second window (really sort of a non-
modal dialog) to do some extra processing of the target files. The
interface for the new
On Jun 6, 2008, at 1:58 AM, Graham Cox wrote:
I agree, the compiler ought to be able to use the return type to
disambiguate two otherwise identically named methods (or warn of the
mismatch) - but it clearly doesn't.
My experimentation reveals, with the Xcode 2.5 tools, that the return
unrelated!)
Thanks to everyone who pitched in - very grateful.
cheers, Graham
--
Brian Stern
[EMAIL PROTECTED]
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
);
NSString *file = [arrayOfFiles objectAtIndex:rowIndex];
return [file self];
}
Your line return [file self] is odd. Just: return file;
--
Brian Stern
[EMAIL PROTECTED]
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post
don't propagate back through your C code and to
the host app.
Isn't there some sample code for building Cocoa iTunes plugins
available somewhere that will answer these questions for you?
--
Brian Stern
[EMAIL PROTECTED]
___
Cocoa-dev mailing list
--
Brian Stern
[EMAIL PROTECTED]
___
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
43 matches
Mail list logo