RE: php and cocoa

2010-09-21 Thread Rufat A. Abdullayev
Hi Douglas Here is the example of how to send HTTP request with parameters from cocoa http://deusty.blogspot.com/2006/11/sending-http-get-and-post-from-cocoa.html just make a php script on web server side that reads POST/GET variables sent from cocoa application and output desirable content

NSRunLoop behavior

2010-09-21 Thread Rafael Cerioli
Hi, I'm trying to understand how run loops work. I've written this useless piece of code and I'm not sure why success does not show up... What happens is that waitUntilReady never terminates, because it seems that the runUntilDate in myButtonAction never ends as well. My theory would be that

Lyrics in an application

2010-09-21 Thread Eric E. Dolecki
I'm new to trying this, but I am working on an app specific to a band and one of the features is the ability to browse albums, click on a song for that album and ultimately get the lyrics for that track. However I see that LyricWiki only allows a small portion of the lyrics to be returned via

RE: Lyrics in an application

2010-09-21 Thread Luca Ciciriello
Hi. I've found that SQLite is very useful in this kind of Mac|iPhone|iPad applications. Is easy to use, fast and can contain a huge quantity of data in a single not to big file. Using Google you can find many examples how to use in Xcode SQLite and Objective-C. This one:

Re: NSRunLoop behavior

2010-09-21 Thread Keary Suska
On Sep 21, 2010, at 5:55 AM, Rafael Cerioli wrote: Hi, I'm trying to understand how run loops work. I've written this useless piece of code and I'm not sure why success does not show up... What happens is that waitUntilReady never terminates, because it seems that the runUntilDate in

Re: Toolbar Item -Menu Form Representation - Key Equivalent

2010-09-21 Thread Richard Somers
On Sep 20, 2010, at 9:08 PM, Richard Somers wrote: The key equivalent will not work for a toolbar item, menu form representation. AppKit apparently does not let toolbar menu form representations respond to key equivalents. The work around is to call 'performKeyEquivalent:' yourself.

Animated mask for UIViews?

2010-09-21 Thread Eric E. Dolecki
I have a SWF that was created where masks are being animated. Now I was asked to do the same thing for an iPhone application. Can one easily apply a mask to a UIView and animate it's dimensions? I have about 6 UIViews that stack on top of each other (staggered), and hopefully masks might be used

Re: Toolbar Item -Menu Form Representation - Key Equivalent

2010-09-21 Thread Kyle Sluder
On Tue, Sep 21, 2010 at 7:07 AM, Richard Somers rsomers.li...@infowest.com wrote: AppKit apparently does not let toolbar menu form representations respond to key equivalents. The work around is to call 'performKeyEquivalent:' yourself. The real solution is to not create toolbar items without

Access object from another view

2010-09-21 Thread Steve Wetzel
How do I access and object on one view from another view? I cannot figure it out. I have two view controllers and two views. Lets call them viewController1 and viewController2 and view1 and view2. ViewController1 loads the second view by: [self.view addSubview:viewController2.view]; There

Re: Access object from another view

2010-09-21 Thread Quincey Morris
On Sep 21, 2010, at 11:57, Steve Wetzel wrote: How do I access and object on one view from another view? I cannot figure it out. I have two view controllers and two views. Lets call them viewController1 and viewController2 and view1 and view2. ViewController1 loads the second view

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
I hope I am replying correctly, I am new at this. The text in label1 is set with the setText method when the view is loaded. What I am trying to achieve is putting some text whose value is in a label on view1 into a label on view2 (called label2). I was hoping to do with with something likeā€¦

Re: Access object from another view

2010-09-21 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/21/10 11:57 AM, Steve Wetzel wrote: How do I access and object on one view from another view? I cannot figure it out. I have two view controllers and two views. Lets call them viewController1 and viewController2 and view1 and view2.

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
Thanks Everyone. I could not get the [self.viewController1.label2.text or the [self view addSubview:viewController2.view]; to work for some reason. Then it dawned on me that I could set the value right before I added the Subview! [viewController2.label2 setText:label1.text]; [self.view

Re: Toolbar Item -Menu Form Representation - Key Equivalent

2010-09-21 Thread Richard Somers
On Sep 21, 2010, at 11:54 AM, Kyle Sluder wrote: The real solution is to not create toolbar items without corresponding menu items, as per the HIG: ... This has the added benefit of making it possible to use the inline search field in the Help menu to find and activate the menu item. True,

AXUIElementPostKeyboardEvent and Carbon applications

2010-09-21 Thread AstroK Software
Hi, sorry if it's not exactly a Cocoa question, but my application is written in Cocoa and it uses Carbon calls to accessibility functions. So I am writing a Cocoa application for disabled that must be able to send key presses to background application. For that I am using

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
I think that is what I did with the line [viewController2.label2 setText:label1.text]; Then [self.view addSubView:viewController2.view]; brings up the subview. The only problem is that the text in label two is not displayed correctly until I release and reload the view. I have a button to

Re: Animated mask for UIViews?

2010-09-21 Thread Alexander Spohr
What kind of masks? Bitmaps? Then use UIImageView and transparency. Vectors? UIBezierPath and CGBlendMode might help. atze Am 21.09.2010 um 17:22 schrieb Eric E. Dolecki: I have a SWF that was created where masks are being animated. Now I was asked to do the same thing for an iPhone

Re: Animated mask for UIViews?

2010-09-21 Thread Eric E. Dolecki
square masks that i'd animate - squish, elongate, etc. 6 masks - 1 per UIView. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Tue, Sep 21, 2010 at 6:11 PM, Alexander Spohr a...@freeport.de wrote: What kind of

Re: AXUIElementPostKeyboardEvent and Carbon applications

2010-09-21 Thread Eric Schlegel
On Sep 21, 2010, at 2:41 PM, AstroK Software wrote: So I am writing a Cocoa application for disabled that must be able to send key presses to background application. For that I am using AXUIElementPostKeyboardEvent which works quite fine, except when I want to send key presses to Carbon

NSOperation and threadDictionary

2010-09-21 Thread Rick Mann
Does iOS (and Mac OS X) clean up thread-local storage upon the completion of an NSOperation? It seems dangerous to rely on every operation to clean up its own mess. It also seems that an NSOperation should be able to pretend that it owns the thread on which it's running, and not have to worry

Re: Access object from another view

2010-09-21 Thread Quincey Morris
On Sep 21, 2010, at 14:03, Steve Wetzel wrote: I could not get the [self.viewController1.label2.text or the [self view addSubview:viewController2.view]; to work for some reason. Then it dawned on me that I could set the value right before I added the Subview!

Re: Access object from another view

2010-09-21 Thread mmalc Crawford
On Sep 21, 2010, at 2:49 pm, Steve Wetzel wrote: Then [self.view addSubView:viewController2.view]; brings up the subview. You should [almost certainly] not be doing this. If you want to display another view controller's view, you should use an appropriate technique to present the view

Re: Access object from another view

2010-09-21 Thread Steve Wetzel
I thought I had tried putting the setText statement after the addSubView but I went back and tried it again and it worked. Thanks for the suggestion. I cannot simply use IB to put the same label text in as the text label is calculated from user input. Thanks! Steve On Sep 21, 2010,

Re: GC, plain C structs, and when to use __strong

2010-09-21 Thread Quincey Morris
On Sep 21, 2010, at 15:37, Sean McBride wrote: If I have a plain C struct that contains some Obj-C object pointers like: struct { int boring; NSString* string; } MyStruct What must I do to be safe in GC? a) I know I must allocate my structs using NSAllocateCollectable and

Need functionality of CAShapeLayer in 10.5

2010-09-21 Thread Kenneth Baxter
Hi all, I had gone through my initial design for a project I am working on and one part of it really needs to use CAShapeLayer, but I just realized that it's only available in 10.6+, and I have to support 10.5. Essentially I have two layers that have a bezier path drawn between them. The two

Re: Need functionality of CAShapeLayer in 10.5

2010-09-21 Thread David Duncan
On Sep 21, 2010, at 5:02 PM, Kenneth Baxter wrote: Any suggestions would be most welcome. With a requirement of 10.5, about all you can do is call -setNeedsDisplay from a timer to implement the animation yourself, unless your path can be animated well enough by just stretching/squeezing the

Re: Need functionality of CAShapeLayer in 10.5

2010-09-21 Thread Kenneth Baxter
OK, thanks for that David - I'll take that route then. On 22 Sep, 2010,at 10:32 AM, David Duncan david.dun...@apple.com wrote: On Sep 21, 2010, at 5:02 PM, Kenneth Baxter wrote: Any suggestions would be most welcome. With a requirement of 10.5, about all you can do is call -setNeedsDisplay

Re: One last try: how do you make a bookmark bar like Safari?

2010-09-21 Thread Brad Stone
These are all great resources. Thanks On Sep 20, 2010, at 6:08 PM, John Nairn wrote: On Sep 20, 2010, at 12:02 PM, cocoa-dev-requ...@lists.apple.com wrote: I sent this out last week and go no replies. Please excuse me for sending it out again but I want to try one more time in case

Re: Need functionality of CAShapeLayer in 10.5

2010-09-21 Thread Kenneth Baxter
Just a quick question about this - I notice that you say to use a timer which I presume you say deliberately rather than using the automatic needsDisplay and recalculating during display. The way I was thinking of doing it would have resulted in the recalculation of the path during the

Re: Need functionality of CAShapeLayer in 10.5

2010-09-21 Thread David Duncan
On Sep 21, 2010, at 6:14 PM, Kenneth Baxter wrote: Just a quick question about this - I notice that you say to use a timer which I presume you say deliberately rather than using the automatic needsDisplay and recalculating during display. The automatic -needsDisplayOnBoundsChange will cause

Re: What's the point of @properties?

2010-09-21 Thread Matt Neuburg
On Sun, 19 Sep 2010 13:29:20 -0700, Bill Bumgarner b...@mac.com said: - synthesis just works (pretty much every attempt at hand-rolled atomicity I've seen has been wrong or bog slow) And even if properties did nothing for me beyond writing my accessors for me, it would still be worth it. They

Re: Animated mask for UIViews?

2010-09-21 Thread Matt Neuburg
On Tue, 21 Sep 2010 11:22:06 -0400, Eric E. Dolecki edole...@gmail.com said: Can one easily apply a mask to a UIView and animate it's dimensions? One can easily apply a mask to a layer, and since all drawing (even a view's drawing) is actually a layer, that's the same thing. And one can animate

Re: How to double tap event on a UIButton

2010-09-21 Thread Matt Neuburg
On Mon, 20 Sep 2010 06:38:32 +0200, Jonathan Chac?n tyflos2...@gmail.com said: What can I manage the double tap gesture on a UIButton? Make a view that *looks* like a button and use gesture recognizers. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool +

Re: How to double tap event on a UIButton

2010-09-21 Thread Matt Neuburg
On Mon, 20 Sep 2010 06:38:32 +0200, Jonathan Chac?n tyflos2...@gmail.com said: What can I manage the double tap gesture on a UIButton? Or (still carrying on from my previous note, sorry) use the technique shown in the docs: on the first tap, start a delayed performance to do the single-tap

Re: NSRunLoop behavior

2010-09-21 Thread Rafael Cerioli
Ok, thank you for your answer. So, you are telling me that [self performSelector:@selector(waitUntilReady) withObject:nil afterDelay:1] is an input source ? What exactly is the input source, my selector or the timer that when fired, will call my selector ? I thought sources were like timers

NSTextView

2010-09-21 Thread albert jordan
Greetings, I'm having a problem with NSTextView, and I'm wondering if anyone can help verify the source of the problem and suggest alternatives. I'm trying to develop an automated test program for Android handsets. I can connect two Android handsets to my MAC, and among other things, I would

Re: Animating a non-standard layer property

2010-09-21 Thread Scott Anguish
can you please file a bug on this? custom animations are missing at the moment (sadly) but adding that and the @dynamic would be a very useful bug. On Sep 20, 2010, at 7:24 PM, Kenneth Baxter wrote: Brilliant! Works now, thanks David. Is there somewhere I can find out more about this? It

Instance an from an NSString Class name

2010-09-21 Thread koko
Given an NSString which is the name of a class what voodoo do I perform to create an instance of that class? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Instance an from an NSString Class name

2010-09-21 Thread Stephen J. Butler
On Tue, Sep 21, 2010 at 11:01 PM, k...@highrolls.net wrote: Given an NSString which is the name of a class what voodoo do I perform to create an instance of that class? Use NSClassFromString(). ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Instance an from an NSString Class name

2010-09-21 Thread Roland King
NSClassFromString A method I always have trouble remembering and never find when I search. On Sep 22, 2010, at 12:01, k...@highrolls.net wrote: Given an NSString which is the name of a class what voodoo do I perform to create an instance of that class? -koko

Re: Instance an from an NSString Class name

2010-09-21 Thread koko
Thanks! Now I have: NSString *class = [NSString stringWithCString:[data bytes] encoding:NSASCIIStringEncoding]; Class obstacle = NSClassFromString(class); id thisObstacle = [[obstacle alloc] initWithImage:[sender draggedImage] andLocation:[sender draggingLocation]];

Re: Instance an from an NSString Class name

2010-09-21 Thread Jerry Krinock
On 2010 Sep 21, at 21:21, k...@highrolls.net wrote: However, must I retain [sender draggedImage] so the code becomes: id thisObstacle = [[obstacle alloc] initWithImage:[[sender draggedImage] retain] andLocation:[sender draggingLocation]]; No. Your 'obstacle' should retain its 'image' as

Re: Instance an from an NSString Class name

2010-09-21 Thread Seth Willits
On Sep 21, 2010, at 9:21 PM, k...@highrolls.net wrote: NSString *class = [NSString stringWithCString:[data bytes] encoding:NSASCIIStringEncoding]; Class obstacle = NSClassFromString(class); id thisObstacle = [[obstacle alloc] initWithImage:[sender

i5/i7 w/External 24 LED Cinema identifying screens - testing help

2010-09-21 Thread Trygve Inda
Does anyone here have the above set up... And are willing to test a small app to retrieve display information? Since these machines have two processors for video, the CGDirectDisplayID is not unique any longer and we are looking for ways to uniquely identify a screen. Please contact me off list.

Re: Instance an from an NSString Class name

2010-09-21 Thread koko
Word up to Seth and Jerry! I'll be a Cocoa engineer yet! -koko On Sep 21, 2010, at 11:07 PM, Seth Willits wrote: On Sep 21, 2010, at 9:21 PM, k...@highrolls.net wrote: NSString *class = [NSString stringWithCString:[data bytes] encoding:NSASCIIStringEncoding]; Class