Re: WTF? Is a file corrupted?

2009-05-13 Thread Scott Ribe
ge, and has not happened since... -- 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

Re: Updating NSTableView

2009-05-14 Thread Scott Ribe
> Actually I have big DB, so for a single change it will take lot of time to get > reflected NSTableView only fetches data for rows as they are displayed, so it should not take a long time to redraw. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567

Re: Updating NSTableView

2009-05-14 Thread Scott Ribe
> ... well, unless you have variable-height rows. Then (potentially > complex) calculations have to be done to determine those cells that do > need to be drawn. > > Corbin? Do I have this right? Well yes. Although that can be solved with the right underlying model... -- Sco

Re: Updating NSTableView

2009-05-14 Thread Scott Ribe
are truly necessary, the first draw may still be slow, but there's really no reason a redraw should be slow after changing one (or a few) values. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ C

Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))

2009-05-14 Thread Scott Ribe
I typically do during development. Then very late in testing I'll look at the whole program run and try to make sure that all never-deallocated memory is appropriate. Maybe you already knew this, but I thought it was worth posting for the archives... -- Scott Ribe scott_r...@killerbytes.com

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Scott Ribe
king around 4D "quirks", and your end product is more robust with a richer and more thoroughly "Mac-like" interface. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev maili

Re: Invoice program made in Objective c/Cocoa

2009-05-15 Thread Scott Ribe
> The main > disadvantage that plain Cocoa has over a 4G package such as 4D is the > lack of a decent, priceworthy reporting front-end that can be used to > easily and quickly design all sorts of printouts that has to be made. Good point. -- Scott Ribe scott_r...@killerby

Re: MPTask equivalent?

2008-02-22 Thread Scott Ribe
hat are thread-safe. You can also pass pointers to Objective-C objects through MPQueues. Just watch out for the race condition of passing an autoreleased object via an MPQueue--retain the object before putting it on the queue and release it (at a CORRECT time) after getting it from the queue. --

Re: 64-bit iOS

2013-09-12 Thread Scott Ribe
On Sep 10, 2013, at 2:19 PM, Fábio Bernardo wrote: > without any gains Unless, of course, you discuss apps that actually need it ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-

Re: Cocoa class extension best practice

2013-10-15 Thread Scott Ribe
On Oct 15, 2013, at 4:10 PM, "Mills, Steve" wrote: > No, it's the itemArray. Ignore the code you can't see in the loop. It's > simply asking each item for its tag. But you could have over-retained them or under-released them somewhere else, and I think that was

Re: Cocoa class extension best practice

2013-10-15 Thread Scott Ribe
On Oct 15, 2013, at 9:08 PM, Steve Mills wrote: > I haven't retained or released anything. I'm simply calling itemArray. What items are in the menu? How did they get there? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 7

Re: Cocoa class extension best practice

2013-10-16 Thread Scott Ribe
-document apps, and it works well. (I didn't even know about the NSNib stuff; I guess we started at different ends of the docs when we first tried to figure this out, you at nibs, and me at window controllers.) -- Scott Ribe scott_r...@elevated-dev.com http:/

Re: Core Data with ODBC databases?

2013-10-17 Thread Scott Ribe
atency is not good enough for a decent user experience, oh well... -- 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 request

Re: Core Data with ODBC databases?

2013-10-17 Thread Scott Ribe
Distributed Computing” article warns against … because those fallacies don’t > apply to tightly-bound systems like CoreData+SQLite, and are often ignorable > in LAN-based systems like the typical app-server+db-server setup in a data > center. But on the Internet they will bite you. Yep, l

Re: How did I break Auto Save during -[NSApp terminate:]?

2013-10-21 Thread Scott Ribe
think you don't need, put logging into them all, and then experiment. -- 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: Arc: Switch case is in protected scope

2013-10-22 Thread Scott Ribe
stance that has a constructor or destructor, and this goes back to versions of GCC from at least several years ago--trust me, I know about that ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Coc

Re: Arc: Switch case is in protected scope

2013-10-22 Thread Scott Ribe
inning of the scope. Which actually makes it more clear what the problem with switch is. (If the constructor were inserted at the beginning of the scope, there would be no problem with potentially skipping over it.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0

Re: Arc: Switch case is in protected scope

2013-10-22 Thread Scott Ribe
se problems in switch cases, correct? -- 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 lis

Re: Arc: Switch case is in protected scope

2013-10-22 Thread Scott Ribe
On Oct 22, 2013, at 11:17 AM, Daniel Höpfl wrote: > OK ... but as you say, the standard should contain the answer. Next try: Well, there's some evolution there, and this new Objective-C feature which kind of falls in between different versions of traditional C, ANSI C, C++. -- Sc

Re: NSTask and 10.9

2013-11-26 Thread Scott Ribe
On Nov 26, 2013, at 9:42 AM, koko wrote: > > On Nov 26, 2013, at 8:56 AM, Pax <45rpmli...@googlemail.com> wrote: > >> hy would you delete files in this manner? > > Need to wildcard the file names. Get the directory contents and look for matches, or use glob

Re: Fast hash of NSData?

2013-11-29 Thread Scott Ribe
On Nov 29, 2013, at 12:58 PM, Graham Cox wrote: > Another general question. > > Does anyone have a quick-and-dirty (but functional) way to hash NSData? I’m > currently using SHA-1 but it’s quite slow. All I need is a way to determine > whether one block of data is identical to another or not -

Re: Fast hash of NSData?

2013-11-29 Thread Scott Ribe
On Nov 29, 2013, at 2:49 PM, Kyle Sluder wrote: > In this scheme, if there is a hash collision, you lose user data. That should > be a non-starter. You *must* do a full bytewise comparison in case of > collision. a 1 in 2^64, or 2^128, or 2^256 chance, so no, it is just fine. __

Re: Fast hash of NSData?

2013-11-29 Thread Scott Ribe
On Nov 29, 2013, at 7:40 PM, Jens Alfke wrote: > Murmur is an excellent 32-bit hash function, but it’s not suitable for > Graham’s use case where a collision would result in data loss. FYI, murmur has continued to evolve, with some tweaks both for performance and for better distribution, *and*

Re: Fast hash of NSData?

2013-11-30 Thread Scott Ribe
On Nov 30, 2013, at 3:51 PM, Mike Abdullah wrote: > Anything short of a cryptographic hash is unsuitable for you here. No, cryptographic or not is irrelevant. Good non-cryptographic hashes are no more likely to have collisions on legitimate input, the only thing a cryptographic hash adds to th

Re: Fast hash of NSData?

2013-12-01 Thread Scott Ribe
e out how much you can shorten the hash without collisions... BTW, IIRC, one of the weaknesses with FNV has to do with strings of 0s, and as long as your image data is compressed, it will never contain long strings of 0s. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com

Re: Fast hash of NSData?

2013-12-01 Thread Scott Ribe
On Dec 1, 2013, at 10:51 AM, Kyle Sluder wrote: > I still find it unconscionable to handle the user’s data with any scheme that > could potentially lose it under normal operation, regardless of how > infinitesimal the chance. Then you can use neither a computer nor a hard drive to handle the u

Re: Fast hash of NSData?

2013-12-01 Thread Scott Ribe
On Dec 1, 2013, at 10:51 AM, Kyle Sluder wrote: > Just because git does it doesn’t make it okay. Oh, and not just git, but *every* distributed system. They all depend on UUIDs or hashes, either one of which could in theory collide. ___ Cocoa-dev mail

Re: Fast hash of NSData?

2013-12-01 Thread Scott Ribe
n argument for an alternative approach that does not require hashing, and that's fine. But there are certainly other cases where a hash would be what is needed, and our "monkey-brain" reaction against it would be counter-productive, which is why I'm still flogging this..

Re: Fast hash of NSData?

2013-12-01 Thread Scott Ribe
physics guarantee some probability of data loss, then it's perfectly reasonable to evaluate other risks against that floor--and I do have more to say on that, but my internet connection is flaking, and I don't seem to be able to access most of the web right now, so cannot get the a

Re: Fast hash of NSData?

2013-12-01 Thread Scott Ribe
On Dec 1, 2013, at 11:15 AM, Kyle Sluder wrote: >> On Dec 1, 2013, at 10:01 AM, Scott Ribe wrote: >> >>> On Dec 1, 2013, at 10:51 AM, Kyle Sluder wrote: >>> >>> I still find it unconscionable to handle the user’s data with any scheme >>> that

Re: Fast hash of NSData?

2013-12-01 Thread Scott Ribe
y greater than anything else in your life or your customers'... -- 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 r

Re: Fast hash of NSData?

2013-12-02 Thread Scott Ribe
ere are only about 2^270 or so atoms in the known universe--and that's the highest end of the estimated range ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (C

Re: Fast hash of NSData?

2013-12-02 Thread Scott Ribe
er than a good hash. -- 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. Contact the

Re: Fast hash of NSData?

2013-12-02 Thread Scott Ribe
adding different files. The amortized cost is not so low if you have users who keep adding the same files over & over ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mai

Re: ToolTips for Matrix Cells

2013-12-03 Thread Scott Ribe
t this is of no > interest to me. > > Is there a way to show the ButtonCell-ToolTips? FYI, this worked in prior versions of OS X. I don't know if it is a bug, or a deliberate change, but you might file a bug report. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-

Re: WebView blocks User Interface

2013-12-05 Thread Scott Ribe
long. Maybe you can restructure the HTML somehow? Anyway, use a timer, every keystroke, instead of displaying the search, re-set an NSTimer to fire in, say, 0.25 seconds. Display the results when either they're short, or the timer fires b

Re: WebView blocks User Interface

2013-12-05 Thread Scott Ribe
s really not to blame. Ah... So it doesn't like less-common Unicode characters... Curious... -- 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: Threaded drawing

2013-12-09 Thread Scott Ribe
width’ value, even though I had calculated the bytesPerRow to be the correct > offset anyway. What were your actual values and what was the assertion? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___

comboBoxSelectionDidChange not called

2013-12-23 Thread Scott Ribe
Xcode 5.0.2 instead of 3.2.6. ??? -- 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

Re: PDFView not rendering pages on scroll

2013-12-23 Thread Scott Ribe
ought I'd note: same behavior if you select that in IB before building, rather than switching via UI while running--you cannot have a "proper" 1-page-at-a-time display. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-

Re: comboBoxSelectionDidChange not called

2013-12-24 Thread Scott Ribe
On Dec 23, 2013, at 12:08 PM, Scott Ribe wrote: > comboBoxSelectionDidChange in my delegate is not called when the user selects > an item using the mouse. > > - The target action for a selection change *is* called. > > - Problem is 10.6 only, it is called as expected on 1

Re: comboBoxSelectionDidChange not called

2013-12-30 Thread Scott Ribe
NewGWorldPtr) could have affected this. On Dec 24, 2013, at 10:24 AM, Scott Ribe wrote: > On Dec 23, 2013, at 12:08 PM, Scott Ribe wrote: > >> comboBoxSelectionDidChange in my delegate is not called when the user >> selects an item using the mouse. >> >> - The target act

Re: comboBoxSelectionDidChange not called

2013-12-30 Thread Scott Ribe
s, but I had it right in the code, copy/paste doesn't get the colon as part of the word. Anyhow, as I just posted, it's fixed--mysteriously enough. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: comboBoxSelectionDidChange not called

2013-12-30 Thread Scott Ribe
hecked (and am considering turning it off, but need to figure out what I libraries I should add). -- 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: comboBoxSelectionDidChange not called

2013-12-30 Thread Scott Ribe
On Dec 30, 2013, at 2:06 PM, Scott Ribe wrote: > Some things I suppose I should note: > > - Xcode 5.0.2 > - All software updates applied to all OSs. > - I am using the same copy of Xcode under both 10.8 & 10.9. > - I am not ignoring compiler warnings ;-) > - There is

Re: comboBoxSelectionDidChange not called

2013-12-31 Thread Scott Ribe
On Dec 30, 2013, at 2:39 PM, Quincey Morris wrote: > On Dec 30, 2013, at 13:06 , Scott Ribe wrote: > >> Does anyone have any further suggestion for me??? > > The release notes for 10.6 say this: > >> For apps linked on or after SnowLeopard, if a combo box is confi

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Scott Ribe
ice you can offer to help me? Just dive in. It's not hard. Unfortunately, I haven't done this from scratch since Xcode 2, so I can't tell you exactly what to do but... Name a file .mm. Include some C++ headers. Write some C++ code. See how far you get ;-) -- Scott Ri

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Scott Ribe
On Jan 29, 2014, at 6:02 PM, Greg Parker wrote: > Lisp probably did it before that. Hell, Lisp machines did it in hardware ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mail

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Scott Ribe
On Jan 30, 2014, at 1:38 PM, Peter Teeson wrote: > ...so just wanted to find out what has changed. Support for most of C++11 :-) :-) :-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Scott Ribe
a-dev/rui.pacheco%40gmail.com >> >> This email sent to rui.pach...@gmail.com > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. &g

Re: Xcode 5 & Obj-C++

2014-01-31 Thread Scott Ribe
d certainly be worthless to combine the baroque complexity of C++ with the dispatch performance of Java... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: tooltips on NSMatrix cells

2014-02-05 Thread Scott Ribe
ild of your app and check the tooltips on 10.9 (or 10.8 for that matter)... -- 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 adm

Re: tooltips on NSMatrix cells

2014-02-05 Thread Scott Ribe
On Feb 5, 2014, at 5:42 PM, Graham Cox wrote: > My older builds show the tooltips fine on 10.9 (compiled against 10.8 SDK > with Xcode 4.6.x). That's weird, because mine do not. (Compiled against 10.6 SKD with Xcode 3.2.6.) -- Scott Ribe scott_r...@elevated-dev.com http://w

Re: ARC and autorelease pools

2014-02-16 Thread Scott Ribe
_all_ methods that return objects have to return a retained reference for > the caller to release. This would end up adding a huge number of > retain/release calls, which I'm pretty sure would affect performance. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.co

Re: Disabling screen capture

2014-02-21 Thread Scott Ribe
On Feb 21, 2014, at 2:26 PM, Bradley O'Hearne wrote: > Industries such as medical (HIPAA), legal, government, education, military > defense, etc. all have such security needs. Well, there's certainly no such need for HIPAA compliance... -- Scott Ribe scott_r...@eleva

Re: Disabling screen capture

2014-02-21 Thread Scott Ribe
On Feb 21, 2014, at 10:38 PM, Bradley O'Hearne wrote: > This is not the case on Windows. It provides the ability to block certain > things which public API on OS X does not. His point was that counting on that is not reliable. -- Scott Ribe scott_r...@elevated-dev.com http://w

Re: Disabling screen capture

2014-02-22 Thread Scott Ribe
e screen shots, how about: using fsevents to watch for the files to be created, and delete them. (Or, in this case raise a big fat alarm so the proctor will know.) I know, pure evil ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303)

Re: Disabling screen capture

2014-02-23 Thread Scott Ribe
ps the files right on the desktop. -- 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 th

Re: notification when device change in /dev

2014-02-26 Thread Scott Ribe
ttributes there's a BSD device path for those things that have one. I don't remember exactly where, because I actually have never needed it and just recall seeing it in passing. But yeah, there is an attributes dictionary you can get for a device, and there is an attribute for the dev n

Re: NSDocument save incremental file package in-place

2014-03-02 Thread Scott Ribe
. Then your recovery code checks for a log, if it's there move any files still in the temp location into their proper final location, and delete the log. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice _

Re: NSTask for external tool - keep active/prevent relaunch?

2014-03-08 Thread Scott Ribe
ant to sample (or spindump) everything instead. -- 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 comment

Re: error details in a NSAlert

2014-04-06 Thread Scott Ribe
rectly. Maybe it doesn't have the value you think, or maybe it's over-released and the value is gone before it can be drawn. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-d

Re: NSTask: program launching another program, potential problem with path: how to do?

2014-04-10 Thread Scott Ribe
e to use such as a default, but there should be a way to specify it.) Are you sure there is not a command line option to pdflatex to tell it where to find gnuplot? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: Good idea/bad idea?

2014-04-24 Thread Scott Ribe
of the ternary operator, if you really want to offend the "verbosity == clarity" crowd, sprinkle your code with some of the these: (foo ? x : y) = @"yo"; ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice __

Re: Good idea/bad idea?

2014-04-24 Thread Scott Ribe
On Apr 24, 2014, at 9:48 AM, Scott Ribe wrote: > (foo ? x : y) = @"yo"; Darn it, C++ once again infected a post of mine ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev

Re: Good idea/bad idea?

2014-04-24 Thread Scott Ribe
On Apr 24, 2014, at 2:10 PM, Alex Zavatone wrote: > Could we throw a category on NSObject for that and then every class that > originates with NSObject gets that lovely method? What's wrong with the simple straightforward C way??? -- Scott Ribe scott_r...@elevated-dev.com http://w

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
dropping files onto, then you have to select from a popup what to do with the input, then you write your script. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (C

Re: Drag and drop onto BSD command line tool?

2014-05-17 Thread Scott Ribe
On May 17, 2014, at 5:34 PM, Scott Ribe wrote: > On May 17, 2014, at 5:14 PM, Bob Sabiston wrote: > >> I’ve never used Automator, would it do this? > > Yes. I don't remember all the details, but from what I recall I think it > should take you about 10 minutes to

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

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

<    3   4   5   6   7   8