Re: menu madness with retain count

2010-04-27 Thread Gary L. Wade
On 04/27/2010 2:27 PM, Shawn Erickson shaw...@gmail.com wrote: On Tue, Apr 27, 2010 at 2:22 PM, Gary L. Wade garyw...@desisoftsystems.com wrote: Yes, but how would you use those to determine why an Apple framework now chooses to retain a delegate (I'm referring to one particular one I

Re: menu madness with retain count

2010-04-27 Thread Gary L. Wade
On 04/27/2010 2:46 PM, Shawn Erickson shaw...@gmail.com wrote: [ removed lots of bad assumptions by Shawn ] Shawn, it is apparent your understanding of reality is flawed when it comes to my efforts to track down the bug in Apple's code, so please go away. This thread is over.

Re: NSURLConnection Crashes : Mac OS 10.6.3 Edition! (Was: Async NSURLConnection...)

2010-04-22 Thread Gary L. Wade
Instruments adds some extra safeguarding to some of their tools, so you should whittle down your functionality until you know this-or-that code will cause or not cause the crash, depending on inclusion. It's possible what you're seeing is a side-effect that is set up elsewhere and dies in a

Re: Determining preferred localizations

2010-04-21 Thread Gary L. Wade
The list you are getting is a set of preferred localizations, so when trying to get a resource from the first one, if not available, will go on to the next one and so forth. You should utilize the localization-aware methods to handle getting resources rather than trying to manage this yourself.

Re: Determining preferred localizations

2010-04-21 Thread Gary L. Wade
at the locale APIs to help with splitting and normalizing these values. On 04/21/2010 1:54 PM, Gregory Weston gwes...@mac.com wrote: Gary L. Wade wrote: The list you are getting is a set of preferred localizations, so when trying to get a resource from the first one, if not available, will go

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread Gary L. Wade
David If you have any influence, it would be REALLY nice to allow Instruments to copy the leak contents section as well as being able to view the data in alternate formats. If it can be expedited, my bug report for this request is rdar://7776006 On 04/15/2010 10:42 AM, David Duncan

Re: What gets automatically localized?

2010-04-08 Thread Gary L. Wade
I don't know if this is documented somewhere, but if all you're needing is an actual string to copy into your project, you could try checking the frameworks' resources on your disk. If your project is linking against the actual runtime frameworks rather than one of the SDK versions, try doing a

Re: extracting the mantissa for a NSDecimal

2009-11-20 Thread Gary L. Wade
On 11/20/2009 10:49 AM, Jens Alfke j...@mooseyard.com wrote: On Nov 20, 2009, at 9:53 AM, Greg Guerin wrote: The representation stored in the NSData may be endian-sensitive. If the NSDictionary contents might cross architectures, that could be problematic. s/may be/is/ s/could

Re: Where are the interface builder components?

2009-11-19 Thread Gary L. Wade
On 11/19/2009 5:45 PM, Sandro Noël sandro.n...@gestosoft.com wrote: This thread of emails want not intended to bash Apple for not doing their work, I just needed to understand why the components are not already available in the toolbox when it seemed logical to me that they should of been

Re: Callback when OS delivers console msg for my process?

2009-11-13 Thread Gary L. Wade
Have you tried NSImage's delegate methods for loading status? On Nov 13, 2009, at 11:23 AM, Trygve Inda wrote: I use: imageWithContentsOfFile:@a.jpg And sometime it generates a console message: Corrupt JPEG data: premature end of data segment How can I use an observer/exception

Re: why use pow(x, 2)?

2009-11-02 Thread Gary L. Wade
On 11/02/2009 12:37 PM, Luke the Hiesterman luket...@apple.com wrote: Would it really be that much faster? I don't know exactly how pow() is implemented, but I assume it's basically just a loop of multiplications, in which case it would basically be the same as x*x in this case, since it

Re: Second frontmost app?

2009-04-28 Thread Gary L. Wade
You're starting off with GetCurrentProcess, which returns the process number of your application; have you tried GetFrontProcess, which returns the front process? This will not be your application if you're in the background. On 04/28/2009 9:57 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote:

Re: Interface Builder Plugin Dependency

2009-01-29 Thread Gary L. Wade
Looks like your plug-in is being running as a tool without a connection to the window server. On 01/29/2009 3:54 PM, Bridger Maxwell bridgey...@gmail.com wrote: It turns out the error is completely different from what I thought it was (isn't it always?). It turns out Xcode was omitting part

Re: Is there any mirroring in the Cocoa UI ?

2009-01-21 Thread Gary L. Wade
Not in the sense you get from the Windows platform whereby setting a flag on the parent window causes everything to automatically jump to the opposite side of the window and lay itself out right-to-left. Such alignment requires a different layout (NIB/code/etc.), although with controls like check

Re: [NOOB] Finding Information (was: real noob question)

2009-01-19 Thread Gary L. Wade
On 01/19/2009 11:57 AM, Brian Slick briansl...@mac.com wrote: I'm not sure this is a documentation failure as much as a language failure, at least in this case. Why isn't there an initWithInt: or initWithFloat: like in some other cases? THAT would have resulted in the documentation page

Re: NSSpellChecker (foundation) broken for custom NSSpellServer servers

2009-01-16 Thread Gary L. Wade
Then the best thing for you and anyone else experiencing the problem to do is to write a bug and reference Adam's bug(s). I'm not privy to such prioritizations, but Apple does take greater stock in bugs when they are reported by more than one person. Now, I don't think they'd respond faster if

Re: NSSpellChecker (foundation) broken for custom NSSpellServer servers

2009-01-15 Thread Gary L. Wade
First off, I tried to read the linked web page, but it appears your style sheet is causing the left margin to be displayed a couple of words or so to the left of the visible browser window on Safari and Camino, so it's almost impossible to read. Second, you should submit a bug by way of

Re: Report writer for Cocoa?

2009-01-15 Thread Gary L. Wade
In defense of the original poster, I understood perfectly what he was asking, and the responses he received showed others did, too. Pretty much everyone who has heard of FileMaker and Microsoft Office, two extremely well-known products each available on the Macintosh for well over a decade, as

Re: Disabled button looks like enabled

2009-01-12 Thread Gary L. Wade
Anyone who has been developing Apple/Mac software for more than a few years can attest that Apple occasionally changes the way that some UI elements look, in some ways very subtle and in other ways major, and relying upon a current side-effect of one UI element to look like another element can

Two-fingered rotate gesture

2008-12-17 Thread Gary L. Wade
Here's a suggestion that I just thought about that I'd like to pass on to everyone for their apps. I don't have much time to research it or try it out for myself (I'm bogged down with too much legacy fun right now), and since we have quite a few people on the list, maybe a good number might take

Re: Searchable persistent file reference

2008-12-10 Thread Gary L. Wade
An alias stores quite a bit of information in it to allow you to find a file object (files, folder, disks) if it moves or is renamed or if any of the elements of its path is renamed, and can usually work with varied file systems. I am not familiar with BSAlias or NDAlias, but if they provide a

Re: BOOL value in Dictionary

2008-11-21 Thread Gary L. Wade
Another interesting thing I've seen with some compilers is when a bit flag is defined with a signed type: short someflag : 1; a value of it being set may be -1 rather than 1, so the only way to compare it according to how you want it to work is by comparing it against 0 in some way: if

Re: BAD_EXC_ACESS

2008-11-20 Thread Gary L. Wade
Maybe the problem is that your last name is French; try launching it in English rather than in Greek. ;-p Okay, seriously, maybe you should start by looking at the code in your NSTableDataSource protocol methods for an infinite loop. On 11/20/2008 2:28 PM, Richard S. French [EMAIL PROTECTED]

Re: Process Priority

2008-11-11 Thread Gary L. Wade
A priority of 0 is the default unless a process was launched by a process that had a different priority, and then it would have that priority as well. I'm afraid I don't follow what you're doing and what values you're seeing, based on your use of that and my app. You can use the Unix command ps

RE: Process Priority

2008-11-08 Thread Gary L. Wade
The function you want is getpriority, but there are limits to what you can do on changing a process's priority; if I recall, you can lower it (going from 0 to 1 or 20), but you can't raise it (going from 0 to -20) without admin/sudo privileges. My quick-and-dirty app (it's really only

RE: Porting from Windows to Mac

2008-10-30 Thread Gary L. Wade
Check out this article on Apple's web site: http://developer.apple.com/documentation/Porting/Conceptual/win32porting/win32porting.html Essentially, CodeWarrior, for Mac development, should not be considered for new development (I have to use it for a legacy product, and there's lots of

Re: BonjourSample from Hillegass (Advanced Mac OS X Programming)

2008-10-23 Thread Gary L. Wade
Use IPPROTO_TCP instead, which is in the Unix headers. Hello again, my first answer was too quick... If I put the 0x06 (I found it in the header file for INET_TCP) in the code, it works. But how can I include the header? I do not get it to work for a more cleaner approch... I tried

RE: NSInputStream Not Reading All Data

2008-10-23 Thread Gary L. Wade
I use different APIs, but I just read until I get a 0 or -1 back for the length. Hi All. I have an NSInputStream that I've set up on the run loop to read data from a socket. It's mostly working except that when I am sending it a large amount of data (say 30k), the last chunk of data never

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Gary L. Wade
To move beyond the memory leaks in an untouched version of EchoClient, the only thing you need to do is remove the retain calls in openStreams. The call to -[NSNetService getInputStream:outputStream:] calls CFStreamCreatePairWithSocketToNetService, which is a create function. To verify this,

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Gary L. Wade
Then the bug is somewhere in your changes. The only thing you should do is remove the retain calls. If you also remove the release calls, you will still have the memory leaks. Here's what openStreams should look like: - (void)openStreams { [inputStream setDelegate:self];

Re: inconsistent float behaviour

2008-10-10 Thread Gary L. Wade
I've not used it myself, but there is also NSDecimal that may be an alternative. Also, I recall seeing an IBM-released class that I believe had been part of ICU that also did decimal arithmetic using 32 or 64 bits. On Oct 10, 2008, at 5:04 AM, Steven Hamilton wrote: Am I totally

RE: How do I identify Myself within AddressBook Progammatically?

2008-09-11 Thread Gary L. Wade
In Mac OS X, if I had an object of type ABAddressBook, I would use the message me. If I didn't like me, I might try setMe:. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

RE: Convert unicode string into ascii

2008-08-29 Thread Gary L. Wade
Maybe I'm missing something from your example, previous postings, and my ISP's web mail client, but it appears your desired output doesn't seem to match in character count to your original text. Nevertheless, if all you want is to turn low-ASCII (values less than 0x20) and high-ASCII (values

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Gary L. Wade
, Gary L. Wade wrote: Off the top of my head, with a number of files being opened so high and relatively close to the value you get from getrlimit with a parameter of RLIMIT_NOFILE, I'd suggest checking to see if that's the problem. -- Zino

Re: Sharing NSViews

2008-08-08 Thread Gary L. Wade
Each view has knowledge of only one superview and window. If you're wanting to coordinate the two views, you'd need to wire up a controller or use notifications to keep them in sync. c. mendoza wrote: Hey All, Is it possible to share an NSView across two different panels or windows? I

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-06 Thread Gary L. Wade
Off the top of my head, with a number of files being opened so high and relatively close to the value you get from getrlimit with a parameter of RLIMIT_NOFILE, I'd suggest checking to see if that's the problem. Hi Nicolas, David, I'm having the exact same problem. Loading collections of small

Re: GetDblTime, 64-bit, and cocoa

2008-08-05 Thread Gary L. Wade
Well, the global domain has this key: com.apple.mouse.doubleClickThreshold On 7/22/08 11:48 AM, [EMAIL PROTECTED] said: i need to set a timer when i get a first mouse click and perform something if i don't get another click within the double click time. i found this old thread (from 2003)

Re: getting the clicked-in view

2008-07-29 Thread Gary L. Wade
How do you know you got a click in a view? In other words, at what stage are you in your application that you believe you got a click in a view? Okay, I found a way around the problem... But it might still be handy to know how to do this, at some point... On 29-Jul-08, at 12:56 PM, James

RE: Image name for drag and drop from Safari

2008-07-18 Thread Gary L. Wade
Launch the Clipboard Viewer, which is in: /Developer/Applications/Utilities/Built\ Examples/ and drop your images onto it, and then select the Drag Clipboard, possibly clicking Reload to inspect the values you can get. Hi, In my application, i allow users to drag and drop images from

Re: Authentication only for non admin login.

2008-07-18 Thread Gary L. Wade
If you have already gotten an AuthorizationRef that's been authenticated, you can copy info from it that holds the Username (see the related documentation for those keywords). If you want the Unix username, start with getuid and work from there. hi, I think I have precisely mentioned what I

Re: Authentication only for non admin login.

2008-07-18 Thread Gary L. Wade
Sorry, I didn't read your original post too carefully; it looks like you haven't even gotten to that point of authenticating. Check for examples using SFAuthorizationView; it creates the OS-standard lock/unlock icon and label and can prompt the user in the way you want. If you still need the

RE: Move window to second display

2008-07-16 Thread Gary L. Wade
Try breaking out the call path to examine each succeeding value when assigning a value to display. One thing that jumps out at me: are you running this in 64-bit mode? The size of an int in 64-bit mode is 32 bits but a CGDirectDisplayID may have 64 significant bits as it's technically a

Re: Memory Allocation

2008-07-16 Thread Gary L. Wade
You mentioned you launched your application with ObjectAlloc; launch it instead with MallocDebug and do your testings with the Leaks option to check for memory leaks. It will show you an execution path so you can determine where the allocation originated that is leaking. On Wed, Jul 16, 2008

[OT] XML GUI editor [was Re: Blue lines]

2008-07-15 Thread Gary L. Wade
On 15-Jul-08, at 5:36 PM, Scott Anguish wrote: Please, please an XML GUI editor. :-) Then the HTML version can be done via an XML schema, and users needing an XML editor will be all good. Hmmm...veering off-topic and divergent from the original question, but how would you personally expect

Re: garbage collection and NSConnection

2008-07-12 Thread Gary L. Wade
Marcel Weiher wrote: uint16_t _rc; Oh, the horror of it all! Only 65,535 objects can retain a string!!! What am I to do when I model all the citizens of the US voting for just one presidential candidate in November, and the retain count overflows?!?! Okay, that's not a real concern

Re: triangulating webcams

2008-07-12 Thread Gary L. Wade
Sounds intriguing; at first thought, you may want to consider Xgrid to provide such collaboration, although it may not be what you're needing; there's other means to provide collaborative networking between Macs. If you want feedback on an experimental GUI, try the mac-gui-dev list on Yahoo

Re: garbage collection and NSConnection

2008-07-12 Thread Gary L. Wade
It looks like it was expanded in 10.5, then, but 10.4 and prior use the 16-bit variables. Regardless of whether it handles overflows or not, my little joke was meant to illustrate that too many developers (generally speaking) think that resources (generally speaking) are unlimited and put no

RE: CFBundleIdentifier Application Version

2008-07-11 Thread Gary L. Wade
It's really up to you and the kinds of changes that you expect to happen between each version. Having a single ID allows preferences to be mixed and matched if different versions of the product are used, but if you want to support the simultaneous use of last year's version and this year's

Re: string to float

2008-07-04 Thread Gary L. Wade
If you've already parsed the text, just use NSNumber's class method +numberWithDouble (or whichever other method is appropriate for your needs). If you don't want to use your own parser, you can use NSScanner on your text, but make sure you've set the locale to correctly interpret the comma.

Re: Style Question (Robert Claeson)

2008-07-04 Thread Gary L. Wade
Scott Ribe wrote: Anyways, it really is a personal preference. All arguments I've ever seen that try to claim one style or the other is more correct or safer, are B.S. (Including the one referenced--the bounds of a block were *ALWAYS* absolutely vitally important, well before objects

RE: Newbie question: error in creating a NSData object using handle(Resource Management)

2008-06-25 Thread Gary L. Wade
1. Have you set the resource file you're iterating over as the current resource file (UseResFile)? Make sure you save off the current resource file (CurResFile) before you do that so you can reset it once you close it. The Resource Manager is not good at keeping track of state in the way you

Re: newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-30 Thread Gary L. Wade
If you did that with the version of your NIB that was showing the extra menu item when running your application that you did not see in the Interface Builder edit mode, then things are really weird, unless, of course, you have some code that added that menu item, but that's not something one

Re: NSTextView and changing the selected text's color

2008-05-30 Thread Gary L. Wade
As for the color choices to use when drawing selected color text, what I've found most readable to my users is to continue using the selection color as chosen by the user but to draw the text shadowed as the Finder does it, with the text being white and the shadow color being the color of the

Re: File's Owner

2008-05-27 Thread Gary L. Wade
Alex Kac wrote: I liked Nib's Owner. It keeps with the owner tag, but makes it more clear. True, but the use of NIB vs. File may be a historical set-in-stone thing that never changed since the NIB is the File (conceptually, of course, since a NIB is a directory with three files), and

Re: Faster way to test pixels?

2008-05-25 Thread Gary L. Wade
I've not explored Velocity Engine programming under the PowerPC or its equivalent under the Intel processor family, but your needs seem like they might be solved by using that as a solution to further improve the performance. Graham Cox wrote: On 25 May 2008, at 5:13 pm, Jens Alfke wrote:

Re: Localization and plural rules revisited

2008-05-20 Thread Gary L. Wade
On May 20, 2008, at 12:08 PM, Peter Edberg wrote: CLDR (Common Locale Data Repository) has some draft data on plural forms for various languages. See http://unicode.org/cldr/data/charts/supplemental/language_plural_rules.html for specific rules and

RE: Safari-like padlock button in window title bar

2008-05-20 Thread Gary L. Wade
I'm planning on doing something like this myself with one of my projects, and the way I plan on trying it out is by using: -(NSButton *)standardWindowButton:(NSWindowButton)b; for each NSWindowButton of the NSWindow, find a reasonable visual gap to the left/right of one of the buttons, and

Re: The challenge for Cocoa's on-line documentation

2008-05-17 Thread Gary L. Wade
Johnny Lundy wrote: Try looking at the documentation for NSDatePicker if you want to see how NOT to write documentation. Uh, are you talking about THIS web page? http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSDatePicker_Class/Reference/Reference.html I

Re: How to convert UInt8 array to NSString

2008-05-07 Thread Gary L. Wade
If you're interested in determining the best encoding match for text, look at the TextEncodingConverter.h header, which has functions related to encoding sniffing. There may be more modern techniques available, but I had used that almost a decade ago in a formerly major web browser. It's not

Re: How to convert UInt8 array to NSString

2008-05-07 Thread Gary L. Wade
stringWithContentsOfFile:usedEncoding:error:] ;-) «Discussion This method attempts to determine the encoding of the file at path.» Le 7 mai 08 à 19:33, Gary L. Wade a écrit : If you're interested in determining the best encoding match for text, look at the TextEncodingConverter.h header, which has functions related

Re: horizontal sizeToFit of NSTextView or NSTextField

2008-04-20 Thread Gary L. Wade
If you wish to vary both the width and height to be a more pleasing set of dimensions, similar to what an alert does, try word wrapping your text into a golden ratio rectangle using the area measurement generated by your single-line text measurement. Of course, based on a strict interpretation

Re: Core Data and the Document Dirty indicator

2008-04-12 Thread Gary L. Wade
Exactly what I needed! Thank you, that has fixed my problem. I wish the Conceptual documents could be made available in a book :) Jonathan I've requested that Apple provide a print-on-demand link with each document on their web site. The way I suggested it was to have a shopping cart icon

RE: DataSource for NSTableView with ButtonCell

2008-04-02 Thread Gary L. Wade
Try having your NSTableView delegate's method return an NSNumber; that's what I did for the NSSliderCell column in my NSTableView. Hello List, i've created a NSTableview with Interface Builder. In one of my Collums is a NSButton. I've no idea how to set up the DataSource for this. Can anyone

Re: Best Way To Lookup From a Huge Table

2008-03-21 Thread Gary L. Wade
I haven't been following this thread too closely, but after all this talk, I was wondering if the interested parties have tried using NSDictionary's dictionaryWithContentsOfFile or its related methods. The file it takes is a property list that can be created/edited in textual form or by using

RE: What is the status on the New Cocoa 2.0 Books?

2008-03-12 Thread Gary L. Wade
I know hillegass is doing one but has anyone a date on it ? And might there be others ? Barnes and Noble shows a publication of June 13, 2008, and Amazon.com shows a publication of May 26, 2008: http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=9780321503619

Re: CIImage (TIFFRepresentation) memory leak

2008-03-10 Thread Gary L. Wade
If all the code you're using is present, it looks to me like you're not releasing the object pointed at by image; the object returned by imageWithData is not an auto-released object. I narrowed this down by removing the filters, and the leak is still there. And what a leak! Everytime I draw the

Re: GetMonitorFromWindow

2008-03-07 Thread Gary L. Wade
Also, there are certain other presentation-based applications where this kind of functionality is desired. For example, when you want to go fullscreen with any kind of media, be it from iPhoto, PowerPoint, Keynote, etc., you may indeed wish the presentation window to situate itself fully on a

RE: large documents with doc based app

2008-03-05 Thread Gary L. Wade
Try overriding readFromFile:ofType: and other similar messages for unique file needs. Hey guys, Using the document based skeleton there is the method - (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType or - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:

<    1   2   3   4