On 19 Mar 2012, at 09:31, Shawn Bakhtiar wrote:
> "...subtly why C and C++ are poor languages..."
>
> 1) Is that why most modern operating systems, especially the ones that run in
> data centers are written in C?
>
Popularity is more a proof of mass stupidity rather than quality. The cult of C
I have this in my header file:
*
**
@property (nonatomic, retain) UIImagePickerController* imagePicker;
**
*
The analyzer is complaining about lines like this (but not always):
*
self.imagePicker = [[UIImagePickerController alloc] init];
[self.imagePicker release];
*
I do this in many place
No, the analyzer is right and your code is somewhat confused. I'm trying to
figure out how you ended up with code like that, did you find you had an extra
retain somewhere and need to get rid of it? Again you are misunderstanding
ownership.
@property( nonatomic, retain ) UIImagePickerControlle
First, what Roland said. In addition to that, keep in mind that when you code
self.imagePicker = aPicker;
...
anotherPicker = self.imagePicker;
it is best to assume that aPicker and anotherPicker are different objects (even
if ... is empty, there may be other threads, or the setPicker code may d
On Mar 19, 2012, at 5:51 AM, Ian Joyner wrote:
> Actually NSArray. Note NSMutableArray inherits from NSArray because it adds
> extra functionality in methods that can change the object. You can assign an
> NSMutableArray object to an NSArray reference, thereby making it unchangeable
> via that
On Mar 19, 2012, at 4:51 AM, Ian Joyner wrote:
> Popularity is more a proof of mass stupidity rather than quality. The cult of
> C followed on from what Bob Barton called the cult of FORTRAN in 1963 and
> also noted that systems programmers are high priests of a low cult.
Please take this off-
Hi,
Any tips on how I might create a favorites bar similar to what Mail.app
features? Thanks,
rc
___
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 co
Basically, I want the horizontal barber pole animation in my cell-based
table-view, in order to represent work-in-progress for some operation queue
activity in the app. If anyone knows of a drop-in solution something with a
name like NSProgressIndicatorCell, that I can use for this, that would
I have this problem too. I have a small non-storyboard project that
reproduces it & a TSI in progress.
I'd love to sort it out.
RF.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the l
On Retina display devices, such as the 3rd generation iPad, I found that the
system font returned by [UIFont systemFontOfSize:] is a font whose family name
is not included in the array of font families returned by [UIFont familyNames].
The family name that is returned is ".HelveticaNeueUI" No
On Mar 19, 2012, at 9:55 AM, Jon Brooks wrote:
> My question is: Why is the system font now excluded from the array of
> familyNames? Does the dot in front denote some kind of private status?
A “.” or “%” prefix on a font name has always (literally back to 1984) meant
that the font is not us
On Mar 19, 2012, at 11:43 AM, Michael Crawford wrote:
> Basically, I want the horizontal barber pole animation in my cell-based
> table-view, in order to represent work-in-progress for some operation queue
> activity in the app. If anyone knows of a drop-in solution something with a
> name lik
On Sat, 17 Mar 2012 01:45:33 -0700, G S said:
>>
>> This pattern is pretty questionable though in terms of OO — you have one
>> class (NSNib, UINib, etc.) directly setting instance variables in another
>> class (your view controller) and using runtime functions to hack around
>> things like @priva
Amen.
On 2012-03-19, at 11:55 AM, Jens Alfke wrote:
> I don’t mean to be rude, but I’m about at my personal limit of patience with
> the amount of off-topic stuff one has to wade through on the Apple lists
> lately (especially xcode-users, but here too.)
I wanted something similar recently (especially the drag & drop rearranging). I
didn't find anything suitable on the web and had to implement it all from
scratch. Despite being mentioned in the Apple HIG, there is no OS support for
scope bars.
http://developer.apple.com/library/mac/documentatio
Did you look at NSToolbar and NSToolbar item?
Also the sample code SimpleToolbar or ToolbarSample?
If that isn't what you need perhaps you can expand bit more on what you need?
respect….
Peter
On 2012-03-19, at 12:20 PM, Rick C. wrote:
> Hi,
>
> Any tips on how I might create a favorites bar
On Fri, 16 Mar 2012 17:11:24 -0400, Marco Tabini said:
>> That time has passed now, so you can now completely specify IBOutlets (and
>> IBActions) in your implementation file and hide the details from the outside
>> world. If you want properties, you can use a class extension like so to add
>>
On Sat, 17 Mar 2012 15:38:20 -0700, G S said:
>I have a member variable to hold an NSDate:
>
>NSDate* _firstBadAccuracyTime;
>
>At some point, something happens and I set this value to "now":
>
>_firstBadAccuracyTime = [NSDate date];
>
>On my next trip through this function, I calculate ho
On Sat, 17 Mar 2012 21:06:49 -0700, Quincey Morris
said:
>I shouldn't have suggested that property declarations didn't need memory
>management attributes, but all of the current attributes are "wrong" (because
>they do double-duty as ivar reference attributes). I *think* the "right"
>property
I'd like an argument, please.
Regarding this:
In the chapter called "Defining a Class", not only is declaring
an ivar in the .m file covered, but doing it in the .h file is downright
discouraged (rightly so). In practice, this feature of Objective-C...
I can't stand thus sort of subt
One final note:
ivars in the .H file of a public framework is *obviously stupid* as it
leaks implementation details.
ivars in the .H file of my Foo class, which no one other than me will ever
use, should be relatively OK. After all, I'm not trying to prevent myself
from knowing anything about my
In the current project that I'm tasked to repair from the previous two
programmers, I've come across a load of UI elements that have been hardcoded in
place with the approach of: Just define the CGRect and we're all good.
Nothing is laid out in an xib file and sometimes the views are hardcoded o
On Mar 19, 2012, at 11:48 , Matt Neuburg wrote:
> As long as we're just dreaming up our own linguistic world, I'd suggest that
> instead of "owning" we say "owning-copying". I've never liked the way "copy"
> implies "retain". The word "retain" tells you something very important,
> namely that t
On Mar 19, 2012, at 2:27 PM, Brian Lambert wrote:
> Is there a way to declare ivars in the .M file AND have them accessible
> from Objective-C Category files for the class?
Use an extension instead of a category?
Charles
___
Cocoa-dev mailing list (Co
On Mar 19, 2012, at 9:43 AM, Michael Crawford wrote:
> Basically, I want the horizontal barber pole animation in my cell-based
> table-view, in order to represent work-in-progress for some operation queue
> activity in the app. If anyone knows of a drop-in solution something with a
> name like
Hi Alex,
Regarding you having to "repair" code where "UI elements that have been
hardcoded in place with the approach of: Just define the CGRect and we're
all good." I think you're seeing things as being "gross" when they are not.
"Just define the CGRect and we're all good" is what IB does. A X
On Mar 19, 2012, at 12:27 PM, Brian Lambert wrote:
> Regarding this:
>
>In the chapter called "Defining a Class", not only is declaring
>an ivar in the .m file covered, but doing it in the .h file is downright
>discouraged (rightly so). In practice, this feature of Objective-C...
>
>
On Mar 19, 2012, at 3:22 PM, Brian Lambert wrote:
> Hi Alex,
>
> Regarding you having to "repair" code where "UI elements that have been
> hardcoded in place with the approach of: Just define the CGRect and we're
> all good." I think you're seeing things as being "gross" when they are not.
>
>
That's a good point. It's really a matter of tradeoffs.
I find that in some cases the XIB is adding nothing but overhead and just
do everything in code. Especially when the view is simple (contains a
small number of controls and views).
In other cases, the XIB is useful. Especially when there ar
Well, let's put it this way; there are other things that need to be cleaned up
- like 900 lines of code that are called on viewWillAppear in one class, 8
printed pages of warnings as well as a mix of XML, JSON and comma delimited
data structures that are fetched ala http on startup.
Looking at
On Mar 19, 2012, at 4:43 PM, Sebastian Celis wrote:
> viewDidLayoutSubviews (iOS-5-only).
> * When you layout your subviews, do so given the current size of your
> superview. Don't hardcode your view's width to be 320 just because you
> are doing iPhone development and you know your subview takes
In Interface Builder all coordinates are expressed in terms of a non-Retina
device, and scaled on Retina devices. So running a XIB on non-Retina and
Retina "just works". The same holds true for doing it in code (generally).
I'll give you an example. One of the projects I'm working on right now
On Mar 19, 2012, at 12:45 PM, Brian Lambert wrote:
> ivars in the .H file of my Foo class, which no one other than me will ever
> use, should be relatively OK. After all, I'm not trying to prevent myself
> from knowing anything about my implementation of Foo. I'm just trying to
> ensure that
On Mar 19, 2012, at 1:08 PM, Quincey Morris wrote:
> On Mar 19, 2012, at 11:48 , Matt Neuburg wrote:
>
>> As long as we're just dreaming up our own linguistic world, I'd suggest that
>> instead of "owning" we say "owning-copying". I've never liked the way "copy"
>> implies "retain". The word "
Imagine now if someone at Apple working on Interface Builder conjured up
the notion of adding "modes" for a view design.
This is the coolest idea ever for Interface Builder. :-) And I don't even
think it would be *all that hard* to do.
I add a new UIViewController subclass to my project, select
FWIW, I agree. This would allow any programmer (or even a non programmer) to
lay out their screen, then switch to the rotated view and simply drag the items
to where they think they should be.
Viola. Both orientations are laid out.
Sort of an approach of, "portrait is the default orientation
On 3/19/12 2:46 PM, Brian Lambert wrote:
> I think this would be insanely cool. It would allow one to build ONE XIB
> with N modes for iPhone Portrait, iPhone Landscape, iPad Portrait, iPad
> Landscape, LTR, RTL, and so on, all sharing a base set of controls, views,
> and connections to outlets an
On Mon, Mar 19, 2012 at 9:29 AM, Rhythmic Fistman wrote:
> I have this problem too. I have a small non-storyboard project that
> reproduces it & a TSI in progress.
>
>
Woah, finally, someone else emerges! Please let us know what you discover!
Does your scenario have anything in common with the o
Hi again,
I'm recoding some older projects and I wanted to know in IB (Xcode 4) if I have
an object of one type (let's say NSView) and I want to change it to a different
type (let's say NSObject with blue cube) is there any way to automatically move
over the connections as well? Or do I have t
On Mon, Mar 19, 2012 at 6:18 AM, Roland King wrote:
> No, the analyzer is right and your code is somewhat confused. I'm trying
> to figure out how you ended up with code like that, did you find you had an
> extra retain somewhere and need to get rid of it?
Yes. The allocated object has a retai
On Mar 19, 2012, at 5:18 AM, G S wrote:
> self.imagePicker = [[UIImagePickerController alloc] init];
>
> [self.imagePicker release];
>
> I do this in many places, but in a few of them the analyzer says:
>
> *Property returns an Objective-C object with a +0 retain count*
> *Incorrect decrement o
And do you now understand why you are releasing the wrong thing? if not please
go read the replies from Eeyore and I again, you cannot release the result of a
method call which returns an object you don't own. Your code as written is a
hack, it happens to work because the property is a simple re
On Mon, Mar 19, 2012 at 3:47 PM, Roland King wrote:
> And do you now understand why you are releasing the wrong thing?
>
Well, I understand why my code just happens to be releasing the right
thing, but easily couldn't. Obviously the getter might be coded to return
anything, including a wholly d
On Mar 15, 2012, at 11:29 PM, Kyle Sluder wrote:
On Wed, Mar 14, 2012, at 08:15 PM, Keith Knauber wrote:
>> The goal is to update this cocoa GUI app at up to 30 fps, with as little
>> impact on my real-time thread and a separate apps' video frame rate as
>> possible.
>
> I must ask, what the hec
On Mar 15, 2012, at 11:29 PM, Kyle Sluder wrote:
On Wed, Mar 14, 2012, at 08:15 PM, Keith Knauber wrote:
>> The goal is to update this cocoa GUI app at up to 30 fps, with as little
>> impact on my real-time thread and a separate apps' video frame rate as
>> possible.
>
> I must ask, what the hec
On Mar 19, 2012, at 5:58 PM, G S wrote:
> I will convert to ARC when I have time, but I'm using a couple of
> open-source libraries that I don't want to convert right now.
You can call non-ARC code from ARC, though. Libraries, even other source files
within your own project. That’s the beauty of
Yep, thanks. Someone pointed that out.
I went through my whole project and audited every file for memory
management, reinstating properties for everything. After forgetting not to
use properties in the init and dealloc methods and having to correct that,
the app is running great and there's not
On Mar 19, 2012, at 3:58 PM, G S wrote:
> I will convert to ARC when I have time, but I'm using a couple of open-source
> libraries that I don't want to convert right now.
ARC supports that. As long as everybody follows Cocoa's naming conventions, you
can compile some files with ARC and other f
On Mar 19, 2012, at 4:27 PM, G S wrote:
> That reminds me of another question, though: Someone earlier mentioned the
> need to release elements loaded from the nib, in dealloc. I didn't think
> this was necessary, so I don't do it. And there are no apparent leaks as a
> result. What's the story
On Mar 19, 2012, at 5:27 PM, G S wrote:
> That reminds me of another question, though: Someone earlier mentioned the
> need to release elements loaded from the nib, in dealloc. I didn't think
> this was necessary, so I don't do it. And there are no apparent leaks as a
> result. What's the stor
>
> Are you using NSViewController or NSWindowController?
UIViewController and derivatives.
___
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
On Mar 19, 2012, at 6:27 PM, G S wrote:
> That reminds me of another question, though: Someone earlier mentioned the
> need to release elements loaded from the nib, in dealloc. I didn't think
> this was necessary, so I don't do it. And there are no apparent leaks as a
> result. What's the st
On Mar 19, 2012, at 4:27 PM, G S wrote:
> That reminds me of another question, though: Someone earlier mentioned the
> need to release elements loaded from the nib, in dealloc. I didn't think
> this was necessary, so I don't do it. And there are no apparent leaks as a
> result. What's the stor
On Mar 20, 2012, at 7:27 AM, G S wrote:
> Yep, thanks. Someone pointed that out.
>
> I went through my whole project and audited every file for memory management,
> reinstating properties for everything. After forgetting not to use
> properties in the init and dealloc methods and having to c
On Mar 16, 2012, at 4:00 PM, Brian Lambert wrote:
> I’ve been developing iOS applications full-time for about 6 months now and
> I love it. I feel pretty strong on the platform now.
>
> I have a lingering question about something that’s really been bugging the
> heck out of me, though, that I th
Great thanks and yes I suppose scope bar is the more correct term...
On Mar 20, 2012, at 2:23 AM, David Riggle wrote:
> I wanted something similar recently (especially the drag & drop rearranging).
> I didn't find anything suitable on the web and had to implement it all from
> scratch. Despit
I've been experimenting with the static table view cell stuff in iOS 5. It was
working fine, 'till I connected my table view's data source and delegate
outlets to my controller. This caused the static content to stop loading.
Fine, I realize why that's the case. So I undid those connections. But
On Mar 19, 2012, at 7:28 PM, William Squires wrote:
> The fact that the header declares your IBOutlets and IBActions is
> intentional, otherwise your design would be too-tightly coupled; this isn't
> good... Not only does IB need to know where the outlets and actions are, so
> do any other desi
You might check out the AMButtonBar code from harmless Cocoa. Sounds
like it may be what you're after or at least get you a ways there.
http://www.harmless.de/cocoa-code.php
On Mon, Mar 19, 2012 at 5:33 PM, Rick C. wrote:
> Great thanks and yes I suppose scope bar is the more correct term...
>
On 20 Mar 2012, at 02:43, Nick Zitzmann wrote:
> On Mar 19, 2012, at 5:51 AM, Ian Joyner wrote:
>
>> Actually NSArray. Note NSMutableArray inherits from NSArray because it adds
>> extra functionality in methods that can change the object. You can assign an
>> NSMutableArray object to an NSArray
Really const correctness in the first place belonged in the Objective-C group.
If you read the rest of my post I'm talking about immutability and const
correctness, so although this comment on popularity came first it was just a
subtopic and you have picked on this as a sub topic of the post ra
As everyone knows, if you have a view with a bunch of subviews and you’ve got
NSLayoutConstraints set up for everything, in many cases you might end up with
a minimum or maximum size for the view beyond which the constraints are
impossible to satisfy, and if you try to resize the view outside th
I'm connecting to my dev server which has a self-signed cert. When I do this,
NSURLConnection complains with:
NSLocalizedDescription = "An SSL error has occurred and a secure connection to
the server cannot be made.";
NSLocalizedRecoverySuggestion = "Would you like to connect to the server
There's probably a way to do this on a per-connection basis, but the easiest
workaround is to install your signing certificate on the device.
I usually just email my certificate to myself. Mobile Mail understands
certificate attachments and will prompt for installation permission.
Note that t
64 matches
Mail list logo