Re: finder eject images

2011-07-05 Thread Sherm Pendley
On Tue, Jul 5, 2011 at 6:53 AM, Ulf Dunkel wrote: > Hi Lee Ann. > >> Also I think Apple frowns on copying their icons into your apps. Only the >> ones you can get through imageNamed: or iconForFileType: are fair game. > > Wasn't it Steve Jobs who invited us to pick all their nice icons, somewhen >

Re: Re-using the same NIB on two owners

2011-06-26 Thread Sherm Pendley
On Sun, Jun 26, 2011 at 11:16 AM, Daniel Luis dos Santos wrote: > > My problem is that I need to load the same NIB from two different classes, so > the owner is different according to which class I load it from. > Is there another way to do it without the file's owner ? Subclassing the > control

Re: ObjC stdin equivalent? and other questions

2011-06-10 Thread Sherm Pendley
On Fri, Jun 10, 2011 at 10:56 PM, William Squires wrote: > Hi! > 1st question: >  In regular C, you have the functions for reading/writing to stdio; > printf(), scanf(), etc... >  In C++, you have cin/cout and the overridden '>>' and '<<' operators. >  What does ObjC have (besides NSLog() anyway

Re: tools for writing help books

2011-06-08 Thread Sherm Pendley
On Wed, Jun 8, 2011 at 3:33 AM, Michael Thon wrote: > What tools to y'all recommend for writing content for the help viewer on Mac > OS? Do you write them directly in html/xhtml? I just use BBEdit and write the markup by hand - HTML ain't exactly rocket surgery to begin with, and every tool I've

Re: What is the point of a host-reachability test that doesn't test the reachability of the host?

2011-06-02 Thread Sherm Pendley
On Thu, Jun 2, 2011 at 11:16 AM, Kyle Sluder wrote: > > Why does everyone insist on using roundabout ways to detect if maybe a host > will accept connections on a completely unrelated port ... when it may not even accept *those* on the next attempt. Can you say "race condition?" I knew you could

Re: Using WebKit for UI instead of Cocoa in cross-platform app

2011-05-23 Thread Sherm Pendley
On Mon, May 23, 2011 at 9:52 AM, John Joyce wrote: > > Apps that try to be somehow universal without trying to behave naturally on a > given OS usually suffer for it. Even Microsoft had to learn that lesson the hard way - google for "Word 6 fiasco." sherm-- -- Cocoa programming in Perl: http:

Re: I'm given a project.pbxproj file....

2011-05-18 Thread Sherm Pendley
Have you tried simply checking out the source tree directly from Subversion? Google Code usually allows anonymous check outs. sherm-- On Wed, May 18, 2011 at 5:45 PM, R4EE wrote: > Howard, > > That was my original approach but the .xcodeproj file wants to save as > html.  I then, wrongly, extrac

Re: Test for TCP port

2011-04-08 Thread Sherm Pendley
On Fri, Apr 8, 2011 at 6:26 PM, Heizer, Charles wrote: > > What is the best way to test to see if a TCP port is reachable and will > answer connections? I was trying to use NSSocketPort and NSConnection but I'm > not getting a valid connection. > > NSSocketPort *sendPort = [[NSSocketPort alloc]

Re: Compiling screensaver for 10.5

2011-04-08 Thread Sherm Pendley
On Fri, Apr 8, 2011 at 2:48 PM, Nick Zitzmann wrote: > > > ppc. The linker may change this to ppc7400 under certain circumstances. This > is normal, and only means that your screen saver will not load on G3 Macs. This has to do with the deployment target, right? That is, it will be changed to pp

Re: Framework Installation Directory

2011-04-08 Thread Sherm Pendley
gt; On Fri, Apr 8, 2011 at 9:57 AM, Mr. Gecko wrote: >>> So basically once I've compiled the daemon, have it run a post script that >>> will change the path to go back 4 directories instead of 1 if I was to >>> place it in Contents/Daemon/Daemon.app/Contents/MacOS/

Re: Framework Installation Directory

2011-04-08 Thread Sherm Pendley
instead of 1 if I was to place > it in Contents/Daemon/Daemon.app/Contents/MacOS/Daemon? > > Thanks for the response, > Mr. Gecko > > On Apr 8, 2011, at 8:48 AM, Sherm Pendley wrote: > >> The details will vary according to how you've structured your bundles, >>

Re: Framework Installation Directory

2011-04-08 Thread Sherm Pendley
On Fri, Apr 8, 2011 at 8:53 AM, Mr. Gecko wrote: > I need help with the Installation Directory for a framework that will be > shared between a application and 2 daemons within side it. I think I may be > able to do it if I were to have the 2 daemons executables in the MacOS path > or another fo

Re: special characters are destroyed when copying a string character by character

2011-04-05 Thread Sherm Pendley
On Tue, Apr 5, 2011 at 11:55 AM, Horst Jäger wrote: > >                [dst appendFormat:@"%c", chr]; %c is the format specifier for 8-bit chars - use %C for 16-bit unichars. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net ___

Re: Book for expert programmer about cocoa and Objective-C

2011-04-02 Thread Sherm Pendley
On Fri, Apr 1, 2011 at 3:40 PM, Rodrigo Zanatta Silva wrote: > Hi. I need to have a good book in my side to program with Objective-C using > the cocoa. I read the beginner books like "... for absolute beginner", > "starting to program with...". > > But now, I need a book for professional. Book tha

Re: Simulate touch event with cordinate?

2011-04-02 Thread Sherm Pendley
On Sat, Apr 2, 2011 at 7:29 AM, Jesse Armand wrote: > > But, my word of advice: > People don't read PDFs with the gestures of their face or head. It's just > silly. Tell that to Stephen Hawking. There are cases where what seems "silly" to most of us are the only options one has left. sherm-- -

Re: Can't keep untitled windows from opening!

2011-03-31 Thread Sherm Pendley
On Thu, Mar 31, 2011 at 12:49 PM, Carlos Eduardo Mello wrote: > Isn't the document subclass the app's delegate by default in the document > architecture? No, it isn't. The document's job is to handle per-document responsibilities; the app delegate's job is to handle tasks that are relevant for th

Re: doesNotRecognizeSelector exception

2011-03-26 Thread Sherm Pendley
On Sat, Mar 26, 2011 at 10:21 PM, Jeffrey Walton wrote: > > 2011-03-26 22:12:50.029 CryptoSandbox[123:707] -[UIView > userSelectedFile:fileSystemObject:suppliedContext:]: unrecognized > selector sent to instance 0x1dbd00 The delegate message is being sent to an instance of UIView - not to your co

Re: doesNotRecognizeSelector exception

2011-03-26 Thread Sherm Pendley
On Sat, Mar 26, 2011 at 9:39 PM, Jeffrey Walton wrote: > > I have a protocol and declarations as follows. respondsToSeletor > returns NO. If I ignore respondsToSeletor (and send the message), I > get an expeption. > > // FilePicker.m - try both > BOOL responds = [delegate respondsToSelector:@selec

Re: Mutable and immutable class cluster implementation / "method swizzling" question

2011-03-25 Thread Sherm Pendley
On Fri, Mar 25, 2011 at 1:30 AM, Louis Gerbarg wrote: > The corner case you mention below ( [myMutableArrayInstance > isKindOfClass:[NSMutableArray class]] ) is a nonissue for a somewhat > surprising reason. All instances of NSArray are actually implemented via the > concrete class NSCFArray, w

Re: Problem opening file

2011-02-22 Thread Sherm Pendley
On Tue, Feb 22, 2011 at 10:47 AM, Carlos Eduardo Mello wrote: > > I have a configuration file which is used by an internal library in my app's > data model engine. The engine was written in c++ and needs this file for > loading the app's documents correctly. Theis file never changes and > shouldn'

Re: NSDocument Problems

2011-02-21 Thread Sherm Pendley
On Mon, Feb 21, 2011 at 2:12 PM, Bruce Cresanta wrote: > Hello Volker, > > I have the following two methods implemented in AnalyzerDocument, but I still > get greyed menu items. > > - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError > > - (BOOL)readFromData:(NSData *)data ofTy

Re: Two Newbie Questions

2011-02-16 Thread Sherm Pendley
On Wed, Feb 16, 2011 at 5:56 PM, Bruce Cresanta wrote: > > I have an NSTableView set up to a datasource of a single array.   When I run > my code, I get two columns (the default in IB) instead of just one with the > data duplicated in each column.    I only want one column, how best to > achiev

Re: NSDocument without Save

2011-02-08 Thread Sherm Pendley
On Tue, Feb 8, 2011 at 9:29 PM, Graham Cox wrote: > I'm trying to prevent NSDocument from doing any saving at all, for a demo > version of my app. I need to suppress the menu commands (done) and all the > automated UI such as the 'save changes' dialog and 'Save As' dialog even > though the doc

Re: NSDocument Question

2011-02-07 Thread Sherm Pendley
On Mon, Feb 7, 2011 at 2:54 PM, Bruce Cresanta wrote: > Ii have two subclasses of NSDocument. One of the subclasses only ever needs > one instance window. How do I query NSWindowController for the open window, > and if that fails, create it. Sorry for the confusion. Override -makeWindowCo

Re: Main menu in NSDocument based application

2011-01-31 Thread Sherm Pendley
On Mon, Jan 31, 2011 at 5:25 PM, Bruce Cresanta wrote: > >        I've been scouring through the docs trying to figure out how to get a > reference to the main menu in an NSDocument based app.    I need to make > programmatic changes to the menu depending on which NSDocument is key.   > Would y

Re: Using NSWindow without NIB (XIB) file ?

2011-01-25 Thread Sherm Pendley
On Tue, Jan 25, 2011 at 5:48 AM, David Remacle wrote: > > Is it possible to use NSWindow without NIB file ? Yes. Interface Builder uses documented, public methods to create interface elements before serializing them to a NIB file. You can use the same methods in your app. Honestly though, I would

Re: printing a different representation than what is on the screen

2011-01-20 Thread Sherm Pendley
On Thu, Jan 20, 2011 at 9:24 AM, Dave Reed wrote: > I'm working on a document-based application that has a couple tabs. Most of > the tabs contain NSTableViews, NSTextFields, etc. > > I want to provide a way for the user to print the data contained in them > (just text, possibly with some grid l

Re: Setting a discontinuous selection in NSMatrix

2011-01-18 Thread Sherm Pendley
On Tue, Jan 18, 2011 at 9:45 PM, James Bucanek wrote: > > I have an NSMatrix view that's driving me nuts. It's mode is set to > NSListModeMatrix, which allows the user to click, shift+click, > command+click, and drag to create arbitrary selections of cells. > > I can get the set of selected cells

Re: Gestures

2011-01-17 Thread Sherm Pendley
On Mon, Jan 17, 2011 at 11:53 AM, koko wrote: > My shipping app is developed with 10.6.6 SDK. > > Some MacBook customers have asked for gesture support. > > Can I do this?  I have had no luck finding a reference. Yes - the MacBook's screen isn't touch-sensitive, but its trackpad can generate a va

Re: NSSegmentedControl Label

2011-01-14 Thread Sherm Pendley
On Fri, Jan 14, 2011 at 6:35 PM, Kyle Sluder wrote: > > Images-and-text on segmented cells can look atrocious. It can look > like Windows. It can look like someone feels like disrespecting > platform conventions. But sometimes violating the HIG is precisely the > right thing to do. That's why they

Re: Right way to change default app launch behavior?

2011-01-11 Thread Sherm Pendley
On Tue, Jan 11, 2011 at 10:21 PM, Rick Mann wrote: > I have a document-based app. I want to modify the behavior when it launches: > instead of opening a new, untitled document, I want it to first check some > stuff, then generally re-open the last-opened document. > > After reading through the v

Re: LOCATING MEDIA FILES IN MACINTOSH

2011-01-06 Thread Sherm Pendley
On Thu, Jan 6, 2011 at 3:54 PM, Abhinav Tyagi wrote: > > Problem: Scanning the disc for media files. As the media files can be > present anywhere > in the disc, searching whole disc by enumerating the directory listings will > be very tedious > i guess (like combining ls and grep in the terminal).

Re: [Moderator] Re: Mac Apps

2010-12-24 Thread Sherm Pendley
On Fri, Dec 24, 2010 at 9:49 PM, Scott Anguish wrote: > > On Dec 24, 2010, at 1:10 PM, Shawn Bakhtiar wrote: > >> I hope this helps, more than "No soup for you!!!” > > I certainly didn’t mean no soup for you. Godwin! sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net _

Re: Performance: Drawing hundreds of short text strings

2010-12-20 Thread Sherm Pendley
On Mon, Dec 20, 2010 at 11:53 PM, Joar Wingfors wrote: > > On 20 dec 2010, at 01.22, Mark Coniglio wrote: > >> My application needs to draw hundreds of short text strings into an NSView. >> After reviewing the Cocoa documentation on drawing text, I am left unsure as >> to how to do this with the

Re: cannot be sent to an abstract object of class

2010-12-04 Thread Sherm Pendley
On Sat, Dec 4, 2010 at 6:56 PM, Stephen J. Butler wrote: > On Sat, Dec 4, 2010 at 5:17 PM, Shane > wrote: >> @interface >> { >>        NSNumber *rate; >>        // ... >> } >> // ... >> #end >> >> - (id) init >> { >>        // … >>        rate = [[NSNumber alloc] initWithFloat:0.0]; >>        //

Re: Basic HTTP program failed to compile

2010-12-03 Thread Sherm Pendley
On Fri, Dec 3, 2010 at 2:06 AM, ico wrote: > > My program is actually a Mac program rather than iPhone In that case... >> > On Fri, Dec 3, 2010 at 12:49 AM, ico wrote: >> > >> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framewor

Re: Drawers on windows...

2010-11-30 Thread Sherm Pendley
On Tue, Nov 30, 2010 at 4:06 PM, lbland wrote: > > When drawers first came out they were all the rage. Then they went out of > favor by some, so much so I thought they would be depreciated. But, it seems > like drawers are sticking around. But, on the other hand, drawers seem to > come and then

Re: Foundation vs Core Foundation

2010-11-29 Thread Sherm Pendley
On Mon, Nov 29, 2010 at 2:59 PM, Jon Sigman wrote: > > Before I start down the wrong path: What is the difference between a > Foundation > tool and a Core Foundation tool? You mean, the project types when you start a new project in Xcode? A Core Foundation tool links against (you guessed it) Co

Re: Notification of CD-ROM inserted

2010-11-21 Thread Sherm Pendley
On Wed, Nov 17, 2010 at 9:53 AM, Bilel Mhedhbi wrote: > > I want my application to be notified when a CD-ROM is inserted. Watch for NSWorkspaceDidMountNotification notifications. See: < http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Clas

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Sherm Pendley
On Tue, Nov 16, 2010 at 7:28 AM, Sherm Pendley wrote: > On Tue, Nov 16, 2010 at 6:27 AM, Remco Poelstra wrote: > >> Op 16 nov 2010, om 12:18 heeft Mark Wright het volgende geschreven: >> >> > You need to write your protocol declaration in >> AudionetQueueDelegateP

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Sherm Pendley
On Tue, Nov 16, 2010 at 6:27 AM, Remco Poelstra wrote: > Op 16 nov 2010, om 12:18 heeft Mark Wright het volgende geschreven: > > > You need to write your protocol declaration in > AudionetQueueDelegateProtocol.h as: > > > > @protocol AudionetQueueDelegate > > That does not seem to work. > I now

Re: How to remove 'not found in protocol' compiler warning

2010-11-12 Thread Sherm Pendley
On Fri, Nov 12, 2010 at 9:09 AM, Paul Johnson wrote: > I'm getting a compiler warning message at the following line of code: > >NSArray *selectedObjects = [[secondTableView dataSource] > selectedObjects]; > > The warning message is <'selectedObjects' not found in protocol>. > Note that NSTab

Re: image arithmetic

2010-11-10 Thread Sherm Pendley
On Wed, Nov 10, 2010 at 8:35 AM, Amy Gibbs wrote: > >        //calc image width >        float width = 300 / ki; >        NSLog(@"Width: %@",width); Width isn't an object. Use %f to print a float. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net _

Re: Interrupt copyItemAtPath

2010-11-07 Thread Sherm Pendley
On Sun, Nov 7, 2010 at 6:06 PM, gMail.com wrote: > > A quick question more please. > As I have seen on the Apple sample code "FSFileOperation", > I can wait until FSCopyObjectAsync is done, using CFRunLoopRunInMode. > >        while(!gFileCopiedDone && !mUserPressedStop){ >            CFRunLoopRun

Re: Interrupt copyItemAtPath

2010-11-07 Thread Sherm Pendley
On Sun, Nov 7, 2010 at 4:09 PM, gMail.com wrote: > I have checked FSCopyObjectAsync and the copy works well. > I can get my callback function called so I can observe the working progress > as the kFSOperationBytesCompleteKey and kFSOperationTotalBytesKey and get > the kFSOperationStageComplete st

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread Sherm Pendley
On Sun, Nov 7, 2010 at 10:35 AM, eveningnick eveningnick wrote: > >> You seem to be trying to find ways to use the frameworks in ways that are >> not intended. Why are you not using NSApplicationMain in the normal way? >> > Just for the sake of my own understanding. An admirable goal to be sure.

Re: NSDictionary casting

2010-11-05 Thread Sherm Pendley
On Fri, Nov 5, 2010 at 9:36 AM, Dan Hopwood wrote: > > I am using XML-RPC technology to invoke a website back end. I used the > Wordpress project to extract what I needed in order to send off requests and > decode what I get back from the webservice. This works. > > The encoding/decoding methods e

Re: Set Icon For Document-Based Files

2010-11-04 Thread Sherm Pendley
On Thu, Nov 4, 2010 at 2:32 PM, Sherm Pendley wrote: > On Thu, Nov 4, 2010 at 1:39 PM, PJBorges wrote: >> >> Does it matter where you put the key CFBundleTypeIconFile in the >> info.plist file? > > To some extent, yes - the overall structure of the .plist mu

Re: Set Icon For Document-Based Files

2010-11-04 Thread Sherm Pendley
On Thu, Nov 4, 2010 at 1:39 PM, PJBorges wrote: > > Does it matter where you put the key CFBundleTypeIconFile in the > info.plist file? To some extent, yes - the overall structure of the .plist must be right. That is, the CFBundleDocumentTypes key must have an array of dictionaries, and the CFBun

Re: init method ambiguity

2010-11-04 Thread Sherm Pendley
On Thu, Nov 4, 2010 at 12:43 PM, Kyle Sluder wrote: > On Thu, Nov 4, 2010 at 9:17 AM, Sherm Pendley wrote: >> - (id)initForCamera:(id)cam { >>    [self release]; > > I remember there being a bit of contention on this, but Greg Parker's > wisdom seems to be to ca

Re: init method ambiguity

2010-11-04 Thread Sherm Pendley
On Thu, Nov 4, 2010 at 9:12 AM, Jonny Taylor wrote: >>> One workaround is to include explicit casts like I have shown. However this >>> leaves me wondering whether it goes against convention and/or >>> recommendations to have two init methods with the same name but different >>> parameter types

Re: init method ambiguity

2010-11-04 Thread Sherm Pendley
On Thu, Nov 4, 2010 at 8:23 AM, Jonny Taylor wrote: > > This leads me to believe that what I am writing is not actually doing > anything wrong, and the compiler warning is associated with the fact that > [MyClassA alloc] returns a plain id leaving the compiler to do some deducing > about what t

Re: Set Icon For Document-Based Files

2010-11-04 Thread Sherm Pendley
On Thu, Nov 4, 2010 at 4:59 AM, Markus Spoettl wrote: > On Nov 4, 2010, at 9:21 AM, PJBorges wrote: >> I have done that, and yet my application registers no changes. It >> still saves the data with the plain white icon. > > Is it possible that you have multiple copies of the app lying around > (d

Re: Set Icon For Document-Based Files

2010-11-03 Thread Sherm Pendley
On Wed, Nov 3, 2010 at 11:50 AM, PJBorges wrote: > Some things to check: >> >> Second, did you forget to include the extension, or was that >> just a typo in your email? >         I haven't included the extentions, icns, since the > documentation says that it is not necessary. I double-checked th

Re: Set Icon For Document-Based Files

2010-11-03 Thread Sherm Pendley
On Wed, Nov 3, 2010 at 10:17 AM, PJBorges wrote: > > How do I change that standard icon into a custom one? > > I've tried to add this to the Info.plist file, according to apple's > documentation: > > CFBundleTypeIconFile > myCustomIcon Some things to check: First, make sure that your icon is in

Re: Operating with a file /Library/LaunchAgents/my.application.plist from a non-root application

2010-10-31 Thread Sherm Pendley
On Sun, Oct 31, 2010 at 9:31 AM, eveningnick eveningnick wrote: > Hello > How, using an ordinary application (started by "doubleclicking" from > /Applications), i could create/modify/delete that file? > Is it possible at all, according to OS X current security model? Not unless the permissions fo

Re: Adding and removing menu items causes memory usage to grow

2010-10-27 Thread Sherm Pendley
On Wed, Oct 27, 2010 at 12:45 PM, George Nachman wrote: > > I was tracking down memory growth in my application and isolated it to > the repeated adding and removing of menu items. Doing this causes a > growth of about 1MB: > >    for (int i = 0; i < 1000; ++i) { NSAutoreleasePool *myPool

Re: The dreaded "UITableView won't refresh" problem.

2010-10-12 Thread Sherm Pendley
On Tue, Oct 12, 2010 at 4:38 PM, Fritz Anderson wrote: > On 12 Oct 2010, at 2:58 PM, G S wrote: > >> Wow, nobody has seen this problem?  Lovely. > > You expect a mailing list consisting of people reading in their spare time, > and writing out of charity, most of whom have been doing their paying

Re: Google custom search

2010-10-11 Thread Sherm Pendley
On Mon, Oct 11, 2010 at 3:17 PM, Andy Lee wrote: > A while back someone set up a Google custom search that was tailored to find > Cocoa info, and posted it on this list.  As I recall it searched a pretty > good list of sites. I just use the site: feature on Google. For example: "NSApplicat

Re: ivars and fundamental types

2010-10-08 Thread Sherm Pendley
On Fri, Oct 8, 2010 at 9:50 PM, Rick Mann wrote: > Can I not use the objective-C runtime to get and set an objects ivar's if > they are of primitive types like int and float? Of course you can - it would be useless otherwise. Where did you get the idea you can't? sherm-- -- Cocoa programming

Re: Disable NSSavePanel's New Folder button dynamically?

2010-10-05 Thread Sherm Pendley
On Tue, Oct 5, 2010 at 2:17 PM, Kevin Wojniak wrote: > I'm assuming the answer is no, as I've looked over the documentation, but > just incase I missed something: is there a way to prevent NSSavePanel's "New > Folder" button from being enabled on the fly? [thePanel setCanCreateDirectories:NO];

Re: Linked List

2010-09-18 Thread Sherm Pendley
On Sat, Sep 18, 2010 at 7:36 PM, Fritz Anderson wrote: > On 18 Sep 2010, at 6:09 PM, k...@highrolls.net wrote: > >> What is the Cocoa equivalent of a doubly linked list? Should I consider >> NSMutablearray as the analog? > > Yes. > > The Foundation data types are distinguished by what they _are_

Re: Statically link libmysqlclient.a to my Foundation tool

2010-08-20 Thread Sherm Pendley
On Fri, Aug 20, 2010 at 2:03 PM, Heizer, Charles wrote: > Thanks for the quick response. So I just tried this and I'm having the > same issue. > > I changed my "Other linker flags" as suggested and when I try to run this > without the libmysqlclient.dylib in my path it still complains ... What di

Re: Statically link libmysqlclient.a to my Foundation tool

2010-08-20 Thread Sherm Pendley
On Fri, Aug 20, 2010 at 1:26 PM, Heizer, Charles wrote: > > I have been googling for a while now and have tried a few suggestions I > have found in other like posts but have not had much success. > > I'm trying to create a stand alone Foundation tool which will connect to > MySQL and I can get thi

Re: Set the Cursor Position

2010-08-19 Thread Sherm Pendley
On Thu, Aug 19, 2010 at 9:32 PM, Murat Konar wrote: > CGDisplayMoveCursorToPoint(CGDirectDisplayID display, CGPoint point); > > But heed the other's hints that, except for special classes of software > (like a VNC app), software that warps the pointer's location independent of > the mouse is much

Re: Trying to capture XML data and convert to a String...

2010-08-19 Thread Sherm Pendley
On Wed, Aug 18, 2010 at 3:11 PM, R wrote: > I'm new and in the process of learning Objective-C and Cocoa. > > I want to take some raw XML data, isolate, and convert to a string.  I seem > to be able to capture the data I want, but cannot seem to get into a string > format.  Actually, I will want

Re: stringByReplacingCharactersInRange leading to bus error

2010-08-18 Thread Sherm Pendley
On Wed, Aug 18, 2010 at 5:25 PM, Martin Wierschin wrote: > On 2010.08.18, at 2:08 PM, Sherm Pendley wrote: > >> Implementing -stringByReplacing... as "return [[self retain] >> autorelease];" makes the same guarantee, that the object returned by >> -stringByRep

Re: stringByReplacingCharactersInRange leading to bus error

2010-08-18 Thread Sherm Pendley
On Wed, Aug 18, 2010 at 5:23 PM, Kyle Sluder wrote: > On Wed, Aug 18, 2010 at 2:08 PM, Sherm Pendley > wrote: > >> Indeed, on that very page, at >> <http://developer.apple.com/mac/library/documentation/cocoa/conceptual/MemoryMgmt/Articles/mmAccessorMethods.html#//appl

Re: stringByReplacingCharactersInRange leading to bus error

2010-08-18 Thread Sherm Pendley
On Wed, Aug 18, 2010 at 4:22 PM, Kyle Sluder wrote: > On Wed, Aug 18, 2010 at 12:49 PM, Sherm Pendley > wrote: >> The "[foo release]" is perfectly correct, but if >> -stringByReplacingOccurrencesOfString:withString: is implemented with >> a simple "return

Re: stringByReplacingCharactersInRange leading to bus error

2010-08-18 Thread Sherm Pendley
On Wed, Aug 18, 2010 at 3:33 PM, Kyle Sluder wrote: > On Wed, Aug 18, 2010 at 12:16 PM, Sherm Pendley > wrote: >> Possibly, but even in that case it would still have to "return [[self >> retain] autorelease];" in order to fulfill its end of the memory >>

Re: stringByReplacingCharactersInRange leading to bus error

2010-08-18 Thread Sherm Pendley
On Wed, Aug 18, 2010 at 2:52 PM, Murat Konar wrote: > > On Aug 18, 2010, at 11:06 AM, John C. Randolph wrote: > >> -stringByReplacingCharactersInString: creates and returns a new string, >> which is autoreleased. > > Always? Yes, always. > I recall running into a problem that was caused by > -st

Re: Wow! Just installed OPENSTEP ENTERPRISE 4.2

2010-08-06 Thread Sherm Pendley
On Fri, Aug 6, 2010 at 6:21 PM, Todd Heberlein wrote: > > It took a lot longer to bring out Mac OS X than I expected after the > acquisition. We never got our "yellow box" for windows (with the promised > free runtime libraries). Have you seen Cocotron? Not from A

Re: Calling Matlab from Cocoa

2010-07-30 Thread Sherm Pendley
On Fri, Jul 30, 2010 at 1:00 PM, Chris Goedde wrote: > > Anyone here have any experience calling Matlab from a Cocoa program? > > I have a rather complex calculation that I've implemented in Matlab that I > would like to call from a Cocoa program. (I could re-implement it in > Objective C if abs

Re: Screen pixels changed notification?

2010-07-26 Thread Sherm Pendley
On Mon, Jul 26, 2010 at 8:37 PM, Ryan Joseph wrote: > > Are there any notifications I could get that would tell me if screen pixels > changed I don't know of any Objective-C methods - you might have a look at the Core Graphics function CGRegisterScreenRefreshCallback(). sherm-- -- Cocoa progr

Re: NSTask

2010-07-26 Thread Sherm Pendley
On Mon, Jul 26, 2010 at 4:39 PM, wrote: > > where is rm? Ironically, that's almost exactly the shell command you'd use to find it: "whereis rm". :-) Bill's right though - NSFileManager seems like a much better way to do this. sherm-- -- Cocoa programming in Perl: http://www.camelbones.org __

Re: Elapsed time vs sleep

2010-07-26 Thread Sherm Pendley
That depends on what you mean when you say "animation." NSTimer works fine for triggering screen updates. But if your animation is physics-based - a 3d "shooter" game, for instance - you'll want something like the aforementioned mach_absolute_time to keep the animation smooth. sherm-- On Mon, Jul

Re: NSInteger compare - Help Needed

2010-07-18 Thread Sherm Pendley
On Sun, Jul 18, 2010 at 1:21 PM, Steve Wetzel wrote: > Thanks guys, that was the problem,  There are so many little things to learn > with Objective C. Out of curiosity, what programming language are you comparing it to? I've used *many* of them over the past twenty years, and I can't think of a

Re: Link Error: following -F not found

2010-07-17 Thread Sherm Pendley
On Sat, Jul 17, 2010 at 1:45 PM, Joseph Ayers wrote: > > ld: warning: directory > '/Users/lobster/Programming/Roboplasm/../../../core-plot/framework/build/Debug' > following -F not found > > I can't find a reference to core-plot anywhere in the code. It's not coming from your code, it's a linke

Re: modal loops & memory

2010-07-16 Thread Sherm Pendley
On Fri, Jul 16, 2010 at 1:10 PM, Scott Ribe wrote: > Does [NSApp runModalForWindow: ...] wrap an autorelease pool around its event > handling? Yes, autorelease pools work normally during a modal session. sherm-- -- Cocoa programming in Perl: http://www.camelbones.org _

Re: Sanity Check

2010-07-08 Thread Sherm Pendley
On Thu, Jul 8, 2010 at 10:19 AM, wrote: >> his seems weird. Why assign the panel/window to your own ivar when this is >> exactly -[NSWindowController window] is designed to do for you? > > I was thinking I might need to reference it and rather than call for it just > have it hanging around. Yes,

Re: eval?

2010-05-31 Thread Sherm Pendley
On Mon, May 31, 2010 at 1:11 PM, Louis-Philippe wrote: > Correct me if I am wrong, but there is no way in objective-c to do a runtime > string execution for which the responding object is not an Objective-C > class? > > like, if I have a c++ lib I would like to call from within an Objective-c > cl

Re: isKindofClass with NSData and NSKeyUnarchiver

2010-05-28 Thread Sherm Pendley
On Thu, May 27, 2010 at 8:25 PM, Philip Vallone wrote: > > This is a relative question, which depends on how the data is coming and > going. My question comes from the following situation. Suppose I have a > GKSession that is passing information via Bluetooth. The sender can send any > type of

Re: subclass overwriting superclass ivar

2010-05-26 Thread Sherm Pendley
On Wed, May 26, 2010 at 8:13 AM, vincent habchi wrote: > Le 26 mai 2010 à 13:40, jonat...@mugginsoft.com a écrit : > >> A subclass ivar is apparently overwriting a super class ivar. >> When an instance of MGS_B sets stderrData the super class ivar tempFilePath >> gets overwritten. > > If I am not

Re: Crash trying to unarchive webview from IB document

2010-05-25 Thread Sherm Pendley
On Tue, May 25, 2010 at 3:10 PM, Laurent Daudelin wrote: > I was doing a little demo to a colleague this morning and built a simple app > consisting of a text field and a web view in IB. I was able to run the thing > from IB but when I tried to compile it as release and launch it, it would > cr

Re: Regarding MVC design pattern

2010-05-19 Thread Sherm Pendley
On Wed, May 19, 2010 at 6:31 AM, Joanna Carter wrote: > Any outlets for controls (top level objects) in the Nib should be released in > the dealloc method only for OS X apps but not for iPhone apps. Setting the > properties to nil will ensure that the synthesized setter will be called, > which

Re: isKindOfClass:

2010-05-08 Thread Sherm Pendley
On Sat, May 8, 2010 at 3:51 PM, Kevin Callahan wrote: > isKindOfClass: is an instance method and doesn't work on a class you get from > NSClassFromString(). Because NSObject is a root class (i.e. it has no superclass), you *can* send its -isKindOfClass: message to a Class object. Instance method

Re: Synthesized ivar for std::tr1::shared_ptr?

2010-05-06 Thread Sherm Pendley
On Thu, May 6, 2010 at 2:19 AM, Barry Wark wrote: > I'm no C++ guru, so I'm hoping someone can help me by explaining why > the following gives a compiler error: I'm no guru either, but my guess would be that the interaction between synthesized ivars and C++ templates is rocky territory. I avoid g

Re: Seeking a graceful way to end a program

2010-04-29 Thread Sherm Pendley
On Thu, Apr 29, 2010 at 2:46 PM, Markus Spoettl wrote: > On Apr 29, 2010, at 2:31 PM, Paul Johnson wrote: >> I would like to have some guidance on the proper way to 'gracefully' >> terminate a program that cannot proceed, for example, when some >> critical resource can't be created or doesn't exis

Re: Introspecting the current method

2010-04-18 Thread Sherm Pendley
On Sun, Apr 18, 2010 at 8:21 PM, Graham Cox wrote: > > On 19/04/2010, at 10:14 AM, Dave DeLong wrote: > >> If I'm inside a method, is there a way to know at runtime whether that >> method is a class or an instance method?  Currently the only way I though of >> to do this is to see if "self" is a

Re: NSTask dilema...

2010-03-31 Thread Sherm Pendley
On Wed, Mar 31, 2010 at 2:21 PM, Jean-Nicolas Jolivet wrote: > I have to run a bunch of NSTasks and I'm not sure to proceed considering I > want to be able to update the UI when a task is completed, and I want the > process to be as fast as possible (obviously)... > > So far I tried a couple of

Re: Threads Question

2010-03-17 Thread Sherm Pendley
On Wed, Mar 17, 2010 at 10:36 AM, Philippe Sismondi wrote: > So, I want to launch the secondary task in a separate thread to keep the main > runloop responsive. NSTask only blocks the runloop if you call -waitUntilExit. So - don't do that. :-) sherm-- -- Cocoa programming in Perl: http://www

Re: NSImage and NSBitmapImageRep

2010-03-16 Thread Sherm Pendley
On Wed, Mar 17, 2010 at 2:39 AM, Martin Beroiz wrote: > > So how would you guys do this? Initialize an empty NSImage using -initWithSize:, which according to its description "does not add any image representations to the image object." Then add your NSImageRep to it with -addRepresentation:. she

Re: short question but I don't know how to describe it

2010-03-07 Thread Sherm Pendley
On Sun, Mar 7, 2010 at 7:07 PM, Marx Bievor wrote: > Hi, > I can substitute a String with %@ and an int with %d... like in return @"Hi > I am %@ and %d years old", name, age; > what is the right command to substitute a bool and a float? I cannot find > any reference at apple's docs. > does anyone

Re: How a window was closed?

2010-03-05 Thread Sherm Pendley
On Fri, Mar 5, 2010 at 1:44 PM, Eric Gorr wrote: > My point is not that I don't know how to fix it or cannot (as an absolute) > fix it, but that it is not practical to fix it at this time, so I need a way > to determine how the window was closed. Given that there's no reliable way to determine

Re: Carbon is C++?

2010-02-25 Thread Sherm Pendley
On Thu, Feb 25, 2010 at 7:02 PM, Stephen J. Butler wrote: > > Apple has deprecated libraries/frameworks. They haven't stopped > supporting any languages though. I'm pretty sure they no longer support Pascal. ;-) sherm-- -- Cocoa programming in Perl: http://www.camelbones.org __

Re: Carbon is C++?

2010-02-25 Thread Sherm Pendley
On Thu, Feb 25, 2010 at 6:42 PM, Dave Carrigan wrote: > > On Feb 25, 2010, at 3:40 PM, Chunk 1978 wrote: > >> is Apple's Carbon basically code written in C++, while Cocoa is >> written in Objective-C?  should developers avoid using frameworks >> written in C++ (like some sound frameworks)? > > > W

Re: Embedded frameworks and hard links

2010-02-24 Thread Sherm Pendley
On Wed, Feb 24, 2010 at 11:58 PM, Ashley Clark wrote: > I've been using an embedded framework in a couple of my apps for database > access. I've recently created an Automator action which also embeds this > framework, built from within the same project. This Automator action is, in > turn, then

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Sherm Pendley
On Wed, Feb 24, 2010 at 4:54 PM, Michael A. Crawford wrote: > I've purchased apps from other developers on this forum, which have > mechanisms for limiting functionality until a valid registration code has > been provided.  I'd like to include this functionality in my own app but > don't want t

Re: Odd NSString behavior

2010-02-24 Thread Sherm Pendley
On Wed, Feb 24, 2010 at 2:30 PM, McLaughlin, Michael P. wrote: > This is just a minor glitch but I hate loose ends. > > I have a Cocoa app as a resource in my MainBundle.  If I try to get its > executable via the obvious > > NSString * linrgPath = [myBundle pathForResource: > @"linrg2.app/Contents

Re: NSString category name collision?

2010-01-26 Thread Sherm Pendley
On Tue, Jan 26, 2010 at 12:28 PM, Jens Alfke wrote: > > Yes. To avoid these kinds of collisions, if you add a category method to an > external class you should add some sort of hopefully-unique prefix to its > name. CocoaDev has a list of prefixes many people are using. Since it's a wiki, you can

  1   2   3   4   >