Re: NSPopupButtons work, but not in hierarchical mode, what am I missing here ?

2010-05-07 Thread Gary L. Wade
Try a different UI approach. One thing to consider is using an NSBrowser if you have lots of upper-level options and a good number of sub items and want a cascading list where the leaf item is just a choice rather than a command. If you want commands but have a small number of upper-level options

Re: menu madness with retain count

2010-04-27 Thread Gary L. Wade
On 04/27/2010 2:46 PM, "Shawn Erickson" 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: menu madness with retain count

2010-04-27 Thread Gary L. Wade
On 04/27/2010 2:27 PM, "Shawn Erickson" wrote: > On Tue, Apr 27, 2010 at 2:22 PM, Gary L. Wade > 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:12 PM, "Bill Bumgarner" wrote: > > On Apr 27, 2010, at 2:09 PM, Gary L. Wade wrote: > >> On 04/27/2010 1:58 PM, "Bill Bumgarner" wrote: >> >>> Frankly, the -retainCount method should be deprecated and, eventually, >>&

Re: menu madness with retain count

2010-04-27 Thread Gary L. Wade
On 04/27/2010 1:58 PM, "Bill Bumgarner" wrote: > Frankly, the -retainCount method should be deprecated and, eventually, > removed. I wouldn't go THAT far; after all, when you're tracking a memory leak, checking your influence on the retain count is important to your investigation. Hopefully tha

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 differ

Re: Determining preferred localizations

2010-04-21 Thread Gary L. Wade
"nb_NO" "nb" "fr_FR" "fr" "pt_BR" "pt_PT" "pt" "zh_CN" "es_ES" "es" "ja_JP" "ja" "ru_RU" "ru" "sv_

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. T

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

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 "F

Re: extracting the mantissa for a NSDecimal

2009-11-20 Thread Gary L. Wade
On 11/20/2009 10:49 AM, "Jens Alfke" 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 be/will be/

Re: Where are the interface builder components?

2009-11-19 Thread Gary L. Wade
On 11/19/2009 5:45 PM, "Sandro Noël" 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 there > with the release

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/exce

Re: why use pow(x, 2)?

2009-11-02 Thread Gary L. Wade
On 11/02/2009 12:37 PM, "Luke the Hiesterman" 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 would exit after

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" wrote: > Don't bother with

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" 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 of the output from

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" 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 leading to the c

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 th

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 wel

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 bugreporte

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 caus

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 goo

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

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 effective

RE: Porting from Windows to Mac

2008-10-30 Thread Gary L. Wade
Check out this article on Apple's web site: 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 featur

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 neve

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

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]; [outputStream

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

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 lis

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 gr

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 tried

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Gary L. Wade
In that case, it sounds like the Image Source code is leaving the file open, which makes some sense for local files, although it's not explicitly documented anywhere that I've noticed; if I recall correctly, this also happens with the similarly-named QuickTime-based APIs. To continue using CGI

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Gary L. Wade
f the lib explicitely indicates that it's a -11 error, maybe there's >a simple explanation? > >On 06 Aug 2008, at 23:36, Gary L. Wade wrote: > >> Off the top of my head, with a number of files being opened so high >> and relatively close to t

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 smal

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

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

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 w

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 Safa

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

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 point

RE: NSButton alternate image problem - not redrawing

2008-07-16 Thread Gary L. Wade
If I'm reading you right (the action of a button click causes that same button to get a new alternate image), I would say that you should set the alternate image before the user clicks on the button. Once a button is toggled, the current alternate image (or image, depending on state) is drawn.

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

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 t

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 wit

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 fo

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 vers

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 & destructor

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: How to converting a Carbon nib to Cocoa?

2008-07-03 Thread Gary L. Wade
Apparently you haven't perused the XML used by Carbon NIBs. There's lots of linkages across the format so that any particular object is not as completely self-contained as you believe. > >On 3 jul 2008, at 14.54, Kyle Sluder wrote: > >> On Thu, Jul 3, 2008 at 8:27 AM, Tommy Nordgren <[EMAIL PRO

RE: Auto pop-up list from State field in Address book database

2008-06-25 Thread Gary L. Wade
I don't think NSPopUpButton will accept key events if the menu is not active, although once the menu is active, it will accept key events, but you could probably embed your NSPopUpButton control in a custom control that does take key events and then filter those into choosing an item in the menu

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 m

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 t

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 do

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

2008-05-29 Thread Gary L. Wade
Interface Builder can be buggy at times, leaving some "leftovers" around when they should be gotten rid of. I've got a couple of leftovers myself, but they're harmless so far; one of these days, I'll just go all down-and-dirty editing on it, but I don't have the time right now. If you've stil

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 ever

Re: running an external app

2008-05-27 Thread Gary L. Wade
When starting out, it can be difficult getting used to the different style of function declarations and calls used in Objective-C, but as so many others have said, that's a basic requirement when learning a framework like Cocoa. Anyone familiar with some C++-based object-oriented UI frameworks

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

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: 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 >> >> > for specific rules >> and >>

Re: Cocoa et al as HCI usability problem

2008-05-18 Thread Gary L. Wade
Just to add some insight, when reading the Cocoa documentation, it's very helpful when a developer also has some degree of exposure to Interface Builder. Take heart, though, as Interface Builder is just a click away. Once you have an idea how things somewhat work within Interface Builder 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 haven

Re: expose - the algorithm

2008-05-08 Thread Gary L. Wade
Google TreeMap and look at the links for space-constrained visualization of hierarchies as a method of doing something similar to what Expose does. > Hi All, > > I have a task to move windows around and fit them into a defined space, > almost > exactly like Expose. I.e. the space to fit all th

Re: How to convert UInt8 array to NSString

2008-05-08 Thread Gary L. Wade
Sorry, I misread your suggested method, but, as Adam points out, it still isn't adequate for someone who has free-styled 8-bit text with no idea what the original encoding was. > >On Wednesday, May 07, 2008, at 12:37PM, "Jean-Daniel Dupas" ><[EMAIL PROTECTED]> wrote: >>What make you think this

Re: How to convert UInt8 array to NSString

2008-05-07 Thread Gary L. Wade
ing like this + >[NSString 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, lo

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 p

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 ic

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 an

Re: Getting Localized System Strings

2008-04-01 Thread Gary L. Wade
> >Thanks a lot. I decided to use it like this: >NSBundle *appBundle = [ NSBundle bundleWithIdentifier: >@"com.apple.AppKit" ]; >NSString *localSetFont = [ appBundle localizedStringForKey: @"Set >Font" value: nil table: @"Undo"]; >Seems to work fine. > That's really not a good thing to do unle

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 P

Re: Network communication with NSFileHandle & NSSocketPort

2008-03-19 Thread Gary L. Wade
Well, this code works for me whether I have an IP address or domain name in the string: addr.sin_addr.s_addr = inet_addr (theCStringInternetAddress); if (INADDR_NONE == addr.sin_addr.s_addr) { struct hostent*theHostInfo; theHostInfo = gethostbyname (theCStringInte

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:

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 th

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 p

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

Re: Clearing an NSTextView

2008-02-24 Thread Gary L. Wade
[textView setString:@"Lyrics Code Here"]; Jeremy wrote: Hey, I have a small iTunes application and I am adding supporting the display of lyrics. Now I have it set up just like I want it to, and it looks amazing. Now the only problem is this: When I use [NSTextView insertText:@"Lyrics Code H

<    1   2   3   4