[moderator] Reminder - Mac OS X 10.8 beta is under non-disclosure. Do not discuss here.

2012-05-08 Thread Scott Anguish
The Mac OS X 10.8 beta is still under NDA, and shouldn’t be discussed here.

Apple has forums at devforums.apple.com that in some cases allow this 
discussion.

Discussion of it here will cause moderation and possible expulsion.

Same for unreleased iOS versions.

Thanks for your cooperation folks. 

Scott
[moderator]


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Window cascading

2012-05-08 Thread ecir hana
Hello,

I create a window like this:

id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200,
200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered
defer:NO] autorelease];
[window cascadeTopLeftFromPoint:NSMakePoint(20,20)];

but it cascades just vertically - the next window is positioned to the very
top left of my screen, the next one is just 20px lower (and 0px right), the
next one is again 20px lower than the previous one but it wont move
horizontally.

Why's that? Do I have to remember the returned NSPoint and pass it to
next cascadeTopLeftFromPoint:?

Kind regards,

Ecir Hana
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare

2012-05-08 Thread Gregory Weston
Martin Wierschin wrote:

>> If I understand Quincey correctly, that's exactly what he's saying: the 
>> semantics of localizedCaseInsensitiveCompare: might be such that it is not 
>> appropriate for such algorithms.
> 
> As Jens mentioned, that doesn't make any sense. What good is a localized 
> comparison method if not for sorting a list for display?

How about simply being able to test for equivalence?


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: monitoring changes in a local property

2012-05-08 Thread Koen van der Drift
On Tue, May 8, 2012 at 12:27 AM, Quincey Morris
 wrote:

> It's not obvious why you need a "mySelection" property at all.

It's used in a master-detail setup in my application.  Briefly, my
application has the familiar Mail layout: A column (outlineview) on
the left with groups, then a column (tableview) in the middle showing
the entities from a selected group, and on the right two panes which
show details about the selected entity. One of the panes on the right
swaps views (using the example code from Hillegass' book). So I am
using 'mySelection' (I probably could also use 'myEntity') so the
viewcontroller for each of these views knows what data to show. I hope
this makes sense.

> P.S. Personally, I wouldn't bind to a NSArrayController like this, because
> it just obscures the MVC lines of your app. The array controller is getting
> its content from somewhere: from this view controller itself, from a window
> controller, or from the app delegate. Assuming the last of these (based on
> your description of the data as app-wide), then I'd give the app delegate a
> "selectionIndexes" property (of type NSIndexSet*), bind the array
> controller's "selectionIndexes" binding to this property in IB, and have the
> view controller observe the app delegate "selectionIndexes" property instead
> of the array controller "selectedObjects" property.

That sounds like a good idea and I will see how that fits in my app. I
am indeed using the AppDelegate to switch the views, and pass the
managedobjectcontext around as explained in the book by Hillegass.
But I see now that is not really needed, since the views only show
info about one entity. I just need to make sure that when the user
changes the selection in the middle column, the details are updated in
the right two panes.

Thanks for all the input, lots of food for thought, and again highly
appreciated.

- Koen.
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


iOS launch Music app?

2012-05-08 Thread Eric E. Dolecki
I know I can launch the iTunes app from my own (itms-apps://)

What is the prefix for Apple's Music.app? I'd like to launch it from a
button.

Thanks,
Eric
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Window cascading

2012-05-08 Thread Richard Somers
On May 8, 2012, at 3:01 AM, ecir hana wrote:

> I create a window like this:
> 
> id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200,
> 200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered
> defer:NO] autorelease];
> [window cascadeTopLeftFromPoint:NSMakePoint(20,20)];
> 
> but it cascades just vertically - the next window is positioned to the very
> top left of my screen, the next one is just 20px lower (and 0px right), the
> next one is again 20px lower than the previous one but it wont move
> horizontally.
> 
> Why's that? Do I have to remember the returned NSPoint and pass it to
> next cascadeTopLeftFromPoint:?

If I remember correctly you are using the document architecture. The 
documentation has this to say.

"If you use the Cocoa document architecture, you can use the 
setShouldCascadeWindows: method of NSWindowController to set whether the 
window, when it is displayed, should cascade in relation to other document 
windows (that is, have a slightly offset location so that the title bars of 
previously displayed windows are still visible). The default is true, so 
typically you have no additional work to perform.

If you are not using the document architecture, you can use the 
cascadeTopLeftFromPoint: method ofNSWindow to cascade windows yourself. The 
method returns a point shifted from the top-left corner of the window that can 
be passed to a subsequent invocation of cascadeTopLeftFromPoint: to position 
the next window so the title bars of both windows are fully visible."

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/WinPanel/Tasks/SizingPlacingWindows.html

Have you examined the EnhancedDataBurn sample code? It has two examples of 
where -[NSWindow cascadeTopLeftFromPoint:] is used.

http://developer.apple.com/library/mac/#samplecode/EnhancedDataBurn/Introduction/Intro.html

--Richard


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: My app thinks it is a phone. Why?

2012-05-08 Thread Alex Zavatone

On May 7, 2012, at 10:14 PM, Gerriet M. Denkmann wrote:

> 
> On 8 May 2012, at 01:08, David Duncan wrote:
> 
>> On May 5, 2012, at 10:15 PM, Gerriet M. Denkmann wrote:
>> 
>>> My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a 
>>> window, just two objects, one of this is an UIApplicationDelegate.
>>> 
>>> This UIApplicationDelegate has:
>>> 
>>> - (void)applicationDidFinishLaunching:(UIApplication *)application 
>>> {
>>> NSLog(@"%s %u",__FUNCTION__,[[UIDevice currentDevice] 
>>> userInterfaceIdiom]);
>>> ...
>>> }
>>> 
>>> When I run this in iPad 5.1 Simulator, it prints "0" = 
>>> UIUserInterfaceIdiomPhone.
>>> 
>>> Why does this thing delude itself being a phone? 
>>> 
>>> (This was an iPhone project, which I am now trying to make universal).
>> 
>> 
>> Are you sure you've configured your application to target both iPhone and 
>> iPad? Check that the Project and Target levels match and say the same thing.
> 
> You are absolutely right: it turned out to be wrong settings:
> 
> 1. Target → Info → Application requires iPhone environment was YES
> 2. Bild Settings → Deployment → Targeted Device Family was just iPhone
> 
> The first one I found early, the second one many hours after asking the list.
> 
> I think this is a general Xcode problem: starting with the right template 
> everything is very smooth.
> But changing directions later (like iPhone only to universal, or 
> non-document-based to document-based) is kind of difficult 

FWIW, I've found this to be the general case in Xcode, at least with iOS 
development.  IF you do everything right from the start, and know the right way 
to go, it's not a big deal, but for those who try things out and explore, it 
ends up being rather easy to be caught in a mess with many hours wasted and not 
understanding what went right and why.  

We faced similar problems when creating Macromedia's Director back last 
century, and I see similar cases with storyboarding in Xcode. Sometimes, if 
you're used to doing everything in code, it's impossible to figure out why the 
storyboard feature is crashing Xcode, what's tied in to, what and where it 
should be tied to.  Maybe having some feature in Storyboarding that puts a red 
alert badge over a item whose contents aren't completely/properly wired up, or 
at least an indicator - much like the warning indicators in the build process.

Simply indicating storyboard items that have an action, but no delegate, outlet 
or view connection would eliminate a lot of crashes and "why isn't this thing 
doing anything" brain freezes.



___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Window cascading

2012-05-08 Thread ecir hana
Thank you for the reply!

Yes, document-based.

However, not sure if it is an issue, but I have my own subclassed window
controller. The docs also say that the default for "shouldCascadeWindows"
is YES. I tried to set it to YES in "setShouldCascadeWindows:", without
luck.

I look at the EnhancedDataBurn example but it uses the origin of already
shown window, which is slightly different than my case, I believe.



On Tue, May 8, 2012 at 4:35 PM, Richard Somers wrote:

> On May 8, 2012, at 3:01 AM, ecir hana wrote:
>
> > I create a window like this:
> >
> > id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200,
> > 200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered
> > defer:NO] autorelease];
> > [window cascadeTopLeftFromPoint:NSMakePoint(20,20)];
> >
> > but it cascades just vertically - the next window is positioned to the
> very
> > top left of my screen, the next one is just 20px lower (and 0px right),
> the
> > next one is again 20px lower than the previous one but it wont move
> > horizontally.
> >
> > Why's that? Do I have to remember the returned NSPoint and pass it to
> > next cascadeTopLeftFromPoint:?
>
> If I remember correctly you are using the document architecture. The
> documentation has this to say.
>
> "If you use the Cocoa document architecture, you can use the
> setShouldCascadeWindows: method of NSWindowController to set whether the
> window, when it is displayed, should cascade in relation to other document
> windows (that is, have a slightly offset location so that the title bars of
> previously displayed windows are still visible). The default is true, so
> typically you have no additional work to perform.
>
> If you are not using the document architecture, you can use the
> cascadeTopLeftFromPoint: method ofNSWindow to cascade windows yourself. The
> method returns a point shifted from the top-left corner of the window that
> can be passed to a subsequent invocation of cascadeTopLeftFromPoint: to
> position the next window so the title bars of both windows are fully
> visible."
>
>
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/WinPanel/Tasks/SizingPlacingWindows.html
>
> Have you examined the EnhancedDataBurn sample code? It has two examples of
> where -[NSWindow cascadeTopLeftFromPoint:] is used.
>
>
> http://developer.apple.com/library/mac/#samplecode/EnhancedDataBurn/Introduction/Intro.html
>
> --Richard
>
>
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Window cascading

2012-05-08 Thread Richard Somers
On May 8, 2012, at 8:51 AM, ecir hana wrote:

> Yes, document-based.
> 
> However, not sure if it is an issue, but I have my own subclassed window 
> controller. The docs also say that the default for "shouldCascadeWindows" is 
> YES. I tried to set it to YES in "setShouldCascadeWindows:", without luck.
> 
> I look at the EnhancedDataBurn example but it uses the origin of already 
> shown window, which is slightly different than my case, I believe.

I would suggest that you download the solutions for Cocoa Programming For Mac 
OS X (3rd Edition) and look at Chapter 10_Archiving. This chapter contains a 
modern fully functional document based sample application with window cascading 
working perfectly. You should be able to quickly get the sample project up and 
running in a few minutes in Xcode 4.2 by validating the project build settings 
and setting the default SDK.

http://www.bignerdranch.com/book/cocoa_programming_for_mac_os_x_rd_edition_

Subclassing the window controller is a more advanced topic and if I were you I 
would not focus on that right now.

--Richard


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Window cascading

2012-05-08 Thread ecir hana
Thanks! Will look at it.

On Tue, May 8, 2012 at 5:22 PM, Richard Somers wrote:

> On May 8, 2012, at 8:51 AM, ecir hana wrote:
>
> > Yes, document-based.
> >
> > However, not sure if it is an issue, but I have my own subclassed window
> controller. The docs also say that the default for "shouldCascadeWindows"
> is YES. I tried to set it to YES in "setShouldCascadeWindows:", without
> luck.
> >
> > I look at the EnhancedDataBurn example but it uses the origin of already
> shown window, which is slightly different than my case, I believe.
>
> I would suggest that you download the solutions for Cocoa Programming For
> Mac OS X (3rd Edition) and look at Chapter 10_Archiving. This chapter
> contains a modern fully functional document based sample application with
> window cascading working perfectly. You should be able to quickly get the
> sample project up and running in a few minutes in Xcode 4.2 by validating
> the project build settings and setting the default SDK.
>
> http://www.bignerdranch.com/book/cocoa_programming_for_mac_os_x_rd_edition_
>
> Subclassing the window controller is a more advanced topic and if I were
> you I would not focus on that right now.
>
> --Richard
>
>
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare

2012-05-08 Thread Jens Alfke

On May 8, 2012, at 3:18 AM, Gregory Weston wrote:

> How about simply being able to test for equivalence?

Then it shouldn’t claim to support ordering, i.e. it would just be
- (BOOL) localizedCaseInsensitiveIsEqualToString: (NSString*)str;

—Jens
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

saveDocument:

2012-05-08 Thread ecir hana
Hello,

please, could you clarify one thing for me? In document-based apps, if I
were to implement my own document controller, how would I trigger the
saving of a file? In other words, in menu there is an item which fires
"saveDocument:" and in document there is a method "saveDocument:" - how
does the action travels through document controller? In yet another words:

(Menu) saveDocument: -> (Document controller) ? -> (Document) saveDocument:

Do I have the picture right? Is it ok to write something like (in the
controller):

- (void)saveDocument:(id)sender {
[[self currentDocument] saveDocument:sender];
}

I think I just need to pass "saveDocument:" from the menu to the document,
am I right?

Kind regards,

Ecir Hana
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
Hi,

I have a text field that when I try to set it to a literal string fails:
This is the code: 
self.myTextField.stringValue = @""; (It also fails if the literal string is not 
empty).

This is the (partial) backtrace:
2012-05-08 18:09:28.516 MyApp[18775:507] *** Assertion failure in 
-[NSTextFieldCell _objectValue:forString:errorDescription:], 
/SourceCache/AppKit/AppKit-1138.32/AppKit.subproj/NSCell.m:1564

Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
Invalid parameter not satisfying: aString != nil
2012-05-08 18:09:31.845 MyApp[18775:507] (
0   CoreFoundation  0x7fff90d12fc6 
__exceptionPreprocess + 198
1   libobjc.A.dylib 0x7fff8c3f4d5e 
objc_exception_throw + 43
2   CoreFoundation  0x7fff90d12dfa 
+[NSException raise:format:arguments:] + 106
3   Foundation  0x7fff92db1743 
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] 
+ 169
4   AppKit  0x7fff8a9495a5 -[NSCell 
_objectValue:forString:errorDescription:] + 160
5   AppKit  0x7fff8a9494ff -[NSCell 
_objectValue:forString:] + 19
6   AppKit  0x7fff8a949465 -[NSCell 
setStringValue:] + 41
7   AppKit  0x7fff8aa4a5e8 -[NSControl 
setStringValue:] + 115

However, when I set it like this…

self.myTextField.stringValue = [NSString string];

…it has no issues.

Can anyone explain to me why the former doesn't work? I have many instances of 
setting a textfield with an empty literal string elsewhere in my code, and it 
doesn't cause problems. This particular textfield lives in a toolbar, but I 
assume that shouldn't matter.

-Ant´ønio


It is better to light a candle than to curse the darkness





___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Strange issue in stroking a bezier path

2012-05-08 Thread Peter Teeson
On 2012-05-05, at 7:55 PM, Kyle Sluder wrote:
> On May 5, 2012, at 4:46 PM, Jens Alfke  wrote:
>> 
>> (IIRC there are some AppKit geometry utility functions that will adjust 
>> coordinate values to fit pixel boundaries in a resolution-independent way. I 
>> don’t remember their names offhand.)
> -centerScanRect:, -convertRectToBacking: and friends. Which if I understand 
> correctly you should now *always* use instead of adding half pixels because 
> of HiDPI.
>> Someday every device will have retina-quality graphics and these details 
>> won’t matter
> It still matters because coordinates in Quartz always refer to the infinitely 
> thin space between device pixels.
> 
> --Kyle Sluder
Thanks very much Jens and Kyle and everyone who contributed. Most valuable. 
From now on I'll be using the 
the NSView -convertPointFrom/To and -convertRectTo/From methods in their 
various forms.
As for NSView's -centerScanRect I will try to understand where that should be 
used by examining the code examples.
Also NSScreen -convertRectToBacking and-convertRectFromBacking methods as 
appropriate.

This is my first time digging deeply into graphics. My previous work was 
primarily DB, network and IOKit related.
THanks again and

respect….

Peter


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Charlie Dickman
Read the message...

Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
Invalid parameter not satisfying: aString != nil
On May 8, 2012, at 12:15 PM, Antonio Nunes wrote:

> Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
> Invalid parameter not satisfying: aString != nil

@"" is the nil string and the compiler is smart enough to make the 
substitution. 

Charlie Dickman
3tothe...@comcast.net




___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: saveDocument:

2012-05-08 Thread Fritz Anderson
On 8 May 2012, at 11:11 AM, ecir hana wrote:

> please, could you clarify one thing for me? In document-based apps, if I
> were to implement my own document controller, how would I trigger the
> saving of a file? In other words, in menu there is an item which fires
> "saveDocument:" and in document there is a method "saveDocument:" - how
> does the action travels through document controller? In yet another words:
> 
> (Menu) saveDocument: -> (Document controller) ? -> (Document) saveDocument:
> 
> Do I have the picture right? Is it ok to write something like (in the
> controller):
> 
> - (void)saveDocument:(id)sender {
>[[self currentDocument] saveDocument:sender];
> }
> 
> I think I just need to pass "saveDocument:" from the menu to the document,
> am I right?

I'll get this wrong if I answer in the amount of time I have. Look up 
"responder chain" in the Mac OS X documentation.

To oversimplify:

Menu commands typically go to the "first responder" — whatever has the UI 
focus. If the focused object doesn't implement the menu item's method, the 
event system shops the event up a logical hierarchy called the "responder 
chain" (e.g. text field -> window -> document -> application) until it finds an 
object that does implement the command. The first object that implements the 
command executes it.

File > Save Document sends saveDocument: to the first responder. Because the 
chain goes from bottom up, the saveDocument: message arrives at the document 
object directly, without mediation from the application's document controller.

— F


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Jens Alfke

On May 8, 2012, at 9:28 AM, Charlie Dickman wrote:

> @"" is the nil string and the compiler is smart enough to make the 
> substitution. 

Um … pardon me, but WTF? There is no such thing as a “nil string” object. @“” 
is a perfectly valid NSString instance with a non-nil pointer. It just happens 
to contain zero characters. The compiler is absolutely not going to replace it 
with a nil pointer.

I don’t know what the problem is in the OP’s code, but I wanted to reply ASAP 
to quash the idea of a “nil string” substitution.

—Jens
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Eeyore
There's definitely a nil being passed somewhere it shouldn't, I don't have any 
insights on that based on what was posted. However, I don't think @"" will be 
nil (at least it isn't in Xcode 4.3.2 for iOS 5.1):

NSString* theString = @"";
NSLog(@"%p", theString);

prints 

2012-05-08 09:54:20.270 iSplit[1450:15503] 0x235f24

Aaron


On May 8, 2012, at 9:28 AM, Charlie Dickman wrote:

> Read the message...
> 
> Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
> Invalid parameter not satisfying: aString != nil
> On May 8, 2012, at 12:15 PM, Antonio Nunes wrote:
> 
>> Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
>> Invalid parameter not satisfying: aString != nil
> 
> @"" is the nil string and the compiler is smart enough to make the 
> substitution. 
> 
> Charlie Dickman
> 3tothe...@comcast.net
> 
> 
> 
> 
> ___
> 
> 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 Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/eeyore%40monsterworks.com
> 
> This email sent to eey...@monsterworks.com
> 


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Jens Alfke

On May 8, 2012, at 9:15 AM, Antonio Nunes wrote:

> I have a text field that when I try to set it to a literal string fails:
> This is the code: 
> self.myTextField.stringValue = @""; (It also fails if the literal string is 
> not empty).

That is quite bizarre. So much so that I’m assuming that this isn’t the actual 
problem, that there’s a mixup about which line is raising the exception.

> This is the (partial) backtrace:
> 2012-05-08 18:09:28.516 MyApp[18775:507] *** Assertion failure in 
> -[NSTextFieldCell _objectValue:forString:errorDescription:], 
> /SourceCache/AppKit/AppKit-1138.32/AppKit.subproj/NSCell.m:1564
> 
> Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
> Invalid parameter not satisfying: aString != nil
> 2012-05-08 18:09:31.845 MyApp[18775:507] (
>   0   CoreFoundation  0x7fff90d12fc6 
> __exceptionPreprocess + 198
>   1   libobjc.A.dylib 0x7fff8c3f4d5e 
> objc_exception_throw + 43
>   2   CoreFoundation  0x7fff90d12dfa 
> +[NSException raise:format:arguments:] + 106
>   3   Foundation  0x7fff92db1743 
> -[NSAssertionHandler 
> handleFailureInMethod:object:file:lineNumber:description:] + 169
>   4   AppKit  0x7fff8a9495a5 -[NSCell 
> _objectValue:forString:errorDescription:] + 160
>   5   AppKit  0x7fff8a9494ff -[NSCell 
> _objectValue:forString:] + 19
>   6   AppKit  0x7fff8a949465 -[NSCell 
> setStringValue:] + 41
>   7   AppKit  0x7fff8aa4a5e8 -[NSControl 
> setStringValue:] + 115

So, what’s line 8? Are you *certain* that it’s the line you quoted above, and 
not some other -setStringValue: call in your code?
If you set a breakpoint on the line in question, and then step over the call, 
does the exception trigger?

The only other explanation I can think of is that some previous bug in the code 
has messed up the predefined NSString instance that @“” points to. But that 
would be hard to do — IIRC, the compile-time-constant NSStrings are somewhat 
magical and don’t track refcounts, so you can’t over-release them.

—Jens
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: My app thinks it is a phone. Why?

2012-05-08 Thread David Duncan
On May 7, 2012, at 7:14 PM, Gerriet M. Denkmann wrote:

> On 8 May 2012, at 01:08, David Duncan wrote:
> 
>> On May 5, 2012, at 10:15 PM, Gerriet M. Denkmann wrote:
>> 
>>> My app (iOS 5.1) has a xib called MainWindow.xib which does NOT contain a 
>>> window, just two objects, one of this is an UIApplicationDelegate.
>>> 
>>> This UIApplicationDelegate has:
>>> 
>>> - (void)applicationDidFinishLaunching:(UIApplication *)application 
>>> {
>>> NSLog(@"%s %u",__FUNCTION__,[[UIDevice currentDevice] 
>>> userInterfaceIdiom]);
>>> ...
>>> }
>>> 
>>> When I run this in iPad 5.1 Simulator, it prints "0" = 
>>> UIUserInterfaceIdiomPhone.
>>> 
>>> Why does this thing delude itself being a phone? 
>>> 
>>> (This was an iPhone project, which I am now trying to make universal).
>> 
>> 
>> Are you sure you've configured your application to target both iPhone and 
>> iPad? Check that the Project and Target levels match and say the same thing.
> 
> You are absolutely right: it turned out to be wrong settings:
> 
> 1. Target → Info → Application requires iPhone environment was YES
> 2. Bild Settings → Deployment → Targeted Device Family was just iPhone
> 
> The first one I found early, the second one many hours after asking the list.

The first one actually doesn't do what you think. Thats just an Info.plist flag 
so that the Finder doesn't try to launch the application if you find and double 
click it. iOS ignores it completely (in this case iPhone environment just means 
iOS, the flag is a hold over from before the OS had an official name).

The second one does what you needed done.

> I think this is a general Xcode problem: starting with the right template 
> everything is very smooth.
> But changing directions later (like iPhone only to universal, or 
> non-document-based to document-based) is kind of difficult - there are so 
> many settings which may or may not be relevant.
> 
> It would be rather nice if Xcode allowed me formulate a wish (like "This 
> project should be universal") and it answered with a list of things which 
> must be (or probably should be) done:
> Like: "Targeted Device Family must be changed to iPhone/iPad" and some 
> buttons: "Show me" and: "Please do it for me".
> Followed by: "Read more about this in the xxx-Guide" with a helpful button: 
> "Open in Browser".
> 
> Such a list probably cannot be exhaustive (even if following all suggestions, 
> some problems might remain) but it would very helpful indeed.


There are almost certainly places where this could be made better, so please 
file a bug report asking that things like this be made easier.
--
David Duncan


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
On 8 May 2012, at 19:01, Jens Alfke wrote:

> On May 8, 2012, at 9:15 AM, Antonio Nunes wrote:
> 
>> I have a text field that when I try to set it to a literal string fails:
>> This is the code: 
>> self.myTextField.stringValue = @""; (It also fails if the literal string is 
>> not empty).
> 
> That is quite bizarre. So much so that I’m assuming that this isn’t the 
> actual problem, that there’s a mixup about which line is raising the 
> exception.

I don't think so. I set a break point and then step over the line in question 
which immediately causes the assertion failure.

>> This is the (partial) backtrace:
>> 2012-05-08 18:09:28.516 MyApp[18775:507] *** Assertion failure in 
>> -[NSTextFieldCell _objectValue:forString:errorDescription:], 
>> /SourceCache/AppKit/AppKit-1138.32/AppKit.subproj/NSCell.m:1564
>> 
>> Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
>> Invalid parameter not satisfying: aString != nil
>> 2012-05-08 18:09:31.845 MyApp[18775:507] (
>>  0   CoreFoundation  0x7fff90d12fc6 
>> __exceptionPreprocess + 198
>>  1   libobjc.A.dylib 0x7fff8c3f4d5e 
>> objc_exception_throw + 43
>>  2   CoreFoundation  0x7fff90d12dfa 
>> +[NSException raise:format:arguments:] + 106
>>  3   Foundation  0x7fff92db1743 
>> -[NSAssertionHandler 
>> handleFailureInMethod:object:file:lineNumber:description:] + 169
>>  4   AppKit  0x7fff8a9495a5 -[NSCell 
>> _objectValue:forString:errorDescription:] + 160
>>  5   AppKit  0x7fff8a9494ff -[NSCell 
>> _objectValue:forString:] + 19
>>  6   AppKit  0x7fff8a949465 -[NSCell 
>> setStringValue:] + 41
>>  7   AppKit  0x7fff8aa4a5e8 -[NSControl 
>> setStringValue:] + 115
> 
> So, what’s line 8? Are you *certain* that it’s the line you quoted above, and 
> not some other -setStringValue: call in your code?
> If you set a breakpoint on the line in question, and then step over the call, 
> does the exception trigger?

Yes. This is the surrounding code:

if (self.toolbarPageNumberTextField.integerValue != 
self.pageListController.selectionIndex + 1) {
if (self.toolbarPageNumberTextField.integerValue == 
NSNotFound) {
self.toolbarPageNumberTextField.stringValue = 
@"";
} else {
NSUInteger idx = 
self.pageListController.selectionIndex;
if ( idx != NSNotFound ) {

self.toolbarPageNumberTextField.integerValue = idx + 1;
} else {

self.toolbarPageNumberTextField.stringValue = @"";
}
}
}

> The only other explanation I can think of is that some previous bug in the 
> code has messed up the predefined NSString instance that @“” points to. But 
> that would be hard to do — IIRC, the compile-time-constant NSStrings are 
> somewhat magical and don’t track refcounts, so you can’t over-release them.

I don't release @"" anywhere, so that is indeed very, very unlikely. Also, if I 
avoid the exception and assign @"" to a text field a bit later on in another 
piece of code, it works just fine. Could it be a compiler bug?

-António


It isn't so important to do great things,
as to do what you do with great love.





___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Ben Kennedy
On 08 May 2012, at 9:28 am, Charlie Dickman wrote:

>> Catchpoint 7 (exception thrown).2012-05-08 18:09:31.742 MyApp[18775:507] 
>> Invalid parameter not satisfying: aString != nil
> 
> @"" is the nil string and the compiler is smart enough to make the 
> substitution. 

Certainly not true.  @"" is a zero-length string.  It is an NSString object.  
It has an address.  It is most definitely not nil.

-b


--
Ben Kennedy, chief magician
Zygoat Creative Technical Services
http://www.zygoat.ca


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Issue when hiding NSTableColumn while resizing

2012-05-08 Thread Thibault Martin-Lagardette
On 6 May 2012, at 08:22, Quincey Morris wrote:

On May 1, 2012, at 06:40 , Thibault Martin-Lagardette wrote:

The problem in the end is that not only do I have a visual glitch, but this
also feels like a very hacky/dirty solution, and hence, not the way to go.
I feel like I probably should not be trying to hide columns while some others
are resized. It works most of the time though, so this is very confusing.

What happens if you *don't* hide columns at all, but change your resizing code 
to set the width to 0 when a "hideable" column reaches its nominal min width? 
(Of course, you'd have to set the actual minWidth to 0 first.)

If it turns out you must hide columns for other reasons (for example, the 
"hideable" columns are editable), then you could arrange to actually hide them 
at the end of the resizing process -- and you'd have to show them at the start, 
I suppose.

Alternatively, assuming the table doesn't use a horizontal scroller, how about 
pushing "collapsed" columns (columns that have gone below their min width) out 
of the table view's bounds by resizing the non-collapsed columns? I'm not sure, 
but I think this might work given the position and order in which your columns 
should disappear.


I haven't tried the `width = 0' instead of hidden, but I'm a little afraid of
how hacky this sounds, haha. And also afraid we might still see the columns
separators stacked onto each other.

Also, we do need to have the resize being live, and it is actually the root
problem of all this, otherwise resizing at the end of the resize process works
perfectly well. But this is not the expected behavior, haha.

But yes, there is, in fact, no horizontal scroller, so this is definitely a
possible alternative, though maybe a little more complex because of other
implications, but still feasible.

Thanks for the input!

Sincerely,
--
Thibault Martin-Lagardette

___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSView + NSScrollView, not scrolling

2012-05-08 Thread Andy Lee
On May 5, 2012, at 3:31 AM, qvacua wrote:
> - (void)keyDown:(NSEvent *)theEvent {
>unichar key = [[theEvent characters] characterAtIndex:0];
>NSLog(@"\\U%X pressed", (int)key);
> 
>[self interpretKeyEvents:[NSArray arrayWithObject:theEvent]];
> }
> 
> - (BOOL)acceptsFirstResponder {
>return YES;
> }
> @end
> 
> In "applicationDidFinishLaunching:" I set the frame size of the view
> to something big using setFrameSize.
> 
> What I want — but now working — is scrolling via Page Up/Down key. If
> I understand the doc correctly, I just have to call
> "interpretKeyEvents:" like above

Remove your override of keyDown: and the scrolling should just work. At least 
it does in a test I just did. I'm a little puzzled since I assume your code 
comes from this example in the docs:



In my test I was surprised to find that the view's doCommandBySelector: doesn't 
get called. Either something's changed or there's something I misunderstood. I 
don't see how the key events get mapped to the page-scrolling methods without a 
call to doCommandBySelector:, which I thought did that mapping.

Here are all the methods I implemented in my view class. Feel free to use the 
drawing code so that you can see the scrolling more vividly.

- (void)drawRect:(NSRect)dirtyRect
{
NSRect boxRect = NSMakeRect(0, 0, 200, 30);

for (NSInteger boxIndex = 0; boxIndex < 100; boxIndex++, boxRect.origin.y 
+= 30)
{
// Draw colored background.
if (boxIndex & 1)
{
[[NSColor yellowColor] set];
}
else
{
[[NSColor orangeColor] set];
}
NSRectFill(boxRect);

// Draw box number.
NSString *s = [NSString stringWithFormat:@"%ld", boxIndex + 1];
[s drawInRect:boxRect withAttributes:nil];
}
}

- (BOOL)isFlipped
{
return YES;
}

- (BOOL)acceptsFirstResponder
{
return YES;
}

- (void)doCommandBySelector:(SEL)aSelector
{
NSLog(@"<%@: %p> -- %s -- will try to do command %@", [self className], 
self, __PRETTY_FUNCTION__, NSStringFromSelector(aSelector));
[super doCommandBySelector:aSelector];
}

--Andy


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Andy Lee
Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is 
confusedly zeroing a non-weak pointer. I'm *really* grasping at straws, though.

Are there any bindings on the text field? Again, I don't see why it would 
matter; just wondering.

On May 8, 2012, at 1:13 PM, Antonio Nunes wrote:
> I don't release @"" anywhere, so that is indeed very, very unlikely. Also, if 
> I avoid the exception and assign @"" to a text field a bit later on in 
> another piece of code, it works just fine.

The same text field (toolbarPageNumberTextField), or a different one?

--Andy

___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
On 8 May 2012, at 21:46, Andy Lee wrote:

> Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is 
> confusedly zeroing a non-weak pointer. I'm *really* grasping at straws, 
> though.

No ARC. No garbage collection either.

> Are there any bindings on the text field? Again, I don't see why it would 
> matter; just wondering.

No bindings.

>> I don't release @"" anywhere, so that is indeed very, very unlikely. Also, 
>> if I avoid the exception and assign @"" to a text field a bit later on in 
>> another piece of code, it works just fine.
> 
> The same text field (toolbarPageNumberTextField), or a different one?

Another text field. I'm seeing different behaviour though between letting the 
code run naturally to the empty string assignment and manually moving the PC to 
the line in question. I'll take another look at it after a good night's sleep...

-António 

-
Accepting others as they are
brings a wonderful freedom
to your own mind.

--The Peace Formula
-





___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Mapkit annotation arrays and writing to a file

2012-05-08 Thread Alex Zavatone
I've noticed problems before with structs and NSJSONSerializaion.

I was trying to write out a dictionary (or array) of the contents of 
mapView.annotations, yet writeDictToFile fails, while it writes a simple dict 
just fine.

Is there a problem with the structs within the annotations, namely, the 
CLLocationCoordinate2D struct for each annotation, that prevents this from 
being able to be written out to a dictionary or array?

Thanks in advance.


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Corbin Dunn

On May 8, 2012, at 1:35 PM, Antonio Nunes  wrote:

> On 8 May 2012, at 21:46, Andy Lee wrote:
> 
>> Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is 
>> confusedly zeroing a non-weak pointer. I'm *really* grasping at straws, 
>> though.
> 
> No ARC. No garbage collection either.
> 
>> Are there any bindings on the text field? Again, I don't see why it would 
>> matter; just wondering.
> 
> No bindings.
> 
>>> I don't release @"" anywhere, so that is indeed very, very unlikely. Also, 
>>> if I avoid the exception and assign @"" to a text field a bit later on in 
>>> another piece of code, it works just fine.
>> 
>> The same text field (toolbarPageNumberTextField), or a different one?
> 
> Another text field. I'm seeing different behaviour though between letting the 
> code run naturally to the empty string assignment and manually moving the PC 
> to the line in question. I'll take another look at it after a good night's 
> sleep...

You may have a formatter on the cell, and it is returning nil.

Also, you are mixing what you are using the text field for. In some cases you 
are treating it like an integer, and in others a string. I don't recommend 
using integerValue in your case; instead, convert that integer to a string (and 
vice-versa when you read the value via 
self.toolbarPageNumberTextField.integerValue). If you fix those things your 
problem will probably go away.

--corbin


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Jens Alfke

On May 8, 2012, at 2:08 PM, Alex Zavatone wrote:

> I've noticed problems before with structs and NSJSONSerializaion.
> I was trying to write out a dictionary (or array) of the contents of 
> mapView.annotations, yet writeDictToFile fails, while it writes a simple dict 
> just fine.
> Is there a problem with the structs within the annotations, namely, the 
> CLLocationCoordinate2D struct for each annotation, that prevents this from 
> being able to be written out to a dictionary or array?

I don’t know what you mean by ‘struct’ here — C structs aren’t Objective-C 
objects, so they can’t appear in a Cocoa collection.

I do know that NSJSONSerialization only supports data types defined in JSON, 
i.e. NSDictionary, NSArray, NSString, NSNumber, NSNull. If your object tree has 
instances of any other classes in it, the encoder will throw an exception.

—Jens
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Alex Zavatone
Well, I had a similar problem saving the information to a JSON file and had to 
rebuild the dictionary without the CLLocationCoordinate2D struct, before 
NSJSONSerialization would serialize the dictionary.

The reason I think it's a struct is that's how it's defined in CLLocation.h and 
right now in the debugger, annotation is showing as (struct objc_object * 
const), which sorta conflicts with what you wrote (TTBOMK).

Here are the details from CLLocation.h:

/*
 *  CLLocationCoordinate2D
 *  
 *  Discussion:
 *A structure that contains a geographical coordinate.
 *
 *  Fields:
 *latitude:
 *  The latitude in degrees.
 *longitude:
 *  The longitude in degrees.
 */
typedef struct {
CLLocationDegrees latitude;
CLLocationDegrees longitude;
} CLLocationCoordinate2D;



On May 8, 2012, at 5:27 PM, Jens Alfke wrote:

> 
> On May 8, 2012, at 2:08 PM, Alex Zavatone wrote:
> 
>> I've noticed problems before with structs and NSJSONSerializaion.
>> I was trying to write out a dictionary (or array) of the contents of 
>> mapView.annotations, yet writeDictToFile fails, while it writes a simple 
>> dict just fine.
>> Is there a problem with the structs within the annotations, namely, the 
>> CLLocationCoordinate2D struct for each annotation, that prevents this from 
>> being able to be written out to a dictionary or array?
> 
> I don’t know what you mean by ‘struct’ here — C structs aren’t Objective-C 
> objects, so they can’t appear in a Cocoa collection.
> 
> I do know that NSJSONSerialization only supports data types defined in JSON, 
> i.e. NSDictionary, NSArray, NSString, NSNumber, NSNull. If your object tree 
> has instances of any other classes in it, the encoder will throw an exception.
> 
> —Jens

___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: iOS launch Music app?

2012-05-08 Thread Alex Zavatone
It's not listed here, but maybe this list will get you on the right path:

http://wiki.akosma.com/IPhone_URL_Schemes#Maps



On May 8, 2012, at 8:29 AM, Eric E. Dolecki wrote:

> I know I can launch the iTunes app from my own (itms-apps://)
> 
> What is the prefix for Apple's Music.app? I'd like to launch it from a
> button.
> 
> Thanks,
> Eric
> ___
> 
> 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 Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Conrad Shultz
On 5/8/12 2:35 PM, Alex Zavatone wrote:
> Well, I had a similar problem saving the information to a JSON file
> and had to rebuild the dictionary without the CLLocationCoordinate2D
> struct, before NSJSONSerialization would serialize the dictionary.
> 
> The reason I think it's a struct is that's how it's defined in
> CLLocation.h and right now in the debugger, annotation is showing as
> (struct objc_object * const), which sorta conflicts with what you
> wrote (TTBOMK).
> 
> Here are the details from CLLocation.h:

No one disputes that CLLocationCoordinate2D is a struct.  What Jens is
saying is that you can't store an unwrapped struct in a Cocoa collection
- be it a dictionary, array, or set.

What's getting lost in translation here is that -annotations is an array
of objects of type id .

What sort of object conforming to MKAnnotation are you adding to your
annotations array?  Whatever it is, it must have a -coordinate property.
 It is *this* property this is a CLLocationCoordinate2D struct.  This is
how the data is getting stored in a Cocoa collection.

In any event, I don't see how you could directly serialize your
annotation object to a JSON object for exactly the reason Jens described
(i.e. type incompatibility).

If you need to convert to JSON you could, for example, write an
NSValueTransformer that converts your id  to an
NSDictionary that is compliant with NSJSONSerialization requirements.

Assuming that you are planning on using JSON to communicate with a web
service, though, you will need to determine what data structure the
service is expecting and emit that.


-- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Conrad Shultz
On 5/8/12 2:35 PM, Alex Zavatone wrote:

Or, more straightforward than my NSValueTransformer suggestion (which is
I suppose of diminished value, no pun intended, in this scenario), you
could just add methods to your annotation object (via category if you
don't control the object itself), like:

- (id)initWithJSONSerializableRepresentation:(NSDictionary *)aDictionary;
- (NSDictionary *)JSONSerializableRepresentation;

that would convert to/from a serializable object.

-- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Peter Teeson
This is a continuation of my previous issue stroking a bezier path.
In my sub-class -initWithFrame:frame I do the following:
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
frame.size.width = 200.0;
frame.size.height = 200.0;
frame.origin.x = 50.0;
frame.origin.y = 50.0;

Should I be pixel aligning it? And is this the correct way?
frame = [self convertRectToBacking: frame];
frame = [self convertRectFromBacking: frame];

[self setFrame:frame];
[self setNeedsDisplay:YES];
… ….


Thanks….

___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Corbin Dunn

On May 8, 2012, at 3:16 PM, Peter Teeson  wrote:

> This is a continuation of my previous issue stroking a bezier path.

Hi Peter, I'm not sure what issue you were having.
WRT:

> In my sub-class -initWithFrame:frame I do the following:
>self = [super initWithFrame:frame];
>if (self) {
>// Initialization code here.
>frame.size.width = 200.0;
>frame.size.height = 200.0;
>frame.origin.x = 50.0;
>frame.origin.y = 50.0;
> 
> Should I be pixel aligning it?

Your code above is already point aligned, there for it is pixel aligned. If the 
frame was say 200.2 or 200.5, then you should pixel align it.

> And is this the correct way?
>   frame = [self convertRectToBacking: frame];
>   frame = [self convertRectFromBacking: frame];

The above code doesn't do anything except convert back and forth. Say you have 
a frame origin of 200.5 that you want to be pixel aligned, you would do this:

>   frame = [self convertRectToBacking: frame];

Floor in "pixel space".
frame.origin.x = floor(frame.origin.x);

>   frame = [self convertRectFromBacking: frame];

Now frame is pixel aligned and is back in "point space".

corbin

> 
>   [self setFrame:frame];
>   [self setNeedsDisplay:YES];
>   … ….
> 
> 
> Thanks….
> 
> ___
> 
> 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 Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/corbind%40apple.com
> 
> This email sent to corb...@apple.com


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Mapkit annotation arrays and writing to a file

2012-05-08 Thread Alex Zavatone

On May 8, 2012, at 5:53 PM, Conrad Shultz wrote:

> On 5/8/12 2:35 PM, Alex Zavatone wrote:
>> Well, I had a similar problem saving the information to a JSON file
>> and had to rebuild the dictionary without the CLLocationCoordinate2D
>> struct, before NSJSONSerialization would serialize the dictionary.
>> 
>> The reason I think it's a struct is that's how it's defined in
>> CLLocation.h and right now in the debugger, annotation is showing as
>> (struct objc_object * const), which sorta conflicts with what you
>> wrote (TTBOMK).
>> 
>> Here are the details from CLLocation.h:
> 
> No one disputes that CLLocationCoordinate2D is a struct.  What Jens is
> saying is that you can't store an unwrapped struct in a Cocoa collection
> - be it a dictionary, array, or set.
> 
> What's getting lost in translation here is that -annotations is an array
> of objects of type id .
> 
> What sort of object conforming to MKAnnotation are you adding to your
> annotations array?  Whatever it is, it must have a -coordinate property.
> It is *this* property this is a CLLocationCoordinate2D struct.  This is
> how the data is getting stored in a Cocoa collection.
> 
> In any event, I don't see how you could directly serialize your
> annotation object to a JSON object for exactly the reason Jens described
> (i.e. type incompatibility).
> 
> If you need to convert to JSON you could, for example, write an
> NSValueTransformer that converts your id  to an
> NSDictionary that is compliant with NSJSONSerialization requirements.

It looks like my mentioning JSON serialization added to the lack of clarity of 
my email, but it is another issue entirely.  I just used it as a reference 
problem since I ran into this issue with structs before causing 
JSONSerialization to barf.


In this case, I was/am trying to write out an MapKitView's annotation array as 
an array or a dict with writeToFile to create a pList, and at some point, read 
it back in to restore the annotationList.

I was under the tragically misinformed understanding that since a mapKitView's 
annotations array was already an array, that I could either write it out to a 
file directly (on iOS) or declare a key, add it to a dictionary and write it 
out without doing much of anything special.

When I add my annotations to the mapView's annotations, I'm doing it like so:

CLLocationCoordinate2D coordinate;
coordinate.latitude = latitude.doubleValue;
coordinate.longitude = longitude.doubleValue;

MyLocation *annotation = [[MyLocation alloc] initWithName:title 
address:address coordinate:coordinate];
[self.mapView addAnnotation:annotation];


MyLocation conforms to  and is where I have coordinate defined as 
type CLLocationCoordinate2D.

I'll just walk the annotations array as before, and create another array or 
dict that will write out a valid dict or array.

Then I'll go over the CoreData samples which seem to address this, or as you 
suggested, learn the NSTransform bits.

Thanks both of you.

- Alex




___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Kyle Sluder
On May 8, 2012, at 3:16 PM, Peter Teeson wrote:

> This is a continuation of my previous issue stroking a bezier path.
> In my sub-class -initWithFrame:frame I do the following:
>self = [super initWithFrame:frame];
>if (self) {
>// Initialization code here.
>frame.size.width = 200.0;
>frame.size.height = 200.0;
>frame.origin.x = 50.0;
>frame.origin.y = 50.0;
> 
> Should I be pixel aligning it? And is this the correct way?

No, you should treat the view coordinate system as abstract and only pixel 
align (using -centerScanRect:) when you need to.

Since Quartz coordinates refer to the infinitely-thin space between pixels, the 
area bounded by a rectangle defined by four points is already pixel aligned. 
You only need to shift your coordinates if you want a _line segment_ defined by 
two points to cover whole pixels. This is why you were having issues before, 
since strokes are applied to line segments while fills are applied to the area 
bounded by line segments.

This terminology starts to break down a bit when HiDPI gets involved. Where you 
see "pixel" in the above paragraph, think of an idealized "device-independent 
pixel" which maps directly to real device pixels at 1x (normal) scale factor. 
"Pixel" is actually a misnomer here, but there's no real good alternative term 
for "a unit square 1pt on each side," since the term "point" also refers to the 
infinitely-small location in the coordinate space that is identified by a 
coordinate.

And thankfully we only have 1x and 2x scale factors now. Previously we had 
1.25x and 1.5x factors as well, which made dealing with fractional coordinates 
even more confusing.

--Kyle Sluder
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Should I pixel align in a View subclass in method -initWithFrame:frame?

2012-05-08 Thread Corbin Dunn

On May 8, 2012, at 3:44 PM, Kyle Sluder  wrote:

> On May 8, 2012, at 3:16 PM, Peter Teeson wrote:
> 
>> This is a continuation of my previous issue stroking a bezier path.
>> In my sub-class -initWithFrame:frame I do the following:
>>   self = [super initWithFrame:frame];
>>   if (self) {
>>   // Initialization code here.
>>   frame.size.width = 200.0;
>>   frame.size.height = 200.0;
>>   frame.origin.x = 50.0;
>>   frame.origin.y = 50.0;
>> 
>> Should I be pixel aligning it? And is this the correct way?
> 
> No, you should treat the view coordinate system as abstract and only pixel 
> align (using -centerScanRect:) when you need to.

Or the more modern:

- (NSRect)backingAlignedRect:(NSRect)aRect options:(NSAlignmentOptions)options

corbin

> Since Quartz coordinates refer to the infinitely-thin space between pixels, 
> the area bounded by a rectangle defined by four points is already pixel 
> aligned. You only need to shift your coordinates if you want a _line segment_ 
> defined by two points to cover whole pixels. This is why you were having 
> issues before, since strokes are applied to line segments while fills are 
> applied to the area bounded by line segments.
> 
> This terminology starts to break down a bit when HiDPI gets involved. Where 
> you see "pixel" in the above paragraph, think of an idealized 
> "device-independent pixel" which maps directly to real device pixels at 1x 
> (normal) scale factor. "Pixel" is actually a misnomer here, but there's no 
> real good alternative term for "a unit square 1pt on each side," since the 
> term "point" also refers to the infinitely-small location in the coordinate 
> space that is identified by a coordinate.
> 
> And thankfully we only have 1x and 2x scale factors now. Previously we had 
> 1.25x and 1.5x factors as well, which made dealing with fractional 
> coordinates even more confusing.
> 
> --Kyle Sluder


___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS launch Music app?

2012-05-08 Thread Michael Crawford
Have you considered Scripting Bridge?  You can use this to not only launch 
iTunes but also to do anything that can be done using the supported AppleScript 
interface.

-Michael

On May 8, 2012, at 17:38, Alex Zavatone  wrote:

> It's not listed here, but maybe this list will get you on the right path:
> 
> http://wiki.akosma.com/IPhone_URL_Schemes#Maps
> 
> 
> 
> On May 8, 2012, at 8:29 AM, Eric E. Dolecki wrote:
> 
>> I know I can launch the iTunes app from my own (itms-apps://)
>> 
>> What is the prefix for Apple's Music.app? I'd like to launch it from a
>> button.
>> 
>> Thanks,
>> Eric
>> ___
>> 
>> 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 Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>> 
>> This email sent to z...@mac.com
> 
> ___
> 
> 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 Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/michaelacrawford%40me.com
> 
> This email sent to michaelacrawf...@me.com
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS launch Music app?

2012-05-08 Thread Kyle Sluder
On May 8, 2012, at 5:53 PM, Michael Crawford wrote:

> Have you considered Scripting Bridge?  You can use this to not only launch 
> iTunes but also to do anything that can be done using the supported 
> AppleScript interface.

Subject line says iOS.

--Kyle Sluder
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS launch Music app?

2012-05-08 Thread Michael Crawford
Oops.  When I think iTunes, I think desktop.  Sorry for the noise. 

-Michael

On May 8, 2012, at 21:00, Kyle Sluder  wrote:

> On May 8, 2012, at 5:53 PM, Michael Crawford wrote:
> 
>> Have you considered Scripting Bridge?  You can use this to not only launch 
>> iTunes but also to do anything that can be done using the supported 
>> AppleScript interface.
> 
> Subject line says iOS.
> 
> --Kyle Sluder
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Window cascading

2012-05-08 Thread Peter Ammon

On May 8, 2012, at 2:01 AM, ecir hana  wrote:

> Why's that? Do I have to remember the returned NSPoint and pass it to
> next cascadeTopLeftFromPoint:?

Yes; the usual pattern is:

static NSPoint cascadeLoc = {0, 0};
cascadeLoc = [window cascadeTopLeftFromPoint:cascadeLoc];

The first time this is called (with 0, 0) the window won't be moved, so the 
window's initial position in the nib should be something reasonable (or call 
-center on it before cascade). 

Hope that helps,
-Peter

___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Antonio Nunes
On 8 May 2012, at 23:10, Corbin Dunn wrote:

> 
> On May 8, 2012, at 1:35 PM, Antonio Nunes  wrote:
> 
>> On 8 May 2012, at 21:46, Andy Lee wrote:
>> 
>>> Bizarre indeed. Out of curiosity, are you using ARC? Maybe the compiler is 
>>> confusedly zeroing a non-weak pointer. I'm *really* grasping at straws, 
>>> though.
>> 
>> No ARC. No garbage collection either.
>> 
>>> Are there any bindings on the text field? Again, I don't see why it would 
>>> matter; just wondering.
>> 
>> No bindings.
>> 
 I don't release @"" anywhere, so that is indeed very, very unlikely. Also, 
 if I avoid the exception and assign @"" to a text field a bit later on in 
 another piece of code, it works just fine.
>>> 
>>> The same text field (toolbarPageNumberTextField), or a different one?
>> 
>> Another text field. I'm seeing different behaviour though between letting 
>> the code run naturally to the empty string assignment and manually moving 
>> the PC to the line in question. I'll take another look at it after a good 
>> night's sleep...
> 
> You may have a formatter on the cell, and it is returning nil.
> 
> Also, you are mixing what you are using the text field for. In some cases you 
> are treating it like an integer, and in others a string. I don't recommend 
> using integerValue in your case; instead, convert that integer to a string 
> (and vice-versa when you read the value via 
> self.toolbarPageNumberTextField.integerValue). If you fix those things your 
> problem will probably go away.

Thanks Corbin,

Indeed, there is a number formatter on the cell, so probably that is causing 
the issue then. To make it possible to have an empty text field when there are 
no pages in the document I changed the symbol for 0:
[self.toolbarPageNumberTextField.formatter setZeroSymbol:@""]; (I did 
not know this is possible, until a few minutes ago.)

Then changed all instances of:
self.toolbarPageNumberTextField.stringValue = 
@"";

to
self.toolbarPageNumberTextField.stringValue = 
@"0";

Following your recommendation I also changed

self.toolbarPageNumberTextField.integerValue = 
self.pageListController.selectionIndex + 1;
to

self.toolbarPageNumberTextField.stringValue = [NSString stringWithFormat:@"%d", 
self.pageListController.selectionIndex + 1];

Why do you recommend against using integerValue? For me it would make more 
sense to always use integerValue, especially now that I can set the value to 0 
to show an empty text field, since we're conceptually representing numbers 
here, not strings.

-António



---
Don't believe everything you think
---





___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Leandro Hoffman
Rather than use:  self.myTextField.stringValue = @"";

Couldn't you use:  self.myTextField.setStringValue = @"";   ?

--
Leandro Hoffman
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: self.myTextField.stringValue = @"" fails

2012-05-08 Thread Roland King

On May 9, 2012, at 2:41 AM, Leandro Hoffman wrote:

> Rather than use:  self.myTextField.stringValue = @"";
> 
> Couldn't you use:  self.myTextField.setStringValue = @"";   ?
> 
> --
> Leandro Hoffman

No. That's meaningless. 

self.myTextField.stringValue = @"";

is just syntactic sugar for 

[ self.myTextField setStringValue:@"" ];

is that what you meant? Doesn't matter which you write, you'll get the same 
actual call either way, it will call setStringValue:

but xxx.setStringValue=@"" means nothing and wouldn't compile. 
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Cocoaheads Lake Forest meets tomorrow (Wednesday) night - thus begins a reading group on Matt Neuburg's Programming iOS 5, 2nd edition

2012-05-08 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the
month.  We will be meeting at the Orange County Public Library (El Toro)
community room, 24672 Raymond Way, Lake Forest, CA 92630

Please join us from 7pm to 9pm on Wednesday, 5/9.

Matt Neuburg's Programming iOS 5, second edition just came out, and we are
starting a reading group based on it.  Matt and O'Reilly have provided a
number of paper copies, with electronic versions available.  This month, we
will hand out copies and start working our way through it.  Thanks, Matt,
Gretchen, Sarah, Brian, and the rest of the people at O'Reilly.

Bring laptops, code, discussion topics, etc.  Also, if you are familiar
with the new edition, we would love to hear your thoughts.

As always, details can be found on the cocoaheads web site at
www.cocoaheads.org

(Personal note: Google Irvine is hiring for a number of positions.  One of
them is on my team, working in both Javascript and Java on the Google
Analytics management front end - drop me a line off list if you are
interested.)

Scott
___

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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com