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: 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: 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: 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: 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: 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: 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: 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-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-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

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: 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

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-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 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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
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 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
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: 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: 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: 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: 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

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: 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 ___

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: 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-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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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
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-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-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: 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: 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: 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: 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: 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: 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
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
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: 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: 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

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: 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

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: Optimizing Enormous lists in NSBrowser

2009-09-21 Thread Scott Ribe
that as the bar to match or beat somewhat. In other words, if a directory is so large that it's impractical to use in the Finder, do you really need to be fast at that size? -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.c

Any way to tell why a window is closing?

2009-09-21 Thread Scott Ribe
Within -windowWillClose, I need to know whether or not the user clicked the close button on the window. Please note: this is not for some crazy un-Mac-like UI idea, it is for debugging purposes. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice

Re: Any way to tell why a window is closing?

2009-09-21 Thread Scott Ribe
ing (I think it didn't register with me that the "Managing Title Bars" section was the relevant one). Thanks. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev

Re: Class for external monitor?

2009-09-21 Thread Scott Ribe
ut the menu bar"? The second one is easy, main vs non-main. The first might require you to dig into lower-level CGxxx or IOxxx APIs. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing

Re: wait for the event?

2009-10-05 Thread Scott Ribe
> I unfortunately have it ingrained for 25 > years of straight pascal in MacOS... OK, so you already have some "event-driven" experience when dealing with user events, now you need to extend that thinking to other sources of data, such as the network, in addition to mouse &

Re: How to switch the default printer?

2009-10-17 Thread Scott Ribe
rtr" = 24300; */ pr = RunProcess( "/usr/bin/lpoptions", "-d", pname, NULL ); mDidSwitch = pr.exitval == 0; } SwitchToPrinterStk::~SwitchToPrinterStk() { if( mOldPrinterName != "" ) RunProcess( "/usr/bin/lpoptions",

Re: OSX have that is equivalent to WaitMessage() Win32 API

2009-10-18 Thread Scott Ribe
> I need a function in OSX that is equivalent to WaitMessage() from the > Win32API... You cannot port software from Windows to Mac OS X by simply transliterating function calls. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567

Re: Why getting two awakeFromNib messages??

2009-10-25 Thread Scott Ribe
> Do you know why the file's owner gets awakFromNib > call as well? Is it creating a new file's owner object? That's the entire purpose of having an object in the nib ;-) -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/

Re: Why getting two awakeFromNib messages??

2009-10-25 Thread Scott Ribe
>> Do you know why the file's owner gets awakFromNib >> call as well? Is it creating a new file's owner object? > > That's the entire purpose of having an object in the nib ;-) Sleep-deprived nonsense; try to forget that I ever said it. -- Scott Rib

Re: Implicit @try/@catch?

2009-11-11 Thread Scott Ribe
> Any explanations for the jump? Well, *if* an exception was thrown, of course the rest of the method was skipped over. That's what happens when an exception is thrown, all code all the way up the stack is skipped until the next matching catch block. -- Scott Ribe scott_r...@killerb

Re: Implicit @try/@catch?

2009-11-11 Thread Scott Ribe
Pardon, I misread. You said: > // THIS IS TO WHERE IT SKIPS. I thought that was: > // THIS IS WHAT IT SKIPS. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Coc

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Scott Ribe
ries between Obj-C and C++ frameworks are exactly where this kind of stuff is useful. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: Where are the interface builder components?

2009-11-16 Thread Scott Ribe
pps (toolbars come to mind), but Apple can't do everything at once and they're certainly not going to hold up shipping new features in iWhatever just because you'll want the IB plug-in at the same time. Any particular widget you have a need for, file an enhancement request...

Re: real beginner question

2009-11-16 Thread Scott Ribe
ods, closures, what have you... They're of course "C-flavored" and somewhat different than anything else you may have used. But if your C++ uses functors or any kind of function object, you'll probably grok them right away ;-) -- Scott Ribe scott_r...@killerbytes.com http://ww

tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-19 Thread Scott Ribe
g in some other editable cell. This behavior is 10.5 & 10.6--10.4 & 10.3 worked as I expected them to, first user edit is processed, then button's action method. What's the workaround to get the user's last data entry when the "Save" button is clicked?

Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-20 Thread Scott Ribe
n't help me. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.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. Contact the moderators at

Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-20 Thread Scott Ribe
The crude approach of "[[self window] makeFirstResponder: nil];" seems to work well enough. (I'd previously tried a couple of other things along those lines and failed.) -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303)

Re: How to incrementally compress jpeg?

2009-11-20 Thread Scott Ribe
ut it's a bad idea. You'll get lousy quality from multiple passes of lossy compression, worse than just compressing to your desired result in one step. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___

Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-24 Thread Scott Ribe
long-term. I'm not prepared to tackle this any time soon, but as part of future evolution plans I'll look into it. (Old code base, predates bindings & NSController & NSViewController.) -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice __

Re: Main thread crash

2010-03-23 Thread Scott Ribe
a window controller, then you'll want to run with NSZombies. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Terminating subtasks reliably

2010-04-04 Thread Scott Ribe
> Why not have the parent call setsid() / setpgid() at the beginning? IIRC, odd things happen if a GUI app is not in the Login Window's process group... -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-05

Re: Automator Actions and CFBundleExecutable key

2010-04-11 Thread Scott Ribe
> There are no other warnings tossed out during either compilation > Any thoughts? Compare the build transcripts for debug vs release for clues as to why debug is not producing an executable. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567

Re: Strange "autoreleased with no pool in place" message

2010-04-22 Thread Scott Ribe
Cocoa runtime stuff was all initialized. -- 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: menu madness with retain count

2010-04-27 Thread Scott Ribe
/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html> -- 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

Re: menu madness with retain count

2010-04-27 Thread Scott Ribe
ed by > the pool? Does this give rise to as many calls to release: as they are > autorelease references stored, or does the pool directly adjust the retain > count? Why would you care? -- Scott Ribe scott_r...@elevated-dev.com http://

  1   2   3   4   5   6   7   8   >