Re: NSAlert::runModal doesn't work on 10.6

2016-08-23 Thread Scott Ribe
On Aug 23, 2016, at 8:52 AM, Andreas Falkenhahn wrote: > > I really can't use NSApplicationMain() because AFAICS it also expects > to load a NIB file from the app bundle The nib to load at startup is specified in the plist, I bet if you leave that entry out, it won't try

Re: BOOL parameter passed as nil object

2016-04-19 Thread Scott Ribe
retty severe trap for the unaware. (Especially the part where multiples of 256 can become == NO...) When it's a proper C99'ish bool, then all values are cast to bool at assignment, and so it is always == either 0 or 1. -- Scott Ribe scott_r...@elevated-dev.com http://

Re: ARC, blocks, capture variables

2015-09-28 Thread Scott Ribe
On Sep 28, 2015, at 6:24 PM, Quincey Morris wrote: > > On Sep 28, 2015, at 17:14 , Scott Ribe wrote: >> >> "Assigning block literal to a weak variable; object will be released after >> assignment" > > Well, you wouldn’t assign a literal there. You

Re: ARC, blocks, capture variables

2015-09-28 Thread Scott Ribe
when working on it; that sounds like a good suggestion, BUT: "Assigning block literal to a weak variable; object will be released after assignment" :-P -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice

Re: ARC, blocks, capture variables

2015-09-28 Thread Scott Ribe
On Sep 27, 2015, at 7:51 PM, Scott Ribe wrote: > > On Sep 27, 2015, at 7:03 PM, Quincey Morris > wrote: >> >> IIRC you can simply assign ‘self’ to a local variable just before assigning >> to ‘fun', and use the local variable name instead of ‘self’ inside

Re: ARC, blocks, capture variables

2015-09-27 Thread Scott Ribe
On Sep 27, 2015, at 7:03 PM, Quincey Morris wrote: > > IIRC you can simply assign ‘self’ to a local variable just before assigning > to ‘fun', and use the local variable name instead of ‘self’ inside the block. Well, that does work. Thanks! -- Scott Ribe scott_r...@elevate

ARC, blocks, capture variables

2015-09-27 Thread Scott Ribe
So how to get rid of the warning? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: Continue application processing with mouse down on a menu

2015-09-27 Thread Scott Ribe
rying about correct synchronization of that polling.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas

Re: Continue application processing with mouse down on a menu

2015-09-27 Thread Scott Ribe
then yielding at key points, as in the old days of cooperative multi-processing, have way more problems than multiple threads. If you have computation that needs to keep running without blocking menu tracking and other event handling, you need to put it on its own thread, period. -- S

Re: Continue application processing with mouse down on a menu

2015-09-26 Thread Scott Ribe
On Sep 26, 2015, at 11:55 AM, Programmingkid wrote: > > I think the reasoning for this is the user interface is expected to be > responsive and if other processes are running, then the interface will be > sluggish. That *WAS* the reasoning, in 1984 ;-) -- Scott Ribe scott_r

Re: Continue application processing with mouse down on a menu

2015-09-26 Thread Scott Ribe
cessing even with the > mouse down? If the application is already processing on the main thread, clicking on a menu will not interrupt it. The menu just won't display & track until the main thread is idle. Processing on any other thread will not affect menu tracking, and vice versa.

Re: Odd Crash

2015-09-24 Thread Scott Ribe
missed, and is dealloc'ing something early. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not pos

Re: Odd Crash

2015-09-24 Thread Scott Ribe
down in a very specific order. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: Puzzling memory creep

2015-09-04 Thread Scott Ribe
ng back gradually. And of course if it does leak with no code, you're ready to file a bug report and/or open a DTS incident. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice __

Re: Puzzling memory creep

2015-09-03 Thread Scott Ribe
e what happens to memory usage ;-) Also, you are aware that you can get the full stack trace for any allocation, right? (You may have to set an option in the instrument before you start the run, I don't remember.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev

Re: How to terminate an NSTask whenever my app terminates?

2015-09-01 Thread Scott Ribe
if there's any Cocoa or CF equivalent. Sorry for the confusion, this is actually something I've gotten backwards before. I've written the code for the child to monitor for the parent's exit, yet I still forget that it's necessary. Go figure... -- Scott Ribe

Re: How to terminate an NSTask whenever my app terminates?

2015-08-31 Thread Scott Ribe
main() {while(1) sleep(1);} Use NSTask to launch it. Kill your parent in various ways and verify that the child gets killed: kill -9, call abort, crash it with the time-honored *(char*)0 = 0. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scot

Re: Unsigned Modulo

2015-08-12 Thread Scott Ribe
On Aug 12, 2015, at 4:12 AM, Gerriet M. Denkmann wrote: > > This code produces some (for me) unexpected results: % is remainder NOT modulus. Unfortunately early editions of K&R had it misnamed, and that has stuck despite that error having been corrected well over 20 years ago. --

Re: 64-bit only iOS

2015-08-04 Thread Scott Ribe
On Aug 4, 2015, at 8:37 AM, Scott Ribe wrote: > > I am correct that it is currently not possible to submit a 64-bit-only build > to the App Store? > > Kind of a Catch-22; I have no 32-bit devices here anymore, and the simulator > in current Xcode doesn't offer them. I

64-bit only iOS

2015-08-04 Thread Scott Ribe
32&64??? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: AfxIsValidAddress

2015-07-14 Thread Scott Ribe
DOCUMENTED* to do that, but it doesn't ;-) Of course the rest of your post, about not depending on it, would be valid even if it worked... This is a definite FUGGEDABOUTIT situation. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe

Re: AfxIsValidAddress

2015-07-14 Thread Scott Ribe
s-advertised/> TL;DR, here you go: BOOL AfxIsValidAddress(const void *p, size_t nBytes) { return p != NULL; } -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___

Re: Cheating a synchronous call on the main thread

2015-06-29 Thread Scott Ribe
On Jun 29, 2015, at 2:50 PM, Gavin Eadie wrote: > > The main thread is not involved in the above, but the idea of an > “asynchronous-that-waits” == “apparently synchronous” call is demonstrated. That's simply not asynchronous. -- Scott Ribe scott_r...@elevated-dev.com http:

Re: Cheating a synchronous call on the main thread

2015-06-29 Thread Scott Ribe
ion that both waits and does not wait. Sorry, but it's time to open that box and see if the damned cat is dead or not ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice _

Re: Cheating a synchronous call on the main thread

2015-06-29 Thread Scott Ribe
like program behavior that is poorly specified. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: Cheating a synchronous call on the main thread

2015-06-29 Thread Scott Ribe
rforming the work on a background thread, then using some callback to execute the "after" code when it's done--which is what you should be doing. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in

Re: C Assert in BSD Static Library

2015-06-23 Thread Scott Ribe
#x27;s just my personal style, that I refuse to define it to anything other than 1, because why should I have to remember that NDEBUG=0 also turns it *on*? As does NDEBUG? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303)

Re: C Assert in BSD Static Library

2015-06-23 Thread Scott Ribe
people build up all sorts of ASSERT macros of their own, with all sorts of config options... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice ___ Cocoa-dev ma

Re: Language options: Objective-C, Swift, C or C++?

2015-06-17 Thread Scott Ribe
On Jun 17, 2015, at 2:04 PM, Jens Alfke wrote: > > Guys, talking about Swift vs. Obj-C/C/C++ has a slight amount of use, but if > we start dragging everyone’s pet language into the fray (Algol? Burroughs > B5000 assembly?) Dylan, dammit ;-) -- Scott Ribe scott_r...@elevated-

Re: How to enable local storage in WebView using Swift

2015-06-03 Thread Scott Ribe
es.localStorage = true > > I get a "WebPreferences does not have a member named ..." error. > > How can I do it? > > Thanks in advance, I don't know Swift, nor much about WebViews, but I'd guess it's because you got the member name wrong. Try localStorag

Re: Looking at self = [super init].

2015-06-03 Thread Scott Ribe
On Jun 3, 2015, at 6:30 AM, Alex Zavatone wrote: > > With that in mind, what should it have depended on instead? His point was not that such dependence was bad, nor even avoidable. His point was that the C++ was a steaming pile ;-) -- Scott Ribe scott_r...@elevated-dev.co

Re: Looking at self = [super init].

2015-06-01 Thread Scott Ribe
On Jun 1, 2015, at 10:43 PM, Britt Durbrow wrote: > > So…. it looks like clang at least is doing the right thing and calling the > destructor when the variable goes out of scope. Yep. But I believe with goto you can skip over a constructor--but at least you get a warning. -- S

Re: Looking at self = [super init].

2015-05-29 Thread Scott Ribe
ble in if expressions etc, but that seems like overkill here, since you would always run this on its own at the top of a block. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0

Re: Looking at self = [super init].

2015-05-29 Thread Scott Ribe
On May 29, 2015, at 12:17 PM, Alex Zavatone wrote: > > Typing == by habit. My mistake. Ah, *NOW* the conversation makes sense ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567

Re: Looking at self = [super init].

2015-05-29 Thread Scott Ribe
On May 29, 2015, at 11:49 AM, Alex Zavatone wrote: > > Would this handle it properly? > > if (!(self = [super init])) { >return nil; > } Yes. > if (!(self == [super init])) No. But not sure whether you were asking about that or not… -- Scott Ribe scott_r...@

Re: objc_msgSend() selector name: tableView:objectValueForTableColumn:row:

2015-05-27 Thread Scott Ribe
of > older Xcode versions’ codegen. I’m pretty sure that a window and it’s views should not be trying to redraw after being closed… -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303)

Re: objc_msgSend() selector name: tableView:objectValueForTableColumn:row:

2015-05-26 Thread Scott Ribe
now if Xcode 5 can run on Yosemite), or > drop 10.6 support. My decision was to do the latter; Snow Leopard is four > years old now. Time to move on. Well now, if this isn’t totally strange. I’m starting to see this problem *after* switching to Xcode 6.2 and switching my

Re: What is overwriting 'isa' with 0xbaddc0dedeadbead ?

2015-05-23 Thread Scott Ribe
DEADBEEF is what some memory debugging utilities write over memory it's freed. If it’s showing in your isa pointer, then you’re accessing an object which has been dealloc’d. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303

Re: Optionals? A better option!

2015-05-15 Thread Scott Ribe
On May 15, 2015, at 11:06 AM, Kyle Sluder wrote: > > It's not valid to dereference a null pointer, but what happens when you > do is undefined. As in the olden days of OS 9 & before, when you could freely read & write through location 0, usually leading to great hil

Re: Converting to Window Coordinates

2015-04-22 Thread Scott Ribe
On Apr 22, 2015, at 10:10 AM, Dave wrote: > > I really can’t understand why it was ever defined to be bottom left, does > anyone know why? Normal Cartesian coordinates. (I agree the other way made sense, measuring from the menu bar…) -- Scott Ribe scott_r...@elevated-dev

Re: Display an Alert Sheet at a Specified Screen Position

2015-03-26 Thread Scott Ribe
op of > the bottom view than at the top of the window.) I do it too. Be warned, starting with Mavericks things went wacko-batshit stupid if the sheet is near the screen bounds... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/

Re: Official or correct explanation of numbers on the 1st column for every method/function call in process sample?

2015-03-17 Thread Scott Ribe
On Mar 17, 2015, at 4:26 PM, JongAm Park wrote: > > Then can the number of samples be interpreted as how long it took there... It can be taken as a very rough approximation of that. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567

Re: BOOL attribute types.

2015-02-18 Thread Scott Ribe
Brain farts happen... > On Feb 18, 2015, at 11:58 AM, Alex Zavatone wrote: > > Well, stupid me. You can't have a BOOL with a nil value. Thanks Scott. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303)

Re: BOOL attribute types.

2015-02-18 Thread Scott Ribe
On Feb 18, 2015, at 11:02 AM, Alex Zavatone wrote: > > In creating an autoDescription method for objects, it's important to know if > our BOOLs are NO or nil. ??? It's a char, not a pointer, simply an integer type. Nil is 0, NO is 0, assign 0 to an integer, you have

Re: Right-mouse click in tables not working correctly since 10.10.2?

2015-02-10 Thread Scott Ribe
On Feb 10, 2015, at 4:16 PM, Graham Cox wrote: > > If others are seeing this effect I'll file a bug, otherwise I'll just have to > put it down to something weird on my system. I'm not seeing it all all in the Finder, and haven't noticed it elsewhere. -- Scott Rib

Re: Advice for iOS web app with live feed

2015-01-14 Thread Scott Ribe
d provides helpers to assist with the protocol details and hand your data back to you. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Weird crash in FSRefCreate while saving NSDocument

2014-11-25 Thread Scott Ribe
rd-party kexts and/or any frameworks loaded that did not come from you or Apple. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Weird crash in FSRefCreate while saving NSDocument

2014-11-25 Thread Scott Ribe
On Nov 25, 2014, at 1:26 AM, Markus Spoettl wrote: > > My user says he doesn't experience sluggishness, he also tried rebooting the > machine and repair the disk permissions. Still crashes reliably every time. In that case, I'd personally suspect heap corruption. --

Re: Weird crash in FSRefCreate while saving NSDocument

2014-11-24 Thread Scott Ribe
a few things for you to possibly find out: is there a lot of file manipulation being done on that Mac, is performance of everything sluggish before this happens, and will it work after a reboot. -- Scott Ribe scott_r...@elevated-dev.com http://www.eleva

Re: how to reset another app's prefs

2014-11-20 Thread Scott Ribe
t to open a document, it would not even open that document. All of which is no longer true, so at least MS straightened out that little bit of dementia.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___

how to reset another app's prefs

2014-11-20 Thread Scott Ribe
leaks. And so on. So periodically (+ whenever it stops responding) I quit Word, copy preferences files from cached copies I keep that are set the way I want, and relaunch it. So, any way to for certain replace prefs with a know good set previously saved? -- Scott Ribe scott_r...@elevated-dev.com

Re: New CGContext warning in Yosemite

2014-11-17 Thread Scott Ribe
*Finder.app* is spewing, and just imagine them pulling the trigger on this. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Nil Coalescing and Optional Chaining?

2014-11-07 Thread Scott Ribe
On Nov 7, 2014, at 8:34 AM, David Wood wrote: > > Only now does it occur to me that the place to post this would have been a > Swift-dev mailing list. Is that even a thing? No, use of Swift is so intimately tied to Cocoa that they're having those discussions here. -- Scot

Re: Crash with ARC enabled on Xcode 6.1

2014-10-23 Thread Scott Ribe
der in > which things are called before main is called. The runtime is up. But of course, no run loop, no event handling. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (

Re: Crash with ARC enabled on Xcode 6.1

2014-10-22 Thread Scott Ribe
On Oct 22, 2014, at 3:45 PM, Beinan Li wrote: > > stop reason = signal SIGABRT When there's a SIGABRT, there's usually an error logged. You should look for that, because it might give a good clue. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303

Re: NSInvocation crashes in AutoreleasePool

2014-10-22 Thread Scott Ribe
was the appropriate one here... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contac

Re: NSInvocation crashes in AutoreleasePool

2014-10-22 Thread Scott Ribe
On Oct 22, 2014, at 12:19 PM, Jonathan Mitchell wrote: > > Surely the code that returns the object pointed to by temp has to ensure that > the object has been correctly retained? So, maybe __autorelease? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303)

Re: NSInvocation crashes in AutoreleasePool

2014-10-22 Thread Scott Ribe
of those compiler incantations with attributes to inform ARC (__unsafe_unretained?) - some kind of kludge to fool ARC -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@

Re: NSInvocation crashes in AutoreleasePool

2014-10-22 Thread Scott Ribe
On Oct 22, 2014, at 11:46 AM, Gerriet M. Denkmann wrote: > > But how to fix this? Can you actually retain a pointer that ARC expects to be already retained, or would be it a NOOP? Sorry, I only use manual memory management, so my previous reply may have been off-base. -- Scott Ribe s

Re: NSInvocation crashes in AutoreleasePool

2014-10-22 Thread Scott Ribe
ent threads. Caution, and the occasional "special technique", are required. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: Wiring up MainMenu.xib

2014-10-19 Thread Scott Ribe
Sorry, duh, you wire it up to "First Responder". On Oct 19, 2014, at 8:47 AM, Scott Ribe wrote: > You don't need to wire that up in IB. You just need to implement the action > in your window controller. > > On Oct 19, 2014, at 8:36 AM, Luther Baker wrote: > >

Re: Wiring up MainMenu.xib

2014-10-19 Thread Scott Ribe
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/scott_ribe%40elevated-dev.com > > This email sent to scott_r...@elevated-dev.com -- Scott Ribe scott_r...@e

Re: Setting the Selected Segment of a Segmented Control

2014-10-15 Thread Scott Ribe
would require you to set some flag before changing a control's state, so that the event handler for that event would know *not* to propagate changes. It would be an absolute nightmare to code to begin with, and even worse to maintain... -- Scott Ribe scott_r...@elevated-dev.com ht

Re: Code signing problem using shared framework in Yosemite

2014-10-12 Thread Scott Ribe
p embeds an Automator action, not quite the same as embedding a framework, but similar in that there's a code resource with its own signature.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-

Re: Kerning Pairs

2014-10-11 Thread Scott Ribe
into our model. You missed his point. Kerning can be much more complicated than what can be expressed in that kind of table. So Kyle's question is: what are you trying to accomplish with that table? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/

Re: How to pretty print floating numbers (without loosing precision)?

2014-10-11 Thread Scott Ribe
On Oct 11, 2014, at 7:36 AM, Scott Ribe wrote: > On Oct 11, 2014, at 2:04 AM, Gerriet M. Denkmann wrote: > >> Note: converting to double does NOT loose any digits. > > Well, it has to. Not sure how you're getting that output, but a double has 52 > bits for th

Re: Concurrent tasks are getting hung up

2014-10-11 Thread Scott Ribe
e less likely I am to replace my home-grown task queues with the "modern" built-in stuff. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Concurrent tasks are getting hung up

2014-10-10 Thread Scott Ribe
ysical CPUs)/2 and (number of logical CPUs)x2. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: return string that is the difference between two other strings

2014-09-20 Thread Scott Ribe
ty little lamb she had" vs @"mary had a big lamb, a little fella of a lamb she had for sure" There is no simple definition of "the difference between two strings", and I don't think it's a basic need at all. -- Scott Ribe scott_r...@elevated-dev.com http

Re: NSUserDefaults not sticking

2014-09-10 Thread Scott Ribe
on whether or not you're running under the debugger, I didn't check. I figured out my bug and fixed it before I got to that point ;-) But basically, this is now a royal PITA to debug, because there does not seem to be ANY way to externally confirm what your program has written into t

Re: problem with NSWorkspace running apps

2014-09-04 Thread Scott Ribe
; identifier, similarly to -launchAppWithBundleIdentifier:. I'd missed URLForApplicationWithBundleIdentifier in the docs. That's exactly what I need. In fact, if I have the URL, I don't even need the NSRunningApplication, so one way or or the other, that will do it for me. -- Sco

Re: problem with NSWorkspace running apps

2014-09-04 Thread Scott Ribe
in the debugger, get the list of apps, and it's not listed. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

problem with NSWorkspace running apps

2014-09-04 Thread Scott Ribe
o return an NSRunningApplication* or nil, instead of BOOL... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: My services in my own app

2014-09-02 Thread Scott Ribe
will stay > highlighted for 30s and after that it will give an error dialog: Yeah, you're in the run loop handling the menu event when you send an event to yourself, which will not be received until your code finishes so the run loop can get the event and dispatch it--deadlock. -- Scott Ribe sc

Re: Best practice for creating a temporary file

2014-09-02 Thread Scott Ribe
en it before Then at launch you can always check the location where you put temp paths, to see if there's any cleanup that was missed previously. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___

Re: Mod (%) function in C/Objective-C?

2014-08-12 Thread Scott Ribe
uncation was undefined for division with negative integers, but C99 fixed that. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Mod (%) function in C/Objective-C?

2014-08-11 Thread Scott Ribe
n is precise and covers that case, and some programming languages just do not implement it. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please d

Re: Mod (%) function in C/Objective-C?

2014-08-11 Thread Scott Ribe
cross vast numbers of web sites. K&R C stated that the direction of truncation and sign of result were machine-dependent for negative operands. The C99 standard tightened that up, making % into a well-specified remainder operator. -- Scott Ribe scott_r...@elevated-dev.com http://w

Re: Mod (%) function in C/Objective-C?

2014-08-10 Thread Scott Ribe
etter if people would learn to quit incorrectly referring to % as mod, but I guess that ship has sailed (all the way off the edge of the earth, actually)... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice __

Re: Talking to other apps

2014-08-04 Thread Scott Ribe
server, > so those caching issues should be less of a problem. 10.6? 10.7? It was unreliable enough that I gave up long ago, before 10.8 & 10.9. So it may very well work just fine if you don't need to support older OS versions. -- Scott Ribe scott_r...@elevated-dev.com http://www.e

Re: Talking to other apps

2014-08-04 Thread Scott Ribe
On Aug 4, 2014, at 11:47 AM, Uli Kusterer wrote: > You can have a domain that is shared by two apps from the same manufacturer. Careful, I've had lots of problems with that--changes to defaults not being saved when you synch, and so forth. -- Scott Ribe scott_r...@elevated-dev.

Re: Talking to other apps

2014-08-04 Thread Scott Ribe
re not sandboxed, I'd just use domain sockets. <https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man4/unix.4.html> -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___

Re: [NSDictionary objectForKey] crash on x64

2014-07-11 Thread Scott Ribe
fact that you did not (yet, at least) discover this bug on 32-bit is just coincidence. So check out your retain/release/autorelease handling of the dictionary. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: UUIDs for FAT Drives

2014-07-08 Thread Scott Ribe
rial # with manufacturer). But I am sure you can get the answer to that question on Apple's usb list ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: UUIDs for FAT Drives

2014-07-07 Thread Scott Ribe
On Jul 7, 2014, at 8:01 PM, SevenBits wrote: > Is there any supported way to get the UUID of a FAT-formatted drive? Or > another method which can uniquely identify USBs of all major filesystem types? FAT drives do not have UUIDs. -- Scott Ribe scott_r...@elevated-dev.com http://www.el

Re: NSFileHandle -availableData breaks stdin stream at 4K chunks?

2014-07-02 Thread Scott Ribe
So there cannot > ever be more than 4k of available data at a time, because “available” means > “sitting in the buffer ready to be copied out”. > > —Jens Which means, that until you read the 4K in the buffer, the sending side is blocked. -- Scott Ribe scott_r...@elevated-dev.com

Re: NSFileHandle -availableData breaks stdin stream at 4K chunks?

2014-07-02 Thread Scott Ribe
On Jul 2, 2014, at 6:34 PM, Jerry Krinock wrote: > Although it was fun to write the code to buffer and stitch the message fields > and length fields back together, I’d like to know what is causing these 4K > breaks. It's the OS itself. Unix domain sockets have 4k buffers.

Re: Problems with NSComboBox delegate

2014-06-26 Thread Scott Ribe
gt; indices match the enumerated values. > > > > ___ > > 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)li

Re: NSReleasePool issue

2014-06-21 Thread Scott Ribe
On Jun 21, 2014, at 12:16 PM, Kyle Sluder wrote: > And as far as I can remember, developers have _always_ been responsible for > setting up a backstop autoreleasepool. Never. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567

Re: Color closest to color

2014-06-17 Thread Scott Ribe
On Jun 17, 2014, at 7:14 AM, Mills, Steve wrote: > The algorithm I've seen then takes the square root of that value. If the square root of a is larger than the square root of b, then a is larger than b ;-) (In this case a & b will both be positive.) -- Scott Ribe scott_r...@elev

Re: initWithCoder: calling init in custom class

2014-06-16 Thread Scott Ribe
avoid all the hooha of a temporary variable and if statement: valueA = [coder decodeObjectForKey:kValueAKey] ?: valueA; -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa

Re: Can an iPhone5 be a USB Host device?

2014-06-04 Thread Scott Ribe
On Jun 4, 2014, at 10:04 PM, sonofsky2...@gmail.com wrote: > Does anyone know weather an iPhone5 can be a USB Host Device? No. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing l

Re: EXC_BAD_ACCESS in NSData

2014-05-28 Thread Scott Ribe
On May 28, 2014, at 10:24 PM, Uli Kusterer wrote: > That said, if you want to be really endian-safe, use an XML file format saved > as UTF-8 like Property Lists. Most portable format there is. :-) Thanks a lot. I have to go rinse out my mouth now. -- Scott Ribe scott_r...@elevated-d

Re: EXC_BAD_ACCESS in NSData

2014-05-26 Thread Scott Ribe
tely. (For read-only access.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Co

Re: EXC_BAD_ACCESS in NSData

2014-05-26 Thread Scott Ribe
On May 26, 2014, at 9:32 AM, Uli Kusterer wrote: > Oh, and as Roland wrote, don’t forget to free() the pointer once you’re done > with it. But, just to be 100% clear, *not* the one you get from calling the bytes method ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.el

Re: EXC_BAD_ACCESS in NSData

2014-05-26 Thread Scott Ribe
On May 26, 2014, at 9:05 AM, Roland King wrote: > The first one of those is ok... No, it's not--take a closer look ;-) > unsigned char* databuffer = (unsigned char*)malloc(datasize); > [datastream getBytes:&databuffer range:NSMakeRange(positionCounter, > datasize)]; -

Re: EXC_BAD_ACCESS in NSData

2014-05-26 Thread Scott Ribe
g a good tutorial on C or Objective-C is in order. If you have, then reviewing the sections on pointers and dynamic memory is in order. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev

Re: Document architecture: locking document files while open

2014-05-23 Thread Scott Ribe
rt, then it could be safe, but that's a tough requirement to meet.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
. And if there's only 1 argument, then you only need myScript "$1" No need to loop over the list for 1 argument... Of course, you might want to check the number of arguments before assuming there's only 1 and skipping the rest of the list. (Or, as with the answer in that t

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
On May 17, 2014, at 5:54 PM, Bob Sabiston wrote: > Within Automator, you have to add a “Get Specified Finder Items” action > before the script... No, that's for getting the Finder's current selection. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303

  1   2   3   4   5   6   7   8   >