Unable to find Categories referenced from Static Library containing in another Static Library

2010-05-13 Thread Symadept
Hi, I have one Static Library called A.a which contains some categories. I am referencing A.a into another library called B.a. I am using this B.a into one Executable. In this case I am calling a method in B.a which calls the category from A.a. Here it crashes with error unreference. Both A.a and

[iPhone] How to create a unique string

2010-05-13 Thread Tharindu Madushanka
Hi, I want to generate a unique string every time i push a button. Can I create some string like that using a time stamp NSDate object may be. ex. e3df44646ngfd5454nrteter Its really useful to know about a small code segment or way to create a unique string in iPhone. Thank you and Kind Regards

Re: [iPhone] How to create a unique string

2010-05-13 Thread John Pannell
Hi Tharindu- In the past, I have used a UUID for this purpose. You could add the following method to a category on NSString to make it quite easy: + (NSString*) stringWithNewUUID { CFUUIDRef uuidObj = CFUUIDCreate(nil); NSString *newUUID = (NSString*)CFUUIDCreateString(nil, uuidObj);

Re: [iPhone] How to create a unique string

2010-05-13 Thread Eric Gorr
On May 13, 2010, at 8:48 AM, Tharindu Madushanka wrote: > Hi, > > I want to generate a unique string every time i push a button. As John P. said, I would going with a UUID. They are, by definition, what you want. ___ Cocoa-dev mailing list (Cocoa-d

Re: [iPhone] How to create a unique string

2010-05-13 Thread Jonathan del Strother
On 13 May 2010 14:00, John Pannell wrote: > Hi Tharindu- > > In the past, I have used a UUID for this purpose.  You could add the > following method to a category on NSString to make it quite easy: > > + (NSString*) stringWithNewUUID > { >    CFUUIDRef uuidObj = CFUUIDCreate(nil); >    NSString *

Re: [iPhone] How to create a unique string

2010-05-13 Thread Tharindu Madushanka
Hi, Thanks a lot. [[NSProcessInfo processInfo] globallyUniqueString] seems to be the easiest one. cool. Thank you very much, Tharindu > > It might be simpler to just use [[NSProcessInfo processInfo] > globallyUniqueString] > > -Jonathan > ___ Cocoa-

Re: [iPhone] How to create a unique string

2010-05-13 Thread Eric Gorr
So long as it is ok for the string to be unique for the network the user is on only. From the docs: The ID includes the host name, process ID, and a time stamp, which ensures that the ID is unique for the network. A UUID (Universally Unique Identifier) is entirely unique. On May 13, 2010, at

Re: [iPhone] How to create a unique string

2010-05-13 Thread Thomas Davie
On 13 May 2010, at 15:33, Eric Gorr wrote: > So long as it is ok for the string to be unique for the network the user is > on only. From the docs: > > The ID includes the host name, process ID, and a time stamp, which ensures > that the ID is unique for the network. > > A UUID (Universally Un

Re: [iPhone] How to create a unique string

2010-05-13 Thread Michael Ash
On Thu, May 13, 2010 at 10:56 AM, Thomas Davie wrote: > > On 13 May 2010, at 15:33, Eric Gorr wrote: > >> So long as it is ok for the string to be unique for the network the user is >> on only. From the docs: >> >> The ID includes the host name, process ID, and a time stamp, which ensures >> tha

Re: [iPhone] How to create a unique string

2010-05-13 Thread Thomas Wetmore
UUID is the way to go. Here is a category I use to generate unique ids. It uses core foundation to generate a 128-bit UUID and converts that to a 22-character string. The conventional string form of a UUID is 36 characters long. A goal of this code was to minimize the size of the id since my app

Re: How to edit/resize embedded graphics and images in a NSTextView ?

2010-05-13 Thread Anders Sommer Lassen
Hi, When I noticed that IB has a control called "Image Editing" for the NSTextView, I hope that this was going to be easy. Later on I discovered, that I have to do more. As I mentioned in my email, I have tried to set the property >> -(void)setAllowsImageEditing:(BOOL) but this did not help.

Xcode 3.2 - Missing iPhoneOS 2.2.1

2010-05-13 Thread Patrick M. Rutkowski
Is it just me, or is Xcode 3.2 missing the 2.2.1 version of the iPhone SDK? Can that be remedied somehow? Or is Apple intentionally dropped support there? -Patrick P.S. Is there a better list to be posting iPhone questions to? ___ Cocoa-dev mailing li

Re: [iPhone] How to create a unique string

2010-05-13 Thread Louis Gerbarg
On May 13, 2010, at 11:05 AM, Michael Ash wrote: > On Thu, May 13, 2010 at 10:56 AM, Thomas Davie wrote: >> >> On 13 May 2010, at 15:33, Eric Gorr wrote: >> >>> So long as it is ok for the string to be unique for the network the user is >>> on only. From the docs: >>> >>> The ID includes the

Re: [iPhone] How to create a unique string

2010-05-13 Thread Eric Gorr
On May 13, 2010, at 11:52 AM, Louis Gerbarg wrote: > On May 13, 2010, at 11:05 AM, Michael Ash wrote: > >> On Thu, May 13, 2010 at 10:56 AM, Thomas Davie wrote: >>> >>> On 13 May 2010, at 15:33, Eric Gorr wrote: >>> So long as it is ok for the string to be unique for the network the use

Re: [iPhone] How to create a unique string

2010-05-13 Thread Douglas Davidson
On May 13, 2010, at 8:52 AM, Louis Gerbarg wrote: >>> No it's not, as can easily be proven by observing that there are only a >>> finite number of 40 character strings. A UUID is probabilistically unique. >> >> CFUUID includes the MAC address, so unless your MAC address is cloned >> or you man

Re: [iPhone] How to create a unique string

2010-05-13 Thread Michael Ash
On Thu, May 13, 2010 at 11:52 AM, Louis Gerbarg wrote: > On May 13, 2010, at 11:05 AM, Michael Ash wrote: > >> On Thu, May 13, 2010 at 10:56 AM, Thomas Davie wrote: >>> >>> On 13 May 2010, at 15:33, Eric Gorr wrote: >>> So long as it is ok for the string to be unique for the network the use

Re: How to edit/resize embedded graphics and images in a NSTextView ?

2010-05-13 Thread Kyle Sluder
On Thu, May 13, 2010 at 8:38 AM, Anders Sommer Lassen wrote: > Now, I think that I will have to override some methods in the two classes you > mentioned to get the resize handles visible. There are no resize handles. The code simply doesn't exist in the text system. You will be writing quite a

Re: [iPhone] How to create a unique string

2010-05-13 Thread Eric Gorr
On May 13, 2010, at 12:01 PM, Michael Ash wrote: > On Thu, May 13, 2010 at 11:52 AM, Louis Gerbarg wrote: >> On May 13, 2010, at 11:05 AM, Michael Ash wrote: >> >>> On Thu, May 13, 2010 at 10:56 AM, Thomas Davie wrote: On 13 May 2010, at 15:33, Eric Gorr wrote: > So long

Re: Xcode 3.2 - Missing iPhoneOS 2.2.1

2010-05-13 Thread Nick Zitzmann
On May 13, 2010, at 9:47 AM, Patrick M. Rutkowski wrote: > Is it just me, or is Xcode 3.2 missing the 2.2.1 version of the iPhone SDK? You're correct. > Can that be remedied somehow? If you can go back to Leopard and the older SDK. Otherwise, no. > Or is Apple intentionally dropped support th

Re: Xcode 3.2 - Missing iPhoneOS 2.2.1

2010-05-13 Thread Clark Cox
On Thu, May 13, 2010 at 8:47 AM, Patrick M. Rutkowski wrote: > Is there a better list to be posting iPhone questions to? The forums at https://devforums.apple.com/ are the proper place (and the *only* place for content that is under NDA). -- Clark S. Cox III clarkc...@gmail.com

Re: Finder refresh issue in Mac OS 10.5

2010-05-13 Thread Sachin Porwal
Hi James, Thanks for your help provided. I tried to use the function provided, but it didn't help much. The symbolic link is not getting refreshed & still shows the broken target path. I noticed that if i browse the complete target path in finder before launching the .app thru symlink, it works fi

Filling a drawer (Core Data and a newbie problem)

2010-05-13 Thread Paul Johnson
I have a Core Data application with a drawer. The drawer contents is an array that I want to initialize from a file created by a Core Data Command Line tool. In applicationDidFinishLaunching: I have set up the Managed Object Context. I've initialized the Persistent Store Coordinator, read the .mo

Re: Unable to find Categories referenced from Static Library containing in another Static Library

2010-05-13 Thread Jens Alfke
On May 13, 2010, at 2:51 AM, Symadept wrote: Here it crashes with error unreference. I don't know what that means. What exactly is the error message? (It's always better to quote actual error messages.) —Jens___ Cocoa-dev mailing list (Cocoa-de

CocoaHeadsNYC TONIGHT (Thursday), 6PM

2010-05-13 Thread Andy Lee
Alex McAuley will give a talk entitled "You're a Tool If You Don't Use Instruments." As usual: (1) Please feel free to bring questions, code, and works in progress. We have a projector and we like to see code and try to help. (2) We'll have burgers and beer afterwards. (3) If there's a topic yo

CocoaHeads Utah Tonight (Thursday), 7pm

2010-05-13 Thread Dave DeLong
Reed Olsen will be presenting on xiblessness (how to write apps without xibs). We'll be meeting in room W110 of the Tanner building on BYU campus (http://map.byu.edu/?building=tnrb) from 7 to 9 pm. Parking is free. See you there! Dave smime.p7s Description: S/MIME cryptographic signature

Re: Filling a drawer (Core Data and a newbie problem)

2010-05-13 Thread Quincey Morris
On May 13, 2010, at 10:25, Paul Johnson wrote: > In applicationDidFinishLaunching: I have set up the Managed Object Context. > I've initialized the Persistent Store Coordinator, read the .mom file, and > near as I can tell I've set everything up as I'm supposed to. > > Now in Interface Builder I'

Figuring out what's causing redrawing

2010-05-13 Thread Nick Zitzmann
I've tried searching around but haven't found an answer to this. I have several views that are being constantly & apparently needlessly redrawn and I can't figure out why this is happening. How do I catch the culprit that is causing the views to be redrawn? The redrawing is appearing in the usua

Re: How to edit/resize embedded graphics and images in a NSTextView ?

2010-05-13 Thread Anders Sommer Lassen
Thanks, I think this was helpful. On May 13, 2010, at 6:02 PM, Kyle Sluder wrote: > On Thu, May 13, 2010 at 8:38 AM, Anders Sommer Lassen > wrote: >> Now, I think that I will have to override some methods in the two classes >> you mentioned to get the resize handles visible. > > There are no r

Notification of unmount events

2010-05-13 Thread BJ Homer
I'm trying to detect disk mount/unmount notifications from a Foundation tool. Previous questions to this list (e.g. http://lists.apple.com/archives/cocoa-dev/2007/Jan/msg01170.html) on this topic have suggested the DiskArbitration framework, which I am using. The DiskArbitration framework has a nu

Re: [iPhone] Frustrated by a simple task

2010-05-13 Thread WT
On May 13, 2010, at 12:39 AM, Ricky Sharp wrote: > Splash screens should be avoided at all costs in iPhone OS apps. Remember > that you want the app to launch as quickly as possible and let the user > immediately begin doing tasks. Splash screens are typically only useful when > a desktop app

selecting a "sub" icon from an icns file

2010-05-13 Thread John Stoneham
With Icon Composer, you can have 5 separate images for the 5 icon sizes. Cool. So I've got an icns file set up as my application icon, and I'd like to use of the smaller "sub" icons in it for an NSAlert message. Problem is I can't seem to figure out a way to do this. Anyone have any suggestions? __

Re: selecting a "sub" icon from an icns file

2010-05-13 Thread Jens Alfke
On May 13, 2010, at 3:32 PM, John Stoneham wrote: With Icon Composer, you can have 5 separate images for the 5 icon sizes. Cool. They're supposed to be conceptually the same image, just tweaked for better legibility at different sizes. (16 and 32 pixel icons often look blurry if they're

NSArrayController Undo

2010-05-13 Thread Richard Somers
Consider a Core Data document based application that uses a NSArrayController. When the selected objects are removed or deleted and then the user does an undo the selected objects are restored but the selection is not. I have a custom view object. I would like the state of the selection to

new to cocoa

2010-05-13 Thread Alejandro Marcos Aragón
Hi all, I'm new to Cocoa, and I couldn't find information about an error that I'm getting on the web. I'm trying to create an NSMutableDictionary where the keys are of type UIButton*: // create button for unit UIButton* unitButton = [[UIButton al

iPhone: viewDidAppear called, Default.png still visible

2010-05-13 Thread sebi
Hello, How can I find out if my first view is up and running? When viewDidAppear is called on my fist UIViewController I'm still looking only at the Default.png. What I do first in my app is: 1. wait for viewDidAppear to be called 2. show some wait-indicator 3. load some data from the net 4. hid

iPad interface orientation basics

2010-05-13 Thread sebi
hello, sorry, this is probably a very simple thing, but i am quite puzzled right now. when i do this in my view controller: - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { CGSize size = self.view.frame.size; NSLog(NSStringFromCGSize(

AsyncUdpSocket: Receiving duplicate UDP Packet

2010-05-13 Thread Todd Burch
Hi all, I am using the AsyncUdpSocket class from the AsyncSocket library (http://code.google.com/p/cocoaasyncsocket/) to receive UDP packets. I'm early in development, and all I'm doing is receiving a UDP packet over a given port, and logging it to the console. However, for some reason my UDP

Re: simple CATextLayer scaling problem

2010-05-13 Thread Scott Anguish
On May 10, 2010, at 7:35 PM, Kyle Sluder wrote: > On Mon, May 10, 2010 at 3:45 PM, douglas welton > wrote: >> I would suggest that you use KVO to observe the value of the bounds property >> of your layer. When you are notified of the property change, compute the >> new size for your font at t

Re: new to cocoa

2010-05-13 Thread Dave DeLong
Yes, you cannot use UIButton's as keys in a dictionary, because keys in a dictionary are copied, and buttons are not copyable. Here's the better question: what are you trying to do? Using buttons as keys in a dictionary seems... odd. Cheers, Dave On May 11, 2010, at 2:36 PM, Alejandro Marco

Re: new to cocoa

2010-05-13 Thread Kiel Gillard
On 12/05/2010, at 6:36 AM, Alejandro Marcos Aragón wrote: > Hi all, > > I'm new to Cocoa, and I couldn't find information about an error that I'm > getting on the web. I'm trying to create an NSMutableDictionary where the > keys are of type UIButton*: > > > // create but

Re: NSArrayController Undo

2010-05-13 Thread Quincey Morris
On May 13, 2010, at 21:20, Richard Somers wrote: > Consider a Core Data document based application that uses a > NSArrayController. When the selected objects are removed or deleted and then > the user does an undo the selected objects are restored but the selection is > not. I have a custom vie

Re: new to cocoa

2010-05-13 Thread Ken Thomases
On May 13, 2010, at 11:38 PM, Kiel Gillard wrote: > This most certainly is happening because you cannot use UIButton objects as > keys in a dictionary because NSDictionary copies the objects used as keys. > Furthermore, UIButton does implement the NSCopying methods. I assume you meant "does _no

Re: new to cocoa

2010-05-13 Thread Kiel Gillard
On 14/05/2010, at 3:15 PM, Ken Thomases wrote: > On May 13, 2010, at 11:38 PM, Kiel Gillard wrote: > >> This most certainly is happening because you cannot use UIButton objects as >> keys in a dictionary because NSDictionary copies the objects used as keys. >> Furthermore, UIButton does implem

Noise in CALayer

2010-05-13 Thread Chaitanya Pandit
I'm playing with cover flow in one of my apps with the "CovertFlow" sample code from apple (http://www.letscocoa.com/CovertFlow.zip) However, sometimes i see a weird noise kinda thing in the shadows, here is a snapshot: http://cl.ly/17ci Any idea what might be going wrong? Thanks, Chaitanya Pa

Re: Noise in CALayer

2010-05-13 Thread Bertrand Landry-Hetu
By the looks of that screen shot I'd suggest you had a look at the bitmap used to fade out the reflection, there is probably a semi transparent gradient being drawn on top of a uninitialized image buffer. The easiest way to fix this is to fill it with [NSColor clearColor] before drawing the gradien

Re: iPad interface orientation basics

2010-05-13 Thread David Duncan
On May 12, 2010, at 12:52 PM, sebi wrote: > hello, > > sorry, this is probably a very simple thing, but i am quite puzzled right now. > > when i do this in my view controller: > > - > (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation > { > CGSize