[ANN] Cocoa Talk

2010-06-06 Thread Development
Cocoa Talk is a brand new video blog on cocoa. Check it out at http://cocoatalk.libsyn.com/ This episode concerns UIViews and touches. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: changing NSTextView text colour

2010-06-06 Thread Michael Ash
On Sun, Jun 6, 2010 at 10:21 AM, James Maxwell wrote: > I have a NSTextView that's displaying MIDI info from my app's current MIDI > input device. I show this info in a couple of places - one is in a "MIDI > Setup" type window, and the other is in an Inspector window. I want the > Inspector win

Re: NSTableView action & doubleAction...

2010-06-06 Thread Matthew Weinstein
Actually I'm really happy it does both; I just want to count on it doing both. In my case it is really important that the single click do something before the 2nd click. I want users to be able to single click without triggering the subsequent action, the double click takes the single click and

Re: NSTableView action & doubleAction...

2010-06-06 Thread Matt Neuburg
On Sun, 6 Jun 2010 18:12:07 -0700, Matthew Weinstein said: >I set both my tableView's actions and doubleActions programmatically in my document's windowdidloadnib... I find that if I double click It calls both! You're doing both. :) The only way to tell the difference is to delay after the first

Re: Notification of window visible?

2010-06-06 Thread Chris Idou
Is it? Can't a window become visible without becoming key? - Original Message From: Reinhard Segeler To: Chris Idou Cc: cocoa-dev@lists.apple.com Sent: Fri, 4 June, 2010 4:18:03 PM Subject: Re: Notification of window visible? The notification NSWindowDidBecomeKeyNotification will do

Re: changing NSTextView text colour

2010-06-06 Thread James Maxwell
hmm... okay. I get what you're saying about range, and I did wonder about that, but it seems strange to be required to always set it by range, for each line. Shouldn't there just be a single, persistent setting -- a default, as it were? I'll look at the typingAttributes, but this text is being s

NSTableView action & doubleAction...

2010-06-06 Thread Matthew Weinstein
Dear Programmers, I set both my tableView's actions and doubleActions programmatically in my document's windowdidloadnib... I find that if I double click It calls both! Is this expected behavior? Is there a method to this madness? Matthew Weinstein Associate Professor of Science Education Educat

Re: changing NSTextView text colour

2010-06-06 Thread James Maxwell
Well, yes, I figured as much... just grasping at straws, really. What I don't get is why using the "Text" colour panel in IB doesn't actually set the text colour for the text view. Strange. Seems wildly counter-intuitive, to me. Anyway, I am able to get the text colour changed, it's just this an

Problems with Pinyin Simplified Chinese text input

2010-06-06 Thread Gideon King
Hi, I have a "canvas" view which has a whole lot of text views as subviews. When a person types a letter while the canvas is the first responder, I want to change the first responder to the appropriate text view and replace anything in that text view with the letter typed. In my canvas view, I

Re: changing NSTextView text colour

2010-06-06 Thread Ross Carter
On Jun 6, 2010, at 1:21 PM, James Maxwell wrote: > I have a NSTextView that's displaying MIDI info from my app's current MIDI > input device. I show this info in a couple of places - one is in a "MIDI > Setup" type window, and the other is in an Inspector window. I want the > Inspector window t

Re: changing NSTextView text colour

2010-06-06 Thread Graham Cox
On 07/06/2010, at 3:21 AM, James Maxwell wrote: > Do I have to have the controller hold a reference to the text view, rather > than just using an outlet? I don't know the answer to the problem, but just to pick up on this one - an outlet IS a reference to the object it's connected to, nothing

Re: Cross XIB references?

2010-06-06 Thread Graham Cox
On 07/06/2010, at 8:17 AM, Jean-François Brouillet wrote: > Since I have been convinced that > even trying to share the image _bits_ was futile, I won't attempt this > anymore. Sharing the image BITS is not futile, but is not accomplished by referencing objects cross-nib. NSImage will cache a

Re: Cross XIB references?

2010-06-06 Thread Jean-François Brouillet
Thank you all for hammering this down, maybe I needed it :) I completely forgot about the unique superview thing, and didn't know about the actual bit sharing that UIImage could perform, both of which do settle my use case as a no-no. Thanks. >> Now in *another* nib file I have *another* control

SQLite Database 2 distinct database iphone.

2010-06-06 Thread Sandro Noël
Greetings. I'm building a iPhone application which is database driven. in that application i've designed it to have two databases. One database will be distributed with the application and is meant to be read only. the second database is meant to copy items to it for the user's safe keeping. the

Re: registering dragged types

2010-06-06 Thread Jens Alfke
On Jun 6, 2010, at 12:25 PM, ronald b. kopelman wrote: > However, changing the line: > >> [self registerForDraggedTypes: [NSArray arrayWithObject: >> NSFilenamesPboardType]]; > > to > > [self registerForDraggedTypes:[NSArray > arrayWithObjects:NSFilenamesPboardType, nil]]; > > might h

Re: NSTextField sending action unbidden...

2010-06-06 Thread Jens Alfke
On Jun 6, 2010, at 12:14 PM, Matthew Weinstein wrote: > I have a textfield which is spontaneously sending out an action. I have it > set to "send on end editing" but when the nib loads and I click on any part > of the window it sends an action which then messes up other stuff… Hm. “Send on en

Ignore last problem...

2010-06-06 Thread Matthew Weinstein
Sometimes wording confuses: I read "send on enter" as meaning "send on beginning" rather than as the enter key. Mathew ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contac

Re: Cocoa-dev Digest, Vol 7, Issue 621

2010-06-06 Thread ronald b. kopelman
On Jun 5, 2010, at 10:17 PM, cocoa-dev-requ...@lists.apple.com wrote: > I'm new to Cocoa programming. I would like to be able to drag filenames from > Finder to a custom view in my application. Both previous mails and Mr. Google > redirect to Drag and Drop Programming Topics for Cocoa > (http:/

NSTextField sending action unbidden...

2010-06-06 Thread Matthew Weinstein
Dear programmers, I have a textfield which is spontaneously sending out an action. I have it set to "send on end editing" but when the nib loads and I click on any part of the window it sends an action which then messes up other stuff... Is there some value I can set so that it sends on hittin

Re: personalized segmented control, like the copy & paste one

2010-06-06 Thread Kyle Sluder
On Jun 6, 2010, at 11:55 AM, Alejandro Marcos Aragón m> wrote: Hi all, I was trying to find in the documentation if it is possible to use a segmented control like the one used for copy & paste (with a little arrow pointing to the field you're editing), but couldn't find anything. Is it po

personalized segmented control, like the copy & paste one

2010-06-06 Thread Alejandro Marcos Aragón
Hi all, I was trying to find in the documentation if it is possible to use a segmented control like the one used for copy & paste (with a little arrow pointing to the field you're editing), but couldn't find anything. Is it possible to do such a thing? If so, is it difficult to implement? Do I

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Alejandro Marcos Aragón
Hi Matt, thanks for clarifying that. That worked like a charm! I had to override functions: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; But it works just as I want. Thanks again! aa On Jun 6, 2010, at 11:11

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Matt Neuburg
On or about 6/6/10 11:04 AM, thus spake "Scott Andrew" : > You still need that timer. Especially for non 3.2. If you get your > touchEnded before your timer is reached it was just a tap. Right, but my revised solution (which you do not quote) with performSelector and delayed performance *is* ef

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Scott Andrew
You still need that timer. Especially for non 3.2. If you get your touchEnded before your timer is reached it was just a tap. Scott Sent from my iPad On Jun 6, 2010, at 8:54 AM, Alejandro Marcos Aragón wrote: > Hi Matt, > > Thanks for your answer. Still, I don't think that solves the pro

changing NSTextView text colour

2010-06-06 Thread James Maxwell
I have a NSTextView that's displaying MIDI info from my app's current MIDI input device. I show this info in a couple of places - one is in a "MIDI Setup" type window, and the other is in an Inspector window. I want the Inspector window to show this data in light grey text against a dark backgro

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Matt Neuburg
On or about 6/6/10 8:54 AM, thus spake "Alejandro Marcos Aragón" : > If the user just taps the button, a UISegmentedControl appears, thus this > target is in touch up inside. Now, if the user taps and holds, another type of > control appears after a delay so this has to be done in touch down (beca

AUTO: Bill Abt is out of the office. (returning 06/14/2010)

2010-06-06 Thread Bill Abt
I am out of the office until 06/14/2010. I am currently attending WWDC in SF. I will be checking email periodically. If absolutely needed please contact via cell or via my iPhone email, b...@me.com. Note: This is an automated response to your message "Cocoa-dev Digest, Vol 7, Issue 622" sen

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Alejandro Marcos Aragón
Hi Roland, Thanks for answering my question. Shouldn't this be very restrictive though? I don't know the statistics, but I'm pretty sure that there is a large number of people having an old version of the OS. aa On Jun 5, 2010, at 10:04 PM, Roland King wrote: > or if you are coding for 3.2 or

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Alejandro Marcos Aragón
Hi Matt, Thanks for your answer. Still, I don't think that solves the problem. It is not just the difference in time what matters. If the user just taps the button, a UISegmentedControl appears, thus this target is in touch up inside. Now, if the user taps and holds, another type of control app

Re: [iPhone] Preprocessing events sent to UITableView

2010-06-06 Thread Matt Neuburg
On Sun, 6 Jun 2010 10:41:41 +0200, WT said: >question, namely, how to do what I need to do in the safest possible way. I found a solution, but I don't think it's very elegant Sorry if I'm being dense, but did we establish what you *do* need to do? I didn't grasp why you're jumping through all th

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Matt Neuburg
On Sat, 05 Jun 2010 21:34:48 -0700, Matt Neuburg said: >On Fri, 4 Jun 2010 21:16:50 -0500, Alejandro Marcos Arag?n > said: >>I've been trying to detect touch and hold vs touch on a subclass of UIButton. > >I think you want to imitate Listing 3-3 of Event Handling in the iPhone >Application Program

Re: [iPhone] Preprocessing events sent to UITableView

2010-06-06 Thread David Duncan
On Jun 6, 2010, at 1:41 AM, WT wrote: > Yes, I'm aware of that recommendation. I think that's precisely the core of > my question, namely, how to do what I need to do in the safest possible way. I think you need to tell us what the goal you are trying to achieve is, rather than asking how to d

Re: Cross XIB references?

2010-06-06 Thread Matt Neuburg
On Sun, 06 Jun 2010 08:19:06 +0100, Jean-Fran?ois Brouillet said: >I am *NOT* querying about how to create some object graph *programatically*, >but how it is possible, if at all, to "control drag" from one object's outlet >in nib#1 to some other target in nib#2 USING INTERFACE BUILDER. It isn't,

Re: Cross XIB references?

2010-06-06 Thread Graham Cox
This has been dealt with at length, as far as I can tell, but going back to your original post, here's my threepenn'orth... On 06/06/2010, at 7:14 AM, Jean-François Brouillet wrote: > Hi. > > Consider the situation where I have a "root" ImageView in IB. > I specify the actual image I want it t

Re: Cross XIB references?

2010-06-06 Thread Alexander Spohr
Am 05.06.2010 um 23:14 schrieb Jean-François Brouillet: > Consider the situation where I have a "root" ImageView in IB. > I specify the actual image I want it to hold by just filling/ > selecting which of the existing images are already present in the > project, using the "Image" input box of the

Re: Cross XIB references?

2010-06-06 Thread Ken Thomases
On Jun 6, 2010, at 4:34 AM, Jean-François Brouillet wrote: > It would be more effective to just answer "No. What you say you want is not > supported" rather than missing the point. I did say that. I also tried to give you the conceptual grounding so that you could understand why. > This cont

Re: Cross XIB references?

2010-06-06 Thread Jean-François Brouillet
On 6 Jun 2010, at 09:38, Ken Thomases wrote: > On Jun 6, 2010, at 3:12 AM, Jean-François Brouillet wrote: > >> [...] making reference to object id 123 in file one.xib to object id 456 >> in file two.xib should be a walk in the park ... > > You're still not getting it. There are no such objects.

Re: [iPhone] Preprocessing events sent to UITableView

2010-06-06 Thread WT
On Jun 6, 2010, at 2:09 AM, glenn andreas wrote: > On Saturday, June 05, 2010, at 05:51PM, "WT" wrote: >> I need to hijack the set of touch events sent to a UITableView instance >> prior to allowing the table to process those events. >> >> I have a custom UIView, of which the table view is a su

Re: Cross XIB references?

2010-06-06 Thread Ken Thomases
On Jun 6, 2010, at 3:12 AM, Jean-François Brouillet wrote: > [...] making reference to object id 123 in file one.xib to object id 456 > in file two.xib should be a walk in the park ... You're still not getting it. There are no such objects. NIBs are object graph templates, not object graphs.

Re: Cross XIB references?

2010-06-06 Thread Joanna Carter
Le 6 juin 2010 à 09:12, Jean-François Brouillet a écrit : > A few years ago when Spring came out in Java land, I had an "Aha" moment when > I realised that it was just about creating singletons all over the place > (Spring > calls them "beans") without the benefit of a nifty editor, and remember

Re: Cocoa: dragging files from Finder

2010-06-06 Thread Marcin Górski
Yes, you were both right. Once I moved "registerForDraggedTypes" to awakeFromNib method everything runs as it should. Thanks a lot, Marcin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Cross XIB references?

2010-06-06 Thread Jean-François Brouillet
I can see that my question may not be very clear, so I'm taking another angle :) A few years ago when Spring came out in Java land, I had an "Aha" moment when I realised that it was just about creating singletons all over the place (Spring calls them "beans") without the benefit of a nifty editor,

Re: Cross XIB references?

2010-06-06 Thread Ken Thomases
On Jun 6, 2010, at 2:19 AM, Jean-François Brouillet wrote: >> • Subject: Re: Cross XIB references? >> • User-agent: Microsoft-Entourage/12.23.0.091001 >> On Sat, 05 Jun 2010 22:14:22 +0100, Jean-Fran?ois Brouillet >> said: >>> So ... is there a way to refer to NIB1.objA from NIB2.objB ? >> >> Th

Re: Cross XIB references?

2010-06-06 Thread Jean-François Brouillet
> • Subject: Re: Cross XIB references? > • User-agent: Microsoft-Entourage/12.23.0.091001 > On Sat, 05 Jun 2010 22:14:22 +0100, Jean-Fran?ois Brouillet > said: > >So ... is there a way to refer to NIB1.objA from NIB2.objB ? > > This is probably the most FAQ in the entire Cocoa universe, so check