Re: Sending multiple files via Bluetooth using GameKit

2011-01-20 Thread Ricky Sharp
You can but keep in mind the following: The max packet size is 87K so for larger blocks of data, you will have to break things up. You will need a mini state machine to keep track of what was sent vs. what is left to send. And will of course need all the logic to handle error conditions, retr

Re: UITableView with only 1 row selectable

2010-12-24 Thread Ricky Sharp
On Dec 24, 2010, at 11:28 AM, Remco Poelstra wrote: > Hi, > > I'm unable to find that method. Is it still available? > > Kind regards, > > Remco > > Op 24 dec. 2010 om 14:01 heeft Ricky Sharp het volgende > geschreven: > >> >> On Dec 24

Re: UITableView with only 1 row selectable

2010-12-24 Thread Ricky Sharp
On Dec 24, 2010, at 4:01 AM, Roland King wrote: > Why not do it the other way around. Set allowsSelection to YES and then > implement the delegate method tableView:willSelectRowAtIndexPath: to return > nil for any row you do NOT want selected (see the documentation). That seems > to be apple's

Re: Function-Key Unicodes

2010-12-22 Thread Ricky Sharp
On Dec 22, 2010, at 1:44 PM, k...@highrolls.net wrote: > I call: > > NSString *chars = [theEvent charactersIgnoringModifiers]; > > in -keyDown > > The docs say > > Function-Key Unicodes > > These constants represent Unicode characters (0xF700–0xF8FF) that are > reserved for function k

Re: Text rendering/editing on OSX & iOS

2010-12-21 Thread Ricky Sharp
On Dec 21, 2010, at 7:04 AM, Kenneth Baxter wrote: > Hi, I have an application which I plan to roll out on both iOS and MacOS X, > and it needs to display text in various places on a series of views. I am > doing all the drawing using the Core technologies (CGContext drawing) to make > the max

Re: NSKeyedArchiver on iOS and Cocoa

2010-12-20 Thread Ricky Sharp
On Dec 20, 2010, at 8:22 PM, lorenzo7...@gmail.com wrote: > Are these two compatible? Can something archived one platform be unarchived > on the other? I can't find anything in docs that addresses this, but I'm > havig trouble doing precisely this (archived on iPhone, unarchived on > MacOSX).

Re: assign property behaves differently from simple instance variable???

2010-12-13 Thread Ricky Sharp
On Dec 13, 2010, at 1:31 PM, Wim Lewis wrote: > > On 13 Dec 2010, at 11:01 AM, Matt Neuburg wrote: >> How can this seemingly minor change make such a big difference? I'm not even >> *using* the synthesized accessor! Yet its mere presence breaks the project. >> How can this be? m. >> >> PS A n

Re: Getting nextKeyView to work

2010-12-10 Thread Ricky Sharp
On Dec 9, 2010, at 9:25 PM, Stevo Brock wrote: > Hi All, > > I'm having trouble getting things set up so that I can tab between my > NSTextViews properly. I have a window that has a TabView as the only > top-level view. When I put 3 TextViews in the first tab, I have not yet been > able to

Re: Obscuring an NSString

2010-12-05 Thread Ricky Sharp
On Dec 5, 2010, at 4:31 PM, Adam Gerson wrote: > Thanks to all who responded. Let me explain my situation a little > better. I am storing several string values into an XML file. I want to > obscure one of them. When I encrpyt the NSString to an NSdata I can > store the data as a string in XML, ho

Re: Getting current mouse position after scroll

2010-12-01 Thread Ricky Sharp
On Dec 1, 2010, at 9:19 PM, Rick Mann wrote: > I have a view that shows the coordinates of the current mouse location in it. > I update this via -mouseMoved: But if the user scrolls the view with a scroll > ball, I don't get mouse moved events. > > 1) What's the best way to react to scroll cha

Re: iPad: UI Implications

2010-11-26 Thread Ricky Sharp
On Nov 26, 2010, at 9:02 AM, Phillip Mills wrote: > I don't have any specific questions or problems associated with this but I'm > curious about attitudes, techniques, patterns, or tools that others have > found helpful going from Mac to iOS. At a high level, you don't "go from Mac to iOS". i

Re: NSString/NSFont/Dingbats and the SnowFlake symbol

2010-11-24 Thread Ricky Sharp
On Nov 24, 2010, at 1:58 PM, Kyle Sluder wrote: > On Wed, Nov 24, 2010 at 11:35 AM, Stephen Blinkhorn > wrote: >> On 24 Nov 2010, at 12:56, Murat Konar wrote: >> >>> Beware the user that has removed all fonts that contain a snowflake... >> >> Yeah, I did wonder about such a thing. But why wou

Re: Help with Basics (Was: help with bindings)

2010-11-21 Thread Ricky Sharp
On Nov 21, 2010, at 2:59 AM, Rounak Jain wrote: > Thanks Jerry, > I have used the dictionaryWithObjectsAndKeys: method. > I have implemented your suggestions regarding "convenience constructors" and > myKeys object. Regarding your comment about making everything "mutable", I > think, at the mom

Re: Declaring a property named "private" and ObjC++

2010-09-28 Thread Ricky Sharp
On Sep 28, 2010, at 6:19 PM, Nick Zitzmann wrote: > Okay, I tried searching, and didn't find anything pertinent... > > How do I create a property for a class named "private" and not have the > Objective-C++ compiler trip on it? > > Here's what I first tried: > > @property(assign,getter=isPriv

Re: UIView animation

2010-09-02 Thread Ricky Sharp
On Sep 2, 2010, at 5:11 PM, Christian Ziegler wrote: > I could use your help because I'm running out of ideas! > > Here's the situation. I got this custom view on screen which I want to remove > from the screen by moving it outside the left border of the screen. However > at the same time, I w

Re: NSCoding between iOS and Mac OS X

2010-08-25 Thread Ricky Sharp
A similar question came up recently. While some objects (e.g. NSNumber) things should be binary compatible. But you may run into issues. Also depends upon what objects you are coding. Mac OS X uses NSColor whereas iOS uses UIColor. I would recommend using an intermediate normalized format in

Re: [iPhone] How to change Default.png Image Dynamically

2010-08-21 Thread Ricky Sharp
On Aug 21, 2010, at 7:39 AM, Tharindu Madushanka wrote: > But it seems like iPhone Phone app has some different Default.png images.. > When you exit from Keypad menu.. it will load one image.. > > When you exit from other tabs, Default image is some other.. Is it possible > to do similar thing ?

Re: NSKeyedArchiver on OSX to NSKeyedUnarchiver iOS

2010-08-11 Thread Ricky Sharp
On Aug 11, 2010, at 4:32 PM, glenn andreas wrote: > > On Aug 11, 2010, at 3:53 PM, Sandro Noël wrote: > >> Greetings >> >> I'm having problems unarchiving my data in the iphone. >> >> here is the workout. >> >> 1: I archive a AttributedString to my CoreData NSData property using >> NSKeyeda

Re: six things I wasn't able to do with Cocoa

2010-05-28 Thread Ricky Sharp
On May 28, 2010, at 11:20 AM, Bill Appleton wrote: > on printing, the problem is that i have to port an enterprise application > that expects to be able to call a fx for the page layout and the page setup > dialog, a fx to begin/end a page, and a fx to begin/end printing. > > so Cocoa has this a

Re: -[NSMutableSet randomObject]

2010-05-25 Thread Ricky Sharp
On May 25, 2010, at 11:49 AM, Michael A. Crawford wrote: >// If the array is empty, throw an exception. The caller should know > better. >// If there is only one, return object zero every time. >// If there are only two, alternate with every access. >// If there are three or mor

Re: Cracks in image using NSDrawThreePartImage

2010-05-19 Thread Ricky Sharp
On May 19, 2010, at 4:30 PM, Ken Ferry wrote: > File a bug with a test case that shows the problem. > > I would expect there to be seams due to rounding error if you look in pixie, > but I have never seen a case where it was visible to the eye at actual > scale. I only recall seeing this when

Re: Original iPhone animation performance

2010-05-19 Thread Ricky Sharp
On May 19, 2010, at 3:01 AM, Andrew wrote: > Im writing some code to animate an image moving up the display, just a simple > thing moving from the bottom to the top. > > the image is 75x75, and Im displaying that in a CALayer sized to 45x45 by > setting its .contents property to the .CGImage o

Re: [iPhone] Frustrated by a simple task

2010-05-12 Thread Ricky Sharp
On May 12, 2010, at 5:25 PM, WT wrote: > The client I'm writing an app for wants a splash screen with some information > that cannot go in the launch image (because it's dynamically generated), > meaning that the first view controller to ever be instantiated will have in > its view an image vi

Re: [iPhone] File coping application

2010-04-26 Thread Ricky Sharp
On Apr 26, 2010, at 11:40 AM, Kyle Sluder wrote: > On Mon, Apr 26, 2010 at 9:04 AM, Arun wrote: >> Is it possible to copy files form iPhone on to a Mac when iPhone is >> connected to USB? > > No. Just to add though that you _can_ transfer files via WiFi. But of course, only for those files

Re: iPad: UIImagePickerController

2010-04-07 Thread Ricky Sharp
On Apr 7, 2010, at 3:37 PM, Development wrote: > How do you use the image picker controller on the iPad? My iphone version > works fine but I get a UI Mess on the iPad. > And now it crashes telling me I have to use a popover: > > *** Terminating app due to uncaught exception 'NSInvalidArgumen

Re: Hot to move focus to a button?

2010-03-07 Thread Ricky Sharp
On Mar 7, 2010, at 3:53 AM, Joanna Carter wrote: > Hi Kyle > >> Buttons don't accept keyboard focus. See the documentation for >> -[NSView canBecomeKeyView] and the related conceptual documentation. > > I realise this to be what the docs say but, if you use -makeFirstResponder: > the focus rin

Re: iPhone and OS X apps question

2010-02-11 Thread Ricky Sharp
I would begin with Apple's picture-sharing sample code. I think that sample has two parts - server and client. Ther is also an iPhone sample dealing with locating Bonjour services. Basically Bonjour is used to have the server (Mac app) and client (iPhone) discover each other. Then use whate

Re: Using NSKeyedArchiver to save and restore state on iPhone apps

2010-02-10 Thread Ricky Sharp
On Feb 10, 2010, at 12:40 PM, Jason Bobier wrote: > As many of you know, saving and restoring complex navigation hierarchies on > the iPhone can be a real chore. So, I had this brilliant idea of setting up > my app delegate like this: > > applicationDidFinishLaunching > if userdefaults c

Re: Make sheets open instantly

2010-01-18 Thread Ricky Sharp
On Jan 18, 2010, at 7:19 PM, Chris Hanson wrote: > On Jan 18, 2010, at 2:43 PM, David Catmull wrote: > >> Is there any way to make sheets open instantly, instead of animating? I'd >> just like to speed up my unit tests. > > Why do your unit tests need to bring up sheets? Can't speak for the

Re: Dead iPhone Simulator :-(

2010-01-14 Thread Ricky Sharp
On Jan 14, 2010, at 3:27 PM, Michael Rogers wrote: > I'm running Mac OS X 10.6.2, and just installed the iPhone SDK 3.1.2. When I > launch anything in the simulator, it crashes, and I get a message complaining > about the Telephony state (which I believe is California :-) > > Jan 14 15:25:01

Re: Resolution Independence

2010-01-05 Thread Ricky Sharp
On Jan 5, 2010, at 2:50 PM, Todd Heberlein wrote: > A friend of mine loves her new 27" iMac but has complained at how small > everything is. Searching around on the net I found that it has about a 109 > dpi pixel density. I also saw today that the new Nexus phone has a pixel size > of 800x480

Re: Localization strategies?

2009-12-23 Thread Ricky Sharp
On Dec 23, 2009, at 7:38 AM, Jerry Krinock wrote: > > Well, Ricky I see you're one of the few who has really thought through all > the issues. > > On 2009 Dec 22, at 19:59, Kyle Sluder wrote: > >> On Tue, Dec 22, 2009 at 11:54 AM, Ricky Sharp wrote: >>

Re: Localization strategies?

2009-12-23 Thread Ricky Sharp
On Tuesday, December 22, 2009, at 09:59PM, "Kyle Sluder" wrote: >On Tue, Dec 22, 2009 at 11:54 AM, Ricky Sharp wrote: >> (2) Externalize all strings from the nibs and put them into >> Localizable.strings.  This allows me to have a single file to hand off to >>

Re: Localization strategies?

2009-12-22 Thread Ricky Sharp
Thank you all for the replies. Here's my final plan: (1) Have separate nibs for each language. I agree with those that say you cannot have a one-size-fits-all layout. Each nib will thus carry layout, font size, style, etc. that makes sense for a particular language. I've already "pseudo-loca

Localization strategies?

2009-12-20 Thread Ricky Sharp
In getting quotes from many localization companies, I've found that some have different processes. For example, one company would prefer if I just provide .string files. During their QA process, they'll then run the app and look at everything in context. While generating .strings from nibs i

Re: Button width should accomodate localized string

2009-11-30 Thread Ricky Sharp
On Nov 29, 2009, at 9:52 AM, glenn andreas wrote: > On Nov 29, 2009, at 9:38 AM, Symadept wrote: > >> How can I scale my button or Label to be able to accomodate the localized >> string? > > That's the whole purpose of being able to localize the nib/xib... Exactly. It's not possible to create

Re: Locale based font

2009-11-23 Thread Ricky Sharp
I am about to play around with something similar. In my iPhone app, I have some calls with boldSystemFontOfSize. But, for certain locales, it should be a plain font and the size may need to be tweaked. I then had an idea to write a static method to obtain a font style and size based on loca

Re: Where are the interface builder components?

2009-11-17 Thread Ricky Sharp
On Nov 16, 2009, at 9:28 PM, Sandro Noël wrote: > I guess i'll have to make my own. > I just find it sad to have to duplicate work, it's unproductive. True, but keep in mind the amount of effort that Apple would need to do if they provided the custom control, etc: * Must work with localized c

Re: sizeWithAttributes Cutting Off Drop Shadow, Italic Mask?

2009-10-30 Thread Ricky Sharp
On Oct 30, 2009, at 10:10 AM, Chunk 1978 wrote: does sizeWithAttributes not take into account the offset of an NSDropShadow or italic font mask? i have a dictionary of attributes for a string, and i'm trying to produce an image for the drag that doesn't crop the image with these attribut

Re: language based scaning

2009-10-15 Thread Ricky Sharp
On Oct 15, 2009, at 1:11 PM, Nz Gmail wrote: what I'm trying to do is sort of Twitter client, in which the tweets can be English or Arabic so in case of Arabic the alignment should be from right to left, i hope I made it clear this time cheers In that case, you can probably scan the te

Re: Language based scanning

2009-10-13 Thread Ricky Sharp
You probably do not want to approach things this way. Arabic is bidirectional and you may have situations where you have a mixture of languages. What you should look at instead is to just localize your app to Arabic. In the Arabic version of your nibs, make the necessary adjustments. Se

Re: NSURLRequest

2009-10-10 Thread Ricky Sharp
On Oct 10, 2009, at 9:36 AM, DKJ wrote: I've got an NSArray that I initialise with data from a plist stored on a remote webserver. I've been doing it like this: NSURL *url = [NSURL URLWithString:@"http://www.server.com/ data.plist"]; NSArray *myArray = [NSArray arrayWithContentsOf

Re: UIControl touchInside property

2009-09-29 Thread Ricky Sharp
I believe there is some "slop" area for controls in general. For example, the Edit button in the nav bar in Mail when in a list of messages. The initial tap must be within the defined bounds. But when tracking off or back in, the bounds used to determine in vs out is larger. That property a

Re: iPhone to Mac Synchronization

2009-09-24 Thread Ricky Sharp
This is possible, but only over WiFi. I'm currently working on a feature to do bi-directional syncing between the Mac and iPhone versions of my app. I'm also using Bonjour for self-discovery (if you go this route, make sure to register your service at www.dns-sd.org) Feel free to file an en

Re: UITableView Custom cell with image

2009-09-22 Thread Ricky Sharp
Please post your code. One app I have displays a list of 1,089 items. Three rows are visible on the screen and each row displays an image of size 89 x 128. I use the standard method of reusing table cells and simply assign the image only when the cell is to be displayed. There is some stutt

Re: Build Issue?

2009-09-01 Thread Ricky Sharp
On Sep 1, 2009, at 4:10 PM, Thomas Willson wrote: Is there anything else I can include to help someone answer my question? My next step might have to be reinstalling the OS. Begin forwarded message: From: Thomas Willson Date: August 31, 2009 10:53:50 PM PDT To: cocoa-dev@lists.apple.com S

Re: Disabling Exposé in SystemUIMode

2009-08-06 Thread Ricky Sharp
On Aug 6, 2009, at 10:10 AM, Pierce Freeman wrote: Yeah, I completely copied his code and inserted it into my project. Even odder, it doesn't allow the Apple-Tab function (which is what it is supposed to do) but lets Exposé work just fine. I don't mean that it broke in the latest version

Re: Disabling Exposé in SystemUIMode

2009-08-06 Thread Ricky Sharp
On Aug 5, 2009, at 9:39 PM, Pierce Freeman wrote: Which version of OS X are you using? With the latest of Leopard, it just doesn't seem to work. When writing my initial response to this thread, it was 10.5.7. Just tested with 10.5.8 and all is still well (no Expose, no process switchin

Re: Disabling Exposé in SystemUIMode

2009-08-05 Thread Ricky Sharp
On Aug 5, 2009, at 8:45 PM, Pierce Freeman wrote: I am wondering if anyone knows of a way to disable Exposé in SystemUIMode. I am using this class to create a kiosk-based application and don't want the user to be able to switch between other windows. If there isn't a way to do this insid

Re: Borderless window and focus

2009-07-21 Thread Ricky Sharp
On Jul 21, 2009, at 4:56 PM, ss2 cire wrote: I have the following code to initialize a borderless window for "fullscreen" - (void)initFullScreenWindow { NSScreen *theScreen = [[NSScreen screens] objectAtIndex:0]; NSRect screenRect = NSMakeRect(0, 0, [theScreen frame].size.width, [

Re: Where to release in UIView

2009-07-18 Thread Ricky Sharp
On Jul 18, 2009, at 1:09 PM, DKJ wrote: On 18-Jul-09, at 8:50 , Fritz Anderson wrote: You have to release shadingAreas. You alloc'ed it, you own it. Yes, I realise that. What I'm wondering is where to do it, since it's initialised in the awakeFromNib method, rather than in initWithFrame

Re: Japanese Language

2009-07-15 Thread Ricky Sharp
On Jul 15, 2009, at 5:36 PM, Development wrote: Ok, I lucked out and got a great chance at releasing a bit of software in japan. The problem is that it is 50/50 client to web. My primary concerns are string translation from iPhoneOS to data being stored in a mysql database. I have spent qu

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-09 Thread Ricky Sharp
On Jul 8, 2009, at 10:16 PM, Jeff Laing wrote: No, it doesn't. It would in fact violate the encapsulation principle if your -dealloc method required your accessors to not rely on certain state. The "ability to override accessors violates encapsulation" because it adds additional restric

Re: Yet another memory management question

2009-07-05 Thread Ricky Sharp
On Jul 5, 2009, at 4:02 AM, Benjamin Dobson wrote: On 5 Jul 2009, at 05:10:12, mmalc Crawford wrote: If you manipulate an instance variable anywhere other than in an initialiser or a dealloc method, you should use a suitable accessor method. Does this apply to instance variables that ar

Re: What is the best way to store some kind of identifying string in an interface builder object?

2009-06-18 Thread Ricky Sharp
On Jun 18, 2009, at 5:15 PM, Chilton Webb wrote: Hi Greg! Thanks for writing back. On Jun 18, 2009, at 4:52 PM, Greg Guerin wrote: Is there a way to add a tag an IB object in such a way that it is not visible to the user, but in such a way that I could reference it from my app? Maybe the

Re: Touchscreens and control scaling

2009-06-04 Thread Ricky Sharp
On Jun 4, 2009, at 2:51 AM, Joe Ranieri wrote: On Jun 4, 2009, at 03:44, Ben wrote: Hi list, I've been sketching out an application and could do with a little advice on which cocoa-direction to take. It's a full-screen (kiosk) type app, running in a very controlled environment (not for

Re: Vector Graphic Dock Icon?

2009-05-06 Thread Ricky Sharp
On May 6, 2009, at 2:12 PM, Eric E. Dolecki wrote: That's where I first saw PDFs used like that. Coming from Flash, we take vector as a given but bitmaps are more processor friendly. Is there a clear advantage using PDFs instead of bitmaps? Do PDFs remain vector in their rendering, or are

Re: drawing image

2009-05-04 Thread Ricky Sharp
On May 4, 2009, at 6:45 PM, Mike Manzano wrote: It's inverted because of differences in coordinate systems between the image and the view it's being draw into. Before you draw the image, invert it: [[self image] setInverted:YES] ; Before doing that, you should first ask the cell's view i

Re: Best way to get a non-repeating random number?

2009-04-14 Thread Ricky Sharp
On Apr 13, 2009, at 7:58 PM, Eric E. Dolecki wrote: For an example I might want to generate numbers from 1 to 10 over and over. All I want to do is when I generate a new number is not allow it to equal the previously held value. I can imagine a few approaches but I just wanted to make sur

Re: Need localization-proof method of transporting dates.

2009-04-08 Thread Ricky Sharp
You can always specify the specific locale to use in a custom sorting method. Sent from my iPhone On Apr 8, 2009, at 6:46 AM, Graham Cox wrote: On 08/04/2009, at 2:45 PM, Graham Cox wrote: Thanks for all your help - just remains to be seen now if certain users can now open my app! ;)

Re: IB Plugin help

2009-04-04 Thread Ricky Sharp
On Apr 3, 2009, at 8:28 PM, jmun...@his.com wrote: OK, now I have one more question. I'd like to "install" and use my plug-in. However, when accessing IB's preferences->Plug-ins and attempting to add the plug-in I get: 1) when simply adding the ibplugin an error that states the file is

Re: IB Plugin help

2009-04-04 Thread Ricky Sharp
On Apr 3, 2009, at 7:39 PM, jmun...@his.com wrote: I have one more question: How does one replace the blue cube object icon that tags on the text field with my formatter's graphic? That, I do not know how to do. I'll definitely update the my example though if I or someone else figures

Re: IB Plugin help

2009-04-03 Thread Ricky Sharp
On Apr 3, 2009, at 6:43 PM, jmun...@his.com wrote: I found one mistake where I didn't change the IBInspector class of File's Owner in the Inspector.xib to "my" Inspector subclass. Doing that gave me an entry in the bottom box of the library, but no object in the middle pane... How do I f

Re: UIView hidden - still drawing the subviews?

2009-03-17 Thread Ricky Sharp
On Mar 17, 2009, at 4:32 PM, Jelle De Laender wrote: I've a UIView with some subviews (most of them are UIButtons). When I hide an UIView (setHidden:YES), I expect that the subviews are also hidden (not drawed)... but the subviews are still visible when I run my code. How can I hide the

Re: Automatically replacing part of text in a text label

2009-03-17 Thread Ricky Sharp
On Mar 17, 2009, at 3:33 PM, Peter Ammon wrote: On Mar 15, 2009, at 11:20 PM, Peter Zegelin wrote: I have some text labels in a registration dialog that contain the application name eg "xxx Demonstration" "Thank you for purchasing xxx" and so on. I would like this registration dialog to

Re: What is using up so much memory here?

2009-03-10 Thread Ricky Sharp
On Mar 10, 2009, at 8:13 PM, James Cicenia wrote: Yes, I realized I would need a different approach. I got too used to web gif/png and just doing overlays. I have already told my designer to give me just bounded states with a spreadsheet of what he chopped off from the top and left. This wil

Re: How do I debug iPhone restarts?

2009-03-09 Thread Ricky Sharp
You should send such questions to the dedicated iPhone portal discussion forums. In fact, many of your questions should have gone there instead of this list as they were not general Cocoa. Sent from my iPhone On Mar 9, 2009, at 10:41 AM, James Cicenia wrote: Hello - While testing on my

Re: Core Data reads xml store value @" " as @""

2009-02-20 Thread Ricky Sharp
On Feb 20, 2009, at 6:45 PM, Jerry Krinock wrote: There is an attribute in my Core Data document-based app whose string value can legitimately be a single single utf8 0x20 space character, @" ". (It's a user-selectable delimiter.) When I save a document with this attribute value, reading

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread Ricky Sharp
On Feb 19, 2009, at 3:57 PM, James Montgomerie wrote: I feel like I may have opened a can of worms here. Nope; my fault. All this time I had misread the whole point of the threads. My app has never received low-memory warnings. So my observations in turn have nothing to do with it. I

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread Ricky Sharp
On Feb 19, 2009, at 3:52 PM, mmalc Crawford wrote: On Feb 19, 2009, at 1:41 PM, Ricky Sharp wrote: Perhaps this is just how I've coded things, but I've seen views get unloaded and reloaded perfectly without any leaks. This isn't the issue. The issue is how much memory

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-19 Thread Ricky Sharp
On Feb 19, 2009, at 2:18 PM, James Montgomerie wrote: Returning to this months-old thread... Apologies for the length of the mail, I thought it best to summarise what went before. I now have shipping iPhone OS apps and during all my tests and analyzing things in Instruments (connected to

Re: how to receive some string from iphone's app to stanalne app on mac?

2009-02-09 Thread Ricky Sharp
Bonjour is just for discovery. You need to add in network code to send and receive data. Check out the PictureSharing sample code. Not sure of exact names, but there are a few samples you will ultimately need that should have PictureSharing in their name. Sent from my iPhone On Feb 9, 2009

Re: [OT] Localizing an App or Plugin

2009-02-02 Thread Ricky Sharp
On Feb 2, 2009, at 12:35 PM, development2 wrote: Yes I understand that. I will have to modify/resize the UI once I have the strings in there. But the people who we are sending the strings out to be localized do not know anything about IB, so I don't want to confuse them or have them screw

Re: How to draw text with fade out effect?

2009-01-28 Thread Ricky Sharp
You could render your text to an image first, composite it with the opaque-to-transparent mask and finally draw the result. I used to create images from text, but I ended up with issues regarding resolution independence for some reason. So, you may need to test this solution with RI if need

Re: iPhone Vibrate

2009-01-24 Thread Ricky Sharp
On Jan 24, 2009, at 5:31 PM, David Blanton wrote: I want to be sensitive to battery usage in the iPhone. When calling AudioServicesPlayAlertSound ( kSystemSoundID_Vibrate ); How much battery does this use? I may be calling this 'alot' in my application. Reposting messages will

Re: Disabled button looks like enabled

2009-01-12 Thread Ricky Sharp
Do not do this. Users will be very frustrated when they cannot interact with that button. Why do you think you need this? Sent from my iPhone On Jan 12, 2009, at 5:55 AM, Donnie Lee wrote: Hi! I'd like to create a disabled button that looks like enabled. If I just set enabled to "no", I g

Re: A Data Object in Cocoa

2009-01-10 Thread Ricky Sharp
On Jan 10, 2009, at 6:45 AM, Alastair Houghton wrote: On 10 Jan 2009, at 00:11, Adam Foltzer wrote: I've noticed a pattern in some Apple code where the instance variables are all prefixed with an underscore, but the property name, and therefore the accessors, are what you'd expect. Exce

Re: A Data Object in Cocoa

2009-01-09 Thread Ricky Sharp
On Jan 9, 2009, at 8:28 PM, Adam Foltzer wrote: I stand corrected; I've seen this many times before, and have never had problems. I'm guessing it's one of those patterns that causes problems under specific circumstances? Yes, only under certain situations. I've been personally calling

Re: modifier key query

2008-12-31 Thread Ricky Sharp
On Dec 31, 2008, at 11:36 AM, Sean McBride wrote: Wesley Smith (wesley.h...@gmail.com) on 2008-12-26 3:04 AM said: Is there a way to know if a modifier key (shift, ctrl, option, cmd, etc) is pressed? Obviously, there's this: NSUInteger modifierFlags = [theEvent modifierFlags]; but what if y

Re: Reversing a String

2008-12-31 Thread Ricky Sharp
On Dec 31, 2008, at 10:52 AM, Michael Ash wrote: The key is the usage of -rangeOfComposedCharacterSequenceAtIndex:. Without calling this method or doing the equivalent to what it does, your code will suffer the problems I described above. I tested that code with the string @"abcdéf𝄞g" (that's

Re: NSSpeechRecognizer and Speech Recognition calibration

2008-12-27 Thread Ricky Sharp
On Dec 26, 2008, at 4:56 AM, Christopher Corbell wrote: I'm working on an accessibility app for the visually impaired and was hoping to use NSSpeechRecognizer. I've found it extremely difficult to get NSSpeechRecognizer to behave predictably on my system. Does anyone on the list have experi

Re: NSString property: copy or retain?

2008-12-22 Thread Ricky Sharp
On Dec 22, 2008, at 4:04 PM, Debajit Adhikary wrote: Let's say I have a class called SomeClass with a string property name: @interface SomeClass : NSObject{ NSString* name; } @property (nonatomic, retain) NSString* name; @end I understand that name may be assigned a NSMutableString in wh

Re: Sorting an NSMutableArray

2008-12-20 Thread Ricky Sharp
On Dec 20, 2008, at 6:15 AM, Jacob Rhoden wrote: How do you sort an NSMutableArray, when the difference between the two objects is determined by information not contained completely within the objects themselves. ie in Java you can implement a Comparator that takes two objects to compare t

Re: Drawing in a NSView out side of drawRect

2008-12-19 Thread Ricky Sharp
On Dec 19, 2008, at 6:20 PM, David Alter wrote: I want to draw in a NSView but not when drawRect is called. To do this I understand that I need to call lockFocus before drawing and unlockFocus after. The drawing appears to happen but it is not until I deactivate the window do I see my resu

Re: Newbie Question: implementing a stack

2008-12-19 Thread Ricky Sharp
On Dec 19, 2008, at 1:22 PM, Steve Wetzel wrote: I am new to this list and new to mac programming as well. I am working on implementing a stack as a category of NSMutableArray. I want this stack to be able to store objects. This is what I have so far: // // Stack.h // Stack implemen

Re: controlTextDidChange for UITextField?

2008-12-15 Thread Ricky Sharp
On Dec 14, 2008, at 5:15 PM, Debajit Adhikary wrote: Is there any way to call a method each time the text of a UITextField changes? controlTextDidChange does not seem to exist for UITextField's You'd be better served by using the appropriate forums for UIKit- related questions. But for thi

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Ricky Sharp
On Dec 9, 2008, at 7:25 PM, I. Savant wrote: On Dec 9, 2008, at 8:09 PM, Ricky Sharp wrote: In some cases, other attributes, when set, will 'dirty' that flag followed by a setNeedsDisplay. Colors will then be re-fetched/ created and then reused until the next change c

Re: How Can I Notify DrawRect Method?

2008-12-09 Thread Ricky Sharp
On Dec 9, 2008, at 5:31 PM, I. Savant wrote: Even if it were slower, contorting the code like this without having profiled the code and demonstrated that this is in fact a significant slowdown is bad practice. I disagree. Certainly it's "profile first", but to have a view that reads a si

Re: iPhone Orientation

2008-12-08 Thread Ricky Sharp
On Dec 8, 2008, at 9:58 AM, I. Savant wrote: On Sat, Dec 6, 2008 at 12:19 PM, Bruce Martin <[EMAIL PROTECTED]> wrote: I'm not sure this is the right list but a search in the Archives returned no results for this question so that makes this question a simple one, or maybe no one else has ha

Re: Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Ricky Sharp
you have the proper SDK specified (e.g. 10.4 universal?) On 6 Dec 2008, at 12:58, Ricky Sharp wrote: You can probably simplify this a bit by using stringWithContentsOfURL:encoding:error. Note 'encoding' and not 'usedEncoding'. The former allows you to specify the

Re: Reading in XML with iso-8859-1 encoding?

2008-12-06 Thread Ricky Sharp
On Dec 6, 2008, at 4:35 AM, Amy Gibbs wrote: I've got a web based xml file in iso-8859-1 encoding that I'm trying to read into an NSXMLDocument. I've got the following code, but I can't seem to make it work? (I've tried all manner of combinations) //create the url NSStri

Re: How To Deal With Rounding Errors

2008-12-04 Thread Ricky Sharp
On Dec 4, 2008, at 6:37 AM, Andrew Farmer wrote: On 04 Dec 08, at 00:08, Bridger Maxwell wrote: Short version of my question: I believe I am having rounding errors because I am working with really, really small values. Would it help if I multiplied these values by a scalar (say, 1,000), did

Re: Button title irregularities

2008-12-03 Thread Ricky Sharp
On Dec 2, 2008, at 7:15 PM, Randall Meadows wrote: On Dec 2, 2008, at 5:31 PM, Aki Inoue wrote: You're using Helveitca 12.0 as your label font. Actually, it's: (gdb) po labelFont "ArialMT 12.00 pt. P [] (0x001c0e30) fobj=0x162670a0, spc=3.33" Use [NSFont systemFontOfSize:[NSFont systemFon

Re: reading a PDF

2008-11-29 Thread Ricky Sharp
On Nov 29, 2008, at 3:16 PM, Torsten Curdt wrote: I just assume that the actual content is hidden inside the page's content stream(s). Raw content, mostly, sometimes. But the draw commands are what put it all together. For instance, you might have a paragraph of text where there is one

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Ricky Sharp
On Nov 29, 2008, at 10:26 AM, Dave DeLong wrote: I'm working on a client/server application. The client sends tiny "Event" objects to the server that can contain an NSString of a letter or short sequence of letters (up to about 4). What I'm trying to do is figure out how the server can p

Re: Text blurred in application

2008-11-29 Thread Ricky Sharp
On Nov 29, 2008, at 10:57 AM, Richard Somers wrote: I just discovered part of my problem. The pdf image was being scaled down slightly even though there was plenty of room for it inside the NSButton. The default scaling is "Proportionally Down". Change this to "None" and the image now is a

Re: how to set up nextKeyView, full keyboard access etc, for custom subviews set up in code (rather than nib)

2008-11-27 Thread Ricky Sharp
On Nov 26, 2008, at 9:47 PM, Rua Haszard Morris wrote: I have a dialog that has a few controls as well as a complex custom view that itself contains other controls as subviews. The custom view (for various good reasons) is instantiated and added as a subview in code. A template view and NS

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-21 Thread Ricky Sharp
On Nov 21, 2008, at 6:53 PM, mmalcolm crawford wrote: This leaves us for now with two solutions: (a) Greg's (override setView:) which is more future-proof but is in many respects academically unsatisfying. - (void)setView:(UIView *)aView; { if (!aView) { // set outlets to nil, e

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Ricky Sharp
On Nov 19, 2008, at 4:11 PM, j o a r wrote: On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. That is indeed correct. The of

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Ricky Sharp
On Nov 19, 2008, at 10:13 AM, Brian Stern wrote: I think that you're probably right and that it's redundant. Needless to say, mmalc's best practice has the outlets being released in dealloc. That's why I had that code there in the first place. FWIW, I don't think that UIViewController

  1   2   >