Re: Cocoa-dev Digest, Vol 14, Issue 7

2017-01-04 Thread Lorenzo Thurman
> On Jan 4, 2017, at 2:00 PM, cocoa-dev-requ...@lists.apple.com wrote: > > Hi all > I would like to get your experience of using tableViewSelectionDidChange > notification of NSTableView. I have 2 table using in my application. When I > click first table row, it is selected and row shown as

NSStatusItem launches twice when checking launch at login

2014-10-31 Thread Lorenzo Thurman
I have an NSStatusItem app that I’ve had to migrate to a sandboxed app for release in the MAS. In its preferences window, there is a checkbox for “Launch at login”. If I launch the app with no preferences set (i.e. defaults delete my.bundle.identifier, rm

Re: Auto layout and re-sizing subviews.

2014-05-06 Thread Lorenzo Thurman
On May 6, 2014, at 5:31 PM, Daniel Höpfl ap...@hoepfl.de wrote: Hi, On 06.05.2014 23:32, lorenzo wrote: I posted this on SO, but got no answers, so I'm trying here and mabe I can get some help.: I have a window into which I horizontally add two subviews. Into each subview, I place a

Automatically resize parent view when subviews resize

2014-04-13 Thread Lorenzo Thurman
I have an NSView with two subviews (A B) placed horizontally with respect to each other. The subviews can take a variable number of uniformly sized subviews. I’ve placed these constraints on subviews A B, (all done in IB): (They should both have the same height) Top space to container Bottom

Auto center within a custom NSView

2014-03-01 Thread Lorenzo Thurman
I have to add a variable number of NSSliders to a custom view, (although, probably no more than eight). I’d like these items centered within the view, but am unsure how to achieve this. I know I could probably “do the math” and just calculate the position of each as its added, but I thought I

Re: Auto center within a custom NSView

2014-03-01 Thread Lorenzo Thurman
Thanks, I should have known that. On Mar 1, 2014, at 11:55 PM, Kyle Sluder k...@ksluder.com wrote: On Sat, Mar 1, 2014, at 09:19 PM, Lorenzo Thurman wrote: I have to add a variable number of NSSliders to a custom view, (although, probably no more than eight). I’d like these items centered

Re: NSTimezone and offset

2013-09-05 Thread Lorenzo Thurman
rather than GMT referential. Sent from my iPhone On 2013/09/05, at 13:21, Lorenzo Thurman lore...@thethurmans.com wrote: Im working with NSTimezone and I need to get the current timezone offset, but I'm finding this more difficult than I think it should be. I thought it might just

NSTimezone and offset

2013-09-04 Thread Lorenzo Thurman
Im working with NSTimezone and I need to get the current timezone offset, but I'm finding this more difficult than I think it should be. I thought it might just be the way I'm looking at things, but I don't think so. If create an NSTimezone object and then send that object a

Re: NSDateFormatter problem

2012-04-24 Thread Lorenzo Thurman
On Apr 20, 2012, at 9:32 AM, Keary Suska wrote: On Apr 20, 2012, at 6:08 AM, Lorenzo Thurman wrote: On Apr 19, 2012, at 10:18 PM, Keary Suska wrote: Perhaps this excerpt from the API doc is key: Do not use these constants if you want an exact format. Why, might be academic, but if you

Re: NSDateFormatter problem

2012-04-24 Thread Lorenzo Thurman
On Apr 20, 2012, at 9:32 AM, Keary Suska wrote: On Apr 20, 2012, at 6:08 AM, Lorenzo Thurman wrote: On Apr 19, 2012, at 10:18 PM, Keary Suska wrote: Perhaps this excerpt from the API doc is key: Do not use these constants if you want an exact format. Why, might be academic, but if you

Re: NSDateFormatter problem

2012-04-24 Thread Lorenzo Thurman
setFormatterBehavior:NSDateFormatterBehavior10_4] this fixed it. Thanks for the help Yes Virginia, there is a Chaminade --unknown Lorenzo Thurman lore...@thethurmans.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: NSDateFormatter problem

2012-04-24 Thread Lorenzo Thurman
setFormatterBehavior:NSDateFormatterBehavior Yes Virginia, there is a Chaminade --unknown Lorenzo Thurman lore...@thethurmans.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: NSDateFormatter problem

2012-04-24 Thread Lorenzo Thurman
My Break-Dancing days are over, but there's always the Funky Chicken -- The Full Monty On Apr 20, 2012, at 3:47 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Apr 20, 2012, at 12:16 PM, Lorenzo Thurman wrote: I agree. This should not happen, but here is my original code

Networking and sleep

2012-04-12 Thread Lorenzo Thurman
attempts to connect. So I added a sleepForInterval:10 to make my app wait a bit before connecting. This seems to work just fine, but question is: Is there a more elegant way to handle this? TIA Lorenzo Thurman lore...@thethurmans.com ___ Cocoa

Re: Networking and sleep

2012-04-12 Thread Lorenzo Thurman
On Apr 12, 2012, at 9:33 AM, Fritz Anderson wrote: On 10 Apr 2012, at 4:41 PM, Lorenzo Thurman wrote: I have an app which attempts to make an internet connection after receiving an NSWorkspaceDidWake notification. Most of the time, the connection fails with the error, ...internet

Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler

2011-05-03 Thread Lorenzo Thurman
On Mon, May 2, 2011 at 3:15 PM, Quincey Morris quinceymor...@earthlink.netwrote: On May 2, 2011, at 12:47, lorenzo7...@gmail.com wrote: anotherItemController Content Array Bind to: MyAppsClass (added an NSObject from palette and set its class to MyAppsClass) Controller Key:

Re: Binding multiple NSTableView and NSPopupButton to an NSArrayControler

2011-05-02 Thread Lorenzo Thurman
On Fri, Apr 29, 2011 at 3:18 PM, Quincey Morris quinceymor...@earthlink.net wrote: Your description of the problem is a bit fuzzy. Let me nitpick at your description -- it may be that if you straighten out your terminology you'll solve your problem: On Apr 29, 2011, at 12:56, Lorenzo

Binding multiple NSTableView and NSPopupButton to an NSArrayControler

2011-04-29 Thread Lorenzo Thurman
I have an NSTableView column bound to an NSArrayController which itself is bound to an NSMutableArray. The mutable array resides in a different XIB. The data is displayed as expected, but when I remove an item, although it does disappear from the table, the change is not written to disk when the

Re: Binding to an NSMutableArray

2011-02-16 Thread Lorenzo Thurman
On Wed, Feb 16, 2011 at 12:23 AM, Stephen J. Butler stephen.but...@gmail.com wrote: On Wed, Feb 16, 2011 at 12:05 AM, Stephen J. Butler stephen.but...@gmail.com wrote: It works, I just wrote up an example. But unfortunately my universities file storage is crapping out and I can't share it

Binding to an NSMutableArray

2011-02-15 Thread Lorenzo Thurman
I have an object, Student, that contains firstName and lastName as instance variables. Student also contains an NSMutableArray of infraction objects that contains NSString's for the infraction name, location, punishment and an NSDate. I want to bind these infraction objects to the columns of an

Re: Binding to an NSMutableArray

2011-02-15 Thread Lorenzo Thurman
On Feb 15, 2011, at 10:42 PM, Stephen J. Butler stephen.but...@gmail.com wrote: On Tue, Feb 15, 2011 at 10:37 PM, Lorenzo Thurman lorenzo7...@gmail.com wrote: I have an object, Student, that contains firstName and lastName as instance variables. Student also contains an NSMutableArray

Re: NSSearchfield help

2011-02-10 Thread Lorenzo Thurman
On Feb 10, 2011, at 8:55 AM, Dave Reed davel...@mac.com wrote: On Feb 9, 2011, at 9:44 PM, lorenzo7...@gmail.com wrote: I have a NSTableView populated by an NSArrayController. Above the table, I have an NSToolbar, to which I would like add the ability to search. I have found a

Re: Sending email with attachments

2011-02-01 Thread Lorenzo Thurman
Thanks for the reply. Yep, I know there are a variety of mail clients out there, so not everyone uses Mail. And that sucks. This program is actually a port of an iPhone application for which, different mail clients are not a problem. But at least to start, I'm only going to support Mail. I'll

Re: Sending email with attachments

2011-02-01 Thread Lorenzo Thurman
Thanks for the reply. I'll likely go this route for now and just exclude support for all non-Mail.app clients. On Tue, Feb 1, 2011 at 4:33 PM, Tim Schröder t...@timschroeder.net wrote: Lorenzo, at least with Thunderbird I have found it impossible to communicate with from a Cocoa app.

Keeping data in sync across Mac and iPhone

2010-11-24 Thread Lorenzo Thurman
I have a customer request to sync application preferences between Macs and iPhone. The user may not have a MobileMe account, so Sync Services is not an option (or is it?). The user data would be stored in a plist on both platforms and I'm trying to find the best way to keep those in sync. Any and

NSTimer firedate randomly changes

2010-11-17 Thread Lorenzo Thurman
I use two NSTimers in my app. One runs a mini data fetch at regular intervals. I use another to run a full data fetch every 4 hours. The problem I'm running into is that while the mini fetch runs as scheduled, the full fetch never runs. I put some NSLog statements in the code to output the

Re: Setting focus on NSSearchField...

2010-07-09 Thread Lorenzo Thurman
-It's better now and the menu stays after a --slight flickering In case no one has responded to the flickering issue yet (on 10.5?). It may be a known bug. You'll have to disable screen updates just before the call that causes the flickering. And re-enable it just after. I think the macros

Re: Re: Why I can't see my localized nib?

2010-05-17 Thread Lorenzo Thurman
Sorry for the late reply.. I will try it today, but something weird is that I did a fresh new test project and didn't work either. Just a stab in dark, but does your Language and Text setup match the localization?For example, you have a French localization (fr_FR), but are you setup

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Lorenzo Thurman
I've been googling but haven't seen yet how to best validate a 5-digit zipcode for use in the US (without using a webservice). I have the NSString, I just need to validate it. I know zero RegExp, is there a formatter I can use? I actually ran into a similar issue with one of my programs

iPhone and GC

2009-12-21 Thread Lorenzo Thurman
Why can't iPhone apps use GC? Is it resources? Performance? Some combination of the two or other reasons altogether? Just curious, thanks. --My break-dancing days are over, but there's always the funky chicken The Full Monty ___ Cocoa-dev mailing

Enabling keyboard shortcuts in nswindow

2009-11-16 Thread Lorenzo Thurman
I have an NSStatusItem where I am using an NSWindow as it's About Box. When displayed, I can close the window via a mouse click, but not with the cmd w shortcut. I've looked In Apple documents about this, but the documentation assumes a document based app where this action is tied to the

Intercept tap on URL in UITextView

2009-10-14 Thread Lorenzo Thurman
I have text in a UITextView which *may* contain a URL. I would like to intercept any tap on the URL and display the html page in an UIWebView in my app. Can anyone point me to some sample code that does this? Or is it even possible?Thanks! -- My break-dancing days are over, but there's always

Re: NSMenuItem's selectors messages not sent

2009-09-01 Thread Lorenzo Thurman
are happening, and put breakpoints on questionable lines of code. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Aug 31, 2009 at 4:20 PM, Lorenzo Thurman lorenzo7...@gmail.comwrote: I have two applications, both NSStatusItems. Upon upgrading to Snow Leopard

NSMenuItem's selectors messages not sent

2009-08-31 Thread Lorenzo Thurman
I have two applications, both NSStatusItems. Upon upgrading to Snow Leopard (from 10.5), I've found that none of the messages associated with the menu items are called. As near as I can tell, the messages are never dispatched, at least the breakpoints in the methods are never hit. I can't find

Base SDK and deployment target Q

2009-06-27 Thread Lorenzo Thurman
I have a program which needs to run under 10.4, but I used a method that is only defined for 10.5. No biggie, it was easy enough to replace it with something that works for 10.4. The problem is that I didn't find this out until I ran the app under 10.4. My apps deployment target is set to

Re: Base SDK and deployment target Q

2009-06-27 Thread Lorenzo Thurman
temporarily and see what errors you get. You can then make sure you're doing the appropriate runtime checks. steve On Jun 27, 2009, at 6:34 PM, Lorenzo Thurman wrote: I have a program which needs to run under 10.4, but I used a method that is only defined for 10.5. No biggie, it was easy

Re: NSColorWell and bindings

2009-06-13 Thread Lorenzo Thurman
The link to storing NSColor in defaults was helpful. It reinforced what I thought I already knew, but it appears that real problem was storing a system color, [NSColor selectedMenuItemColor], instead of a color constant such as [NSColor blueColor]. I created a simple project just to help

NSColorWell and bindings

2009-06-10 Thread Lorenzo Thurman
I've just added an NSColorWell to my application. I bound it to my NSUserDefaultsController with a controller key of values, model key path values and a value transformer of NSUnarchiveFromData. When I run my program and click on the color well, I get this error in the console: Assertion

Re: NSColorWell and bindings

2009-06-10 Thread Lorenzo Thurman
10.06.2009 um 18:13 schrieb Lorenzo Thurman: I've just added an NSColorWell to my application. I bound it to my NSUserDefaultsController with a controller key of values, model key path values and a value transformer of NSUnarchiveFromData. When I run my program and click on the color well, I get

Re: Cocoa-dev Digest, Vol 6, Issue 855

2009-06-10 Thread Lorenzo Thurman
http://developer.apple.com/documentation/Cocoa/ Conceptual/DrawColor/Tasks/StoringNSColorInDefaults.html My break-dancing days are over, but there's always the funky chicken --The Full Monty Thanks, this page helped. ___ Cocoa-dev mailing list

Re: Instruments and over released objects

2009-06-09 Thread Lorenzo Thurman
--My break-dancing days are over, but there's always the funky chicken The Full Monty On Jun 9, 2009, at 5:28 PM, Dave Keck davek...@gmail.com wrote: Personally, I've found zombies to be perfect in tracking down over-releases. Check out 'NSZombieEnabled'. I did have that enabled. Apologies

Re: Messaging framework

2008-12-25 Thread Lorenzo Thurman
I've heard good things about pantomime though haven't used it myself (and I understand it has a few gotchas related to international characters). It might also be worth looking into solutions accessible via the scripting bridge as my experience has been that languages such as Python offer

Re: Tiger bug on NSXMLParser?

2008-04-29 Thread Lorenzo Thurman
On Tue, Apr 29, 2008 at 7:36 PM, Jens Alfke [EMAIL PROTECTED] wrote: On 29 Apr '08, at 6:27 AM, Lorenzo Thurman wrote: I tried loading the XML into an NSString using initWithContentsOfURL:encoding:error using Latin1 encoding. Under Leopard, the XML is read in just fine. I can output

Tiger bug on NSXMLParser?

2008-04-28 Thread Lorenzo Thurman
I'm using NSXMLParser to read an XML document from a server via initiWithContentsOfURL. This works just fine under Leopard. I can read and parse the data just fine, but under Tiger, I get an empty document error: NSXMLParserErrorDomain = 4 (Empty document). There are several posts in the archives

Re: Binding NSButton enabled state

2008-04-21 Thread Lorenzo Thurman
:47 AM, [EMAIL PROTECTED] purportedly said: On Sat, Apr 19, 2008 at 11:55 PM, Chris Hanson [EMAIL PROTECTED] wrote: On Apr 19, 2008, at 11:08 AM, Lorenzo Thurman wrote: I have two NSTableViews, tableA and tableB, each managed by separate NSArrayControllers. When a selection is made

Re: Binding NSButton enabled state

2008-04-21 Thread Lorenzo Thurman
:47 AM, [EMAIL PROTECTED] purportedly said: On Sat, Apr 19, 2008 at 11:55 PM, Chris Hanson [EMAIL PROTECTED] wrote: On Apr 19, 2008, at 11:08 AM, Lorenzo Thurman wrote: I have two NSTableViews, tableA and tableB, each managed by separate NSArrayControllers. When a selection is made

Proper way to revert with NSUserDefaultsController

2008-04-21 Thread Lorenzo Thurman
I've run into some trouble using revert with NSUserDefaultsController: It doesn't work. My settings do not revert to their previous settings. I'm working on a prefs window and what I want to have happen is if a user clicks the cancel button, any changes made are reverted to their previous setting.

Re: Binding NSButton enabled state

2008-04-20 Thread Lorenzo Thurman
On Sat, Apr 19, 2008 at 11:55 PM, Chris Hanson [EMAIL PROTECTED] wrote: On Apr 19, 2008, at 11:08 AM, Lorenzo Thurman wrote: I have two NSTableViews, tableA and tableB, each managed by separate NSArrayControllers. When a selection is made in either table, an instance variable is set. I

Binding NSButton enabled state

2008-04-19 Thread Lorenzo Thurman
I have two NSTableViews, tableA and tableB, each managed by separate NSArrayControllers. When a selection is made in either table, an instance variable is set. I want to have an NSButton's enabled state to 'YES' whenever the instance variable is set. I've tried binding the button to the instance

Reformatting percent string to two decimal places

2008-04-08 Thread Lorenzo Thurman
I have the string representation of a percentage value, that goes to 6 places beyond the decimal point. Something like this: 64.123456%. I want to round that to 2 places and keep the percent sign at the end e.g. 64.12% and return it as an NSString. I was playing around with NSNumberFormatter (in

NSTableViews, NSArraycontrollers and table selection question

2008-03-07 Thread Lorenzo Thurman
I have two NSTableviews each bound to their own NSArrayControllers. The tables site side by side in a window and are populated simultaneously. That works all well and good. The problem I have is that the first row in each table is selected, but grayed out and clicking on those rows does not fire a