Re: OS/X Java native bug

2023-03-19 Thread Michael Hall via Cocoa-dev
> On Mar 19, 2023, at 1:02 PM, Alan Snyder wrote: > > Your comments don’t make sense to me. > > You either post an event to run the code on the main thread or, if you are on > the main thread, you run the code directly. > > Running the code directly is what invoking a block does. > > How

Re: OS/X Java native bug

2023-03-19 Thread Michael Hall via Cocoa-dev
> On Mar 19, 2023, at 11:48 AM, Michael Hall wrote: > > > >> On Mar 19, 2023, at 10:50 AM, Alex Zavatone wrote: >> >> Would it make sense to intentionally cause this in one test case and then >> try dispatching on another queue at an intention

Re: OS/X Java native bug

2023-03-19 Thread Michael Hall via Cocoa-dev
> On Mar 19, 2023, at 10:50 AM, Alex Zavatone wrote: > > Would it make sense to intentionally cause this in one test case and then try > dispatching on another queue at an intentional lower priority? > > I’m just brainstorming here to create a specific case that we know causes it, > then

Re: OS/X Java native bug

2023-03-19 Thread Michael Hall via Cocoa-dev
> On Mar 19, 2023, at 10:37 AM, Alex Zavatone wrote: > > So while I am waiting for my coffee to actually start working, which > approaches do we think make sense here? > > When starting up, check if thread == main and if so, do one thing, else do > the other? > > If this is correct, what

Re: OS/X Java native bug

2023-03-19 Thread Michael Hall via Cocoa-dev
> On Mar 18, 2023, at 4:46 AM, Michael Hall wrote: > >> On Mar 17, 2023, at 7:49 AM, Alan Snyder > <mailto:javali...@cbfiddle.com>> wrote: >> >> block() means invoke the block > > > Not exactly and it still seems unnecessary here. >

Re: OS/X Java native bug

2023-03-18 Thread Michael Hall via Cocoa-dev
> On Mar 18, 2023, at 4:46 AM, Michael Hall wrote: > > The main differences seeming to be that it takes a pass through the CFRunLoop > doing an invokeBlockCopy After seeing this (java_md_macosx.m JVMInit sameThread is true)… /* * We cannot use dispat

Re: OS/X Java native bug

2023-03-18 Thread Michael Hall via Cocoa-dev
> On Mar 17, 2023, at 7:49 AM, Alan Snyder wrote: > > block() means invoke the block Not exactly and it still seems unnecessary here. It appears to convert the block to a selector and then to invoke it. Eliminate the comments and NSLog’s and I think the following is equivalent and a bit

Re: OS/X Java native bug

2023-03-17 Thread Michael Hall via Cocoa-dev
> On Mar 17, 2023, at 7:49 AM, Alan Snyder wrote: > > block() means invoke the block > >> On Mar 17, 2023, at 5:34 AM, Michael Hall via Cocoa-dev >> wrote: >> >> >> >>> On Mar 17, 2023, at 6:51 AM, Michael Hall wrote: >>&g

Re: OS/X Java native bug

2023-03-17 Thread Michael Hall via Cocoa-dev
> On Mar 17, 2023, at 6:51 AM, Michael Hall wrote: > >> > > Sorry, I looked at your link and am still not sure this is correct if you are > already on the main thread. > Searching shows this used enough places you would think it has to be correct. Again, I guess

Re: OS/X Java native bug

2023-03-17 Thread Michael Hall via Cocoa-dev
> On Mar 17, 2023, at 6:31 AM, Michael Hall wrote: > > > >> On Mar 17, 2023, at 4:07 AM, Saagar Jha wrote: >> >> The implementation of -[ThreadUtilities performOnMainThreadWaiting:block:] >> does the right thing here, which is calling the block

Re: OS/X Java native bug

2023-03-17 Thread Michael Hall via Cocoa-dev
> On Mar 17, 2023, at 4:07 AM, Saagar Jha wrote: > > The implementation of -[ThreadUtilities performOnMainThreadWaiting:block:] > does the right thing here, which is calling the block directly if it’s > already running on the main thread: >

OS/X Java native bug

2023-03-17 Thread Michael Hall via Cocoa-dev
This was just brought to my attention on a java mailing list. An option was added to java startup options on OS/X -XstartOnFirstThread so the code starts on the main Appkit thread. Currently if a java Swing application starts with that option it hangs.

Re: Question about Info.plist's

2020-08-19 Thread Michael Hall via Cocoa-dev
> On Aug 19, 2020, at 10:04 PM, Ben Kennedy wrote: > > >> On 19 Aug 2020, at 7:45 pm, Michael Hall via Cocoa-dev >> wrote: >> >> Something else I’m curious about is doesn’t this somehow invalidate any >> application signing that’s been done? > &g

Re: Question about Info.plist's

2020-08-19 Thread Michael Hall via Cocoa-dev
> On Aug 19, 2020, at 9:04 PM, Michael Hall wrote: > > > I’m not familiar with the Plistbuddy that’s been mentioned. I see that is in fact builtin. Wasn’t aware. Something else I’m curious about is doesn’t this somehow invalidate any application signing that

Re: Question about Info.plist's

2020-08-19 Thread Michael Hall via Cocoa-dev
> On Aug 19, 2020, at 11:07 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Question: > > Is there a way to use a key/value that was defined earlier in the plist file > to define a value for a later key? > Maybe off-topic but this used to be supported for Java applications for pre-set

Re: Thoughts on Cocoa

2019-10-04 Thread Michael Hall via Cocoa-dev
> On Oct 4, 2019, at 2:41 PM, Lars C. Hassing via Cocoa-dev > wrote: > > > On 4 Oct 2019, at 21.00, Jens Alfke wrote: > > The people I hear complaining about this are those who, like you, didn't move > to Cocoa. Carbon was a _temporary_ transition API*. It was necessary when Mac > OS X

Dispatch Sources

2016-12-10 Thread Michael Hall
3-SW22 <https://developer.apple.com/library/content/documentation/General/Conceptual/ConcurrencyProgrammingGuide/GCDWorkQueues/GCDWorkQueues.html#//apple_ref/doc/uid/TP40008091-CH103-SW22> Michael Hall ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: kqueue

2016-11-24 Thread Michael Hall
one had any thoughts on why java going into a wait would cause the kqueue to stop posting events? Or would know of general reasons why kqueue would stop posting events? I did a lot of googling on that the last time around but pretty much came up empty. Michael Hall _

Re: kqueue

2016-11-24 Thread Michael Hall
specific conditions and output. > > This made it convenient to monitor the patient (the app) and keep track of > specific conditions on a per window (per readout) basis. Not sure I’m following. I can output messages fine. But I’m not sure what I can put in them that will tell me anyt

kqueue

2016-11-24 Thread Michael Hall
) spinning wheels back at square 1 again. Michael Hall ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help

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

2015-05-23 Thread Michael Hall
operating systems https://en.wikipedia.org/wiki/Operating_system I thought it was file magic and was thinking it’s use even pre-dated Mac’s. There were, I thought, a couple others as well but my memory is probably not the best going back that far. Michael Hall

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

2015-05-22 Thread Michael Hall
consistently. You would think you could be even more creative these days with 64 bit addresses to work with. I tried to narrow my search to Apple sites to see if I could find it mentioned in doc somewhere but came up empty. Michael Hall ___ Cocoa

Re: NSMapTable with C strings as keys

2013-05-29 Thread Michael Hall
On May 28, 2013, at 5:55 PM, Greg Parker wrote: On May 28, 2013, at 3:39 PM, Michael Hall mik3h...@gmail.com wrote: On May 28, 2013, at 5:27 PM, Michael Hall wrote: I thought I saw SHA-1 being used as a general purpose hash function somewhere sort of surprising recently but I'm

Re: NSMapTable with C strings as keys

2013-05-28 Thread Michael Hall
saw SHA-1 being used as a general purpose hash function somewhere sort of surprising recently but I'm not remembering exactly where. Maybe if the collision resistance or hash value uniformity out weigh the performance concerns? Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall

Re: NSMapTable with C strings as keys

2013-05-28 Thread Michael Hall
On May 28, 2013, at 5:27 PM, Michael Hall wrote: I thought I saw SHA-1 being used as a general purpose hash function somewhere sort of surprising recently but I'm not remembering exactly where. Ah, sorry to reply to my own but maybe this was it… https://news.ycombinator.com/item?id=4036878

Re: Sharing a file between Mac and iOS

2012-07-19 Thread Michael Hall
On Jul 19, 2012, at 5:16 PM, Dennis wrote: It looks like I need to explore using Dropbox. iCloud? If these are your own application's files. Might be a possibility. Haven't tried it. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Sharing a file between Mac and iOS

2012-07-19 Thread Michael Hall
On Jul 19, 2012, at 6:40 PM, Mark Munz wrote: iCloud? If these are your own application's files. Might be a possibility. Haven't tried it. According to Apple, apps have to be on the Mac App Store in order to use iCloud APIs. That makes it an automatic 2nd choice (over something like

NSFileManager directory lists and hidden files

2012-07-07 Thread Michael Hall
I am trying to write something using kqueue to monitor a directory. It is my understanding that for file creation I will be told a directory has been written to and I then have to list the directory myself to determine the file added. I add the original directory path files using

Re: NSFileManager directory lists and hidden files

2012-07-07 Thread Michael Hall
On Jul 7, 2012, at 6:48 PM, Ken Thomases wrote: On Jul 7, 2012, at 5:58 PM, Michael Hall wrote: How do I get the enumeratorAtURL to include the .DS_Store files. It does for me on 10.6.8. How are you testing for a file you've seen before? Maybe you did actually get

Re: How to get SDK 10.5 on XCode 4?

2012-06-04 Thread Michael Hall
What new GCC? Xcode 4 dropped GCC in favor of LLVM. gcc -version i686-apple-darwin11-llvm-gcc-4.2: no input files ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: How to get SDK 10.5 on XCode 4?

2012-06-04 Thread Michael Hall
On Jun 4, 2012, at 6:45 PM, Nick Zitzmann wrote: On Jun 4, 2012, at 5:26 PM, Michael Hall wrote: What new GCC? Xcode 4 dropped GCC in favor of LLVM. gcc -version i686-apple-darwin11-llvm-gcc-4.2: no input files That's not GCC; that's LLVM-GCC, or LLVM with a GCC front-end. The real

Re: How to know if a file has been opened before?

2012-06-04 Thread Michael Hall
On Jun 4, 2012, at 5:50 PM, Antonio Nunes wrote: I have implemented window state restauration in an app. This works fine for re-opening documents that were open when the app was last quit. What I now want to do is extend that functionality to files that were not necessarily open when the

Re: How to know if a file has been opened before?

2012-06-04 Thread Michael Hall
On Jun 4, 2012, at 9:00 PM, Fritz Anderson wrote: On 4 Jun 2012, at 8:53 PM, Michael Hall wrote: I was recently looking at some old finder api's. and some of it involves fields that are pretty much obsolete. I was trying to figure out which flag bit setting corresponded to the locked

Re: Bookmark alias files v. Finder alias files

2012-04-15 Thread Michael Hall
On Apr 14, 2012, at 4:39 PM, Shane Stanley wrote: Thanks, Charles. I guess that makes it arguably a Finder bug. Nicely done, what was actually used on the resource forks out of curiosity? Really, on the arguably a bug? I suppose if your sole criteria is minimal size. Or maybe the criteria is

Re: Bookmark alias files v. Finder alias files

2012-04-15 Thread Michael Hall
On Apr 15, 2012, at 7:36 AM, Shane Stanley wrote: On 15/04/2012, at 9:23 PM, Michael Hall wrote: If your criteria is best variety of icons, then current could be argued buggy since it only has one icon resource to the Finder's two. But the Finder really only has one, twice

Re: Bookmark alias files v. Finder alias files

2012-04-14 Thread Michael Hall
On Apr 14, 2012, at 5:05 AM, Ken Thomases wrote: You can also access the resource fork as a file by appending /..namedfork/rsrc to the path. Ken beat me to it after I found this... Work with resource forks in the Terminal http://hints.macworld.com/article.php?story=2002022409532098 Ken

Re: Bookmark alias files v. Finder alias files

2012-04-14 Thread Michael Hall
On Apr 14, 2012, at 7:11 AM, Shane Stanley wrote: Thanks Ken and Michael. So the Finder-generated alias has a ~96KB resource fork, and the bookmark-generated one has a 48KB resource fork. On comparing them, it looks like the first ~48KB are identical apart from the first and last few

Re: Seeding random() randomly

2011-05-27 Thread Michael Hall
On May 26, 2011, at 8:00 PM, Graham Cox wrote: I'm using random(), but every time I run my app I get the same sequence, despite having this code in my app delegate's -appDidFinishLaunching method. Clearly I'm not seeding it right, though I can't see why - I get a different value for seed

Re: Seeding random() randomly

2011-05-27 Thread Michael Hall
On May 26, 2011, at 10:32 PM, Jens Alfke wrote: On May 26, 2011, at 7:15 PM, Kevin Bracey wrote: srandom(time(NULL)); It’s never a good idea to seed a RNG with something guessable like this. (An old exploit against the Netscape browser’s SSL implementation was made possible in part

Re: Help on Cocoa Class references

2011-01-20 Thread Michael Hall
On Jan 19, 2011, at 9:18 PM, Scott Anguish wrote: Apple won’t even be shipping Java with the OS in the future (there was an announcement about this recently). You’ll need to get it from Oracle (who Apple transferred things to as I recall in another announcement) Announcing: OpenJDK for Mac

Default keyword selector type

2010-11-13 Thread Michael Hall
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 In looking at NSControl.h there is a NSKeyboardUI category definition with the following instance method declaration - -- (void)performClick:sender; This category is defined a number of places and at least some of them indicate that the type

Re: Default keyword selector type

2010-11-13 Thread Michael Hall
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Nov 13, 2010, at 6:41 AM, Ken Thomases wrote: From http://developer.apple.com/library/mac/#documentation/Cocoa/ Conceptual/ObjectiveC/Articles/ocLanguageSummary.html#//apple_ref/ doc/uid/TP30001163-CH3-TPXREF106: ∙ The default return and

Re: Base64 encoding (iPhone)

2010-06-01 Thread Michael Hall
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jun 1, 2010, at 3:13 PM, Joshua Tucker wrote: has anyone got any working sample code for encoding an NSString with Base64 on the iPhone? fwiw, Cocoa with Love: Base64 encoding options on the Mac and iPhone

Re: FSPathCopyObjectSync and symbolic links?

2009-04-26 Thread Michael Hall
On Apr 26, 2009, at 8:22 AM, Iceberg-Dev wrote: Is it possible to copy a symbolic link (the symbolic link file and not the item it references) using the FSPathCopyObjectSync API? No valuable info was found in the documentation, the list archive, google results. The File Manager

Re: How can I draw an election map?

2009-03-30 Thread Michael Hall
On Mar 30, 2009, at 5:07 PM, Tobias Zimmerman wrote: I am starting a new project that involves simulating various US election results. I want to plot the results using an election map similar to the ones that were all over the web during last year’s election. However, I would like to

Re: Trigonometric Problem, Particularly tan() Function

2008-07-13 Thread Michael Hall
On Jul 13, 2008, at 8:30 AM, Patrick Walker wrote: My other problems seems to be -2877334 itself. To me, that appears to be a rather strange value for a floating point number Tan^-1 on -2877334 on my trusty TI-36X Solar shows that as -89.975 Mike Hallhallmike at att dot net

Re: Intercepting Apple Events

2008-07-10 Thread Michael Hall
On Jul 10, 2008, at 12:24 PM, Elan Feingold wrote: Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? I just remembered this one from the

Re: Intercepting Apple Events

2008-07-10 Thread Michael Hall
On Jul 10, 2008, at 12:24 PM, Elan Feingold wrote: Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? A very limited way might be with the debug

Re: Process app.

2008-06-30 Thread Michael Hall
On Jun 30, 2008, at 3:44 PM, Ken Thomases wrote: More techniques: Technical Note TN2050: Observing Process Lifetimes Without Polling http://developer.apple.com/technotes/tn/tn2050.html Getting off-topic maybe but I did this from java. For example... CmdJHTML: terminated Firefox

Re: looking for a crc code

2008-06-14 Thread Michael Hall
On Jun 14, 2008, at 10:25 AM, Jens Alfke wrote: On 14 Jun '08, at 4:59 AM, Ilan Volow wrote: No mention at all I can find (in the 20 seconds I scanned the first two result pages) of any cocoa CRC implementations. If a newbie were to do a search like this and turned up such a fruitless

Re: looking for a crc code

2008-06-14 Thread Michael Hall
--- Andrew Farmer [EMAIL PROTECTED] wrote: Yep. There was recently a discussion of this on the list, actually. Missed that, sorry. fprintf(stdout,crc=%i\n,crc); Note that this'll print out the CRC as a signed integer, which is almost certainly not what you want.