Isolate NSTextView from NSColorWell

2010-06-22 Thread Bernard Knaepen
Hi all, I have a window created in IB containing a NSScrollView embedding a NSTextView. In the same window I have a NSColorWell which is supposed to store the color preference for a given object not related to the NSTextView. I would like to be able to change the color of the NSColorWell withou

Re: sqlite store created on OS X won't open on iOS

2010-06-22 Thread Jonathan Fewtrell
On 23 Jun 2010, at 12:41, Jonathan Fewtrell wrote: > I created an sqlite store using a Core Data OS X application. > > Using the same managed object model, my Core Data iOS app cannot open the > store and gives the message: "The model used to open the store is > incompatible with the one used

Re: Core Data can't do Distinct Relationships to Same Entity

2010-06-22 Thread Jerry Krinock
I just factored out the Abstract Entity, since this approach better models the actual data in my real app. Thanks in advance to Roland and Glenn. I say "in advance" because a more realistic data model is often not appreciated until version 2.0, but then you're very happy you've got it! __

sqlite store created on OS X won't open on iOS

2010-06-22 Thread Jonathan Fewtrell
I created an sqlite store using a Core Data OS X application. Using the same managed object model, my Core Data iOS app cannot open the store and gives the message: "The model used to open the store is incompatible with the one used to create the store". Is there any reason why an iPhone app sh

Re: Initiating drag and drop from NSToolbarItem

2010-06-22 Thread Gideon King
Perfect, thanks Peter. I knew there was something like that, and had searched for canDrag, but hadn't thought of canMove... Gideon On 23/06/2010, at 12:12 PM, Peter Ammon wrote: > > Sounds like you want to override -mouseDownCanMoveWindow to return NO. > _

Auto-hide the window

2010-06-22 Thread Dong Linlan
Hi there, I want to make my window make my window auto-hided and when the cursor move to the edge of the screen it will show. Just like the effect of QuickSilver's Shelf plugin. I google and found nothing useful. Should I run my app as an daemon and detect the global mouse event? __

iOS4: UDP sockets in the background

2010-06-22 Thread Angelica Grace Tanchico
Hello, Can the new iOS 4 maintain UDP socket connection in the background? Or is it only TCP? Thanks in advance! Regards, Angie _ Hotmail: Free, trusted and rich email service. https://s

Re: Core Data can't do Distinct Relationships to Same Entity

2010-06-22 Thread Roland King
Why don't you have a property 'arms' which is a to-many property? If you want to find a specific arm from the body you can iterate the arms looking for the one you want, or in the generic case use a predicate to find it for you. That also scales well when you put Hindu Gods (or Venusians) into

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
>> I don’t understand what this means. What are you asking for? i am pointing out that there is a giant, giant, giant difference between plugins that impose themselves on the user and those that are invoked because the user wants them. all of the security stuff you are talking about is appropriate

Re: Initiating drag and drop from NSToolbarItem

2010-06-22 Thread Peter Ammon
On Jun 22, 2010, at 6:56 PM, Gideon King wrote: > Hi, I have a toolbar item that I want to use for having an item that I drag > onto my main view. I can initiate the drag from my custom view, but the > window gets moved by the mouse down/dragged. I'm sure this will be trivial, > but can't thin

Core Data can't do Distinct Relationships to Same Entity

2010-06-22 Thread Jerry Krinock
Say that I'm modelling a human body. Each body has two arms, and I model them with the same entity; one has, maybe, setFlipped:YES and the other has setFlipped:NO. But they are accessed for different purposes; sometimes I want the left arm and sometimes the right arm. I'd therefore like to se

Initiating drag and drop from NSToolbarItem

2010-06-22 Thread Gideon King
Hi, I have a toolbar item that I want to use for having an item that I drag onto my main view. I can initiate the drag from my custom view, but the window gets moved by the mouse down/dragged. I'm sure this will be trivial, but can't think of how to do this...I've overridden mouseDown: and mouse

Using Field Editor correctly in custom NSCell

2010-06-22 Thread Graham Cox
I have a custom cell that displays a text label, which can be edited. The code for this custom cell is something I found on the net already written - I'll protect the guilty by not saying whose it is, but the text editing part doesn't work correctly, so I need to fix it. What happens is that the

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 5:28 PM, Bill Appleton wrote: > so different vendors whip out "security" for different reasons. on mac, it is > to prevent browser crashes, thus the separate process. on windows, it is all > about preventing system corruption, thus protected mode This isn’t a Windows thing.

Re: iOS4: CFReadStream and background operation

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 5:21 PM, John Michael Zorko wrote: > 2. However, CFReadStreams created _while_ the app was in the background often > (though not always) _don't_ call their callbacks _until_ the app is brought > in the foreground, then all of a sudden the callback happens. I think foregroun

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
so different vendors whip out "security" for different reasons. on mac, it is to prevent browser crashes, thus the separate process. on windows, it is all about preventing system corruption, thus protected mode -- which is especially funny, because you are limited in where you can WRITE a file but

iOS4: CFReadStream and background operation

2010-06-22 Thread John Michael Zorko
Hello, all ... I've an app that reads from the network using CFReadStream (it needs to use CFReadStream so that it can throttle the connection and specify how many bytes to read each time). What i'm finding is that CFReadStream callbacks aren't always called when the app is in the background.

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 4:47 PM, Bill Appleton wrote: > this IS sandboxed --- its in a separate process That’s not what “sandboxed” means. It refers to a process that’s running with reduced privileges, i.e. it only gets to “play in the sandbox” without having full access to the computer. For examp

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
then what will you be able to do? nothing? compare what is possible on windows and mac, they can't get too far out of line. this IS sandboxed --- its in a separate process On Tue, Jun 22, 2010 at 4:02 PM, Jens Alfke wrote: > > On Jun 22, 2010, at 2:40 PM, Charles Srstka wrote: > > You get a se

Re: programmatically create email using specified account

2010-06-22 Thread Fritz Anderson
On 21 Jun 2010, at 11:44 PM, James Udo Ludtke wrote: > In addition to the three arguments "mailto:";, "?subject=", and "&body=", is > there a 4th argument to set the from account? The mailto: URL scheme has a specification (RFC 2368): In the instructions

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 2:40 PM, Charles Srstka wrote: > You get a separate process for your plug-in, but there is no guarantee that > that process will have a full Cocoa environment running. You are recommended > to use only plug-in APIs as much as possible, and not to spawn new windows. Yup. The

programmatically create email using specified account

2010-06-22 Thread James Udo Ludtke
I just converted an AppleScript, which I used from within a cocoa application, into Objective C, for use in xCode 3.2.2. I programmatically create the to address, subject, and body based on sample code using: mailto:d...@apple.com""?subject=Hello%20Cruel%20World!""&body=Share%20and%20Enjoy";];

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 4:36 PM, Bill Appleton wrote: > all that stuff in the docs you mention is about interacting with the browser > > now the browser is a whole separate application, its talking to the > WebKitPluginHost through ports > > so thats what they are talking about -- if you want a pop

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
all that stuff in the docs you mention is about interacting with the browser now the browser is a whole separate application, its talking to the WebKitPluginHost through ports so thats what they are talking about -- if you want a popup menu on the browser screen you have to call their API but in

Re: can we have own application logo for ad-hoc release.

2010-06-22 Thread Bryan Henry
A legitimate distribution channel with a max of 100 users per year? That's a pretty limited market. Ad hoc exists or beta testing, app reviewer copies (along with promo codes), and other such things. Apple had taken steps in the past to limit the utility of Ad Hoc as a distribution mechanism tha

Re: Compile Error: undeclared (first use in this function) --> While Init'ing an Object

2010-06-22 Thread Chris Tracewell
On Jun 22, 2010, at 2:11 PM, Kyle Sluder wrote: > On Tue, Jun 22, 2010 at 2:03 PM, Chris Tracewell wrote: >> I have my own custom framework. The framework builds fine but when I link to >> it in one of my projects one class is causing a compile error of... >> >> 'MyClass' undeclared (first use i

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 4:14 PM, Bill Appleton wrote: > Not sure I understand all the issues but this should be good news for Cocoa > lovers: > > 1) When Safari runs as 64 bit it loads and runs a 32 bit or 64 bit Cocoa > NPAPI plugin just fine. The 32 bit version of Safari will only run 32 bit > N

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
Hi All, Not sure I understand all the issues but this should be good news for Cocoa lovers: 1) When Safari runs as 64 bit it loads and runs a 32 bit or 64 bit Cocoa NPAPI plugin just fine. The 32 bit version of Safari will only run 32 bit NPAPI plugins. 2) The exact same 32 bit plugin for Safari

Re: Compile Error: undeclared (first use in this function) --> While Init'ing an Object

2010-06-22 Thread Kyle Sluder
On Tue, Jun 22, 2010 at 2:03 PM, Chris Tracewell wrote: > I have my own custom framework. The framework builds fine but when I link to > it in one of my projects one class is causing a compile error of... > > 'MyClass' undeclared (first use in this function) > > This occurs when I am trying to in

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Corbin Dunn
On Jun 21, 2010, at 11:09 AM, Bill Appleton wrote: > Hi All, > > In 64 bit Safari our NPAPI plugin needs to use a few system dialogs for > opening files, printing, etc. > > These system dialogs call stopModalWithCode to deliver the result of the > dialog interaction back to the runModalForWindo

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 2:02 PM, Charles Srstka wrote: > Unless your plug-in is 64-bit only, there’s the chance the 32-bit binary > could load into a non-Cocoa browser such as Firefox. I’m not sure Chrome is 64-bit yet, but it probably will be soon. Using AppKit in a Chrome plugin will crash and b

Compile Error: undeclared (first use in this function) --> While Init'ing an Object

2010-06-22 Thread Chris Tracewell
I have my own custom framework. The framework builds fine but when I link to it in one of my projects one class is causing a compile error of... 'MyClass' undeclared (first use in this function) This occurs when I am trying to init MyClass inside a view controller's .m file in one of it's metho

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 3:58 PM, Bill Appleton wrote: > Hi Charles, > > Under Safari 64 bit you HAVE to use Cocoa -- there ain't nuthin' else. > > By the way i just found out that this problem is FIXED in the latest version > of Safari. > > > Thanks all, > > bill Unless your plug-in is 64-bit o

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
Hi Charles, Under Safari 64 bit you HAVE to use Cocoa -- there ain't nuthin' else. By the way i just found out that this problem is FIXED in the latest version of Safari. Thanks all, bill On Tue, Jun 22, 2010 at 1:10 PM, Charles Srstka wrote: > On Jun 22, 2010, at 1:54 PM, Bill Appleton w

Re: Flip and Enlarge CALayer at the same time

2010-06-22 Thread Gustavo Pizano
Hello everybody once again. So I want to update my advances. IT'S WORKING NOW! lets say about 80% of it. this is what Im doing: - (void)enlargeCALayer{ CABasicAnimation * frameAnim = [CABasicAnimation animationWithKeyPath:@"position"]; [frameAnim setFromValue:[NSValue valueWit

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 1:54 PM, Bill Appleton wrote: > Hi all, > > Thanks for the tips. > > i have verified that this code actually IS running on the main thread, i was > wrong about that in my original message. Here is the situation. WebKit > launches WebKitPluginHost.app and that is the process

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
Hi all, Thanks for the tips. i have verified that this code actually IS running on the main thread, i was wrong about that in my original message. Here is the situation. WebKit launches WebKitPluginHost.app and that is the process that runs my NPAPI plugin. The plugin is called on the main thread

Re: Splitter moves on its own

2010-06-22 Thread koko
I was looking there but ... no success. Thanks for responding! -koko On Jun 22, 2010, at 11:12 AM, Jerry Krinock wrote: On 2010 Jun 22, at 08:45, k...@highrolls.net wrote: When the program starts if my first action is to move the vertical split view splitter one of the horz split view spli

Re: can we have own application logo for ad-hoc release.

2010-06-22 Thread Dave Carrigan
On Jun 22, 2010, at 10:05 AM, Matt Neuburg wrote: > On Mon, 21 Jun 2010 23:05:37 -0700 (PDT), Kalyanraju M > said: >> Hi,when loading the Ad-Hoc release into iTunes, there is a generic icon shown > in the Apps section. Additionally, the label shows "Unknown genre". Can i have > my own image and

Re: Splitter moves on its own

2010-06-22 Thread Jerry Krinock
On 2010 Jun 22, at 08:45, k...@highrolls.net wrote: > When the program starts if my first action is to move the vertical split view > splitter one of the horz split view splitters collapses to the bottom of the > window. > > What cause a splitter to move on its own? I don't know in your case

Re: can we have own application logo for ad-hoc release.

2010-06-22 Thread Matt Neuburg
On Mon, 21 Jun 2010 23:05:37 -0700 (PDT), Kalyanraju M said: >Hi,when loading the Ad-Hoc release into iTunes, there is a generic icon shown in the Apps section. Additionally, the label shows "Unknown genre". Can i have my own image and my own label at label "Unknown genre". (1) Since it's just ad

[ANN] Cocoa Talk Episode 2 -UIGestureRecognizers

2010-06-22 Thread Development
Cocoa Talk Episode 2 has been uploaded and is available via iTunes or http://cocoatalk.libsyn.com This episode covers UIGestureRecognizers, Pinch and Swipe. It also shows how to zoom in and out on an item inside a UIScrollView.___ Cocoa-dev mailing l

Re: docs, KVO and NSUserDefaults etc.

2010-06-22 Thread Matt Neuburg
On Mon, 21 Jun 2010 19:40:27 -0400, Scott Anguish said: >If it isn't documented as being KVO compliant it is best not to assume it is guaranteed to be in the future. > > >On Jun 21, 2010, at 1:28 PM, Matt Neuburg wrote: > >> But how is the user supposed to know this? Or is the user who discovers t

Re: Incomplete rendering returned from glReadPixels

2010-06-22 Thread Michael Ash
On Tue, Jun 22, 2010 at 9:25 AM, Ben Haller wrote: >  It's a little weird because this method gets called sometimes on a view > that is not yet installed in a window, so I just make a window then and > there.  (This is run in a headless command-line app, I ought to mention.) >  And yes, I don't bo

Splitter moves on its own

2010-06-22 Thread koko
I have a view configuration with two vertical split vies and one horizontal split view effectively dividing my views into four quadrants. When the program starts if my first action is to move the vertical split view splitter one of the horz split view splitters collapses to the bottom of th

Re: Flip and Enlarge CALayer at the same time

2010-06-22 Thread Gustavo Pizano
HEllo all... I had an advance :) :) :) so I did this - (void) setFaceUp: (BOOL)up { if( up != _faceUp ) { // The Card has separate sub-layers for its front and back. At any time, one of them // is hidden, by having a 180 degree rotation about the Y axis. // To flip the

Flip and Enlarge CALayer at the same time

2010-06-22 Thread Gustavo Pizano
Hello, Im trying to recreate a flip-n-scale of a CALayer, pretty much the same as in iPhoto when you click the info of a event, it will flipt and enlarge a layer, but the back side of the layer its another view. So this is what I have so far base on the GameGeek board game example from apple. -

Incomplete rendering returned from glReadPixels

2010-06-22 Thread Ben Haller
Hi all. I'm trying to render some graphics using NSOpenGLView and then save the rendered bits as a TIFF image. I'm having trouble getting this working. I already posted this question to the mac- opengl list, and didn't get a solution. I'm posting here now because I'm using NSOpenGLView

Re: an oldie but a goodie: observing properties of collected objects

2010-06-22 Thread Benjamin Rister
On Jun 17, 2010, at 10:02 PM, Ken Thomases wrote: > Also, you could probably abstract it out into a custom class to facilitate > array observing, if you really wanted it. Maybe somebody already has, for > all I know. In fact, I put our implementation of this up on github last year: http://gith

Re: detect NSPopUpButton changes

2010-06-22 Thread Graham Cox
On 22/06/2010, at 4:05 PM, Angelo Chen wrote: > however, since that even will be called every time when the drop down is > selected, is there a way to check if selected item really change? thanks Ummm, just compare it with what you have set already? It's not the job of the control to store st

NSToolbar setup in conjunction with IB

2010-06-22 Thread Gideon King
Hi, I have a toolbar that has been set up in Interface Builder, and this is working just fine, but now I am in a situation where for some users of the application I want to remove a couple of items from the toolbar items completely. I will know whether I need them or not when the window is first

Re: Threaded DOM operations

2010-06-22 Thread Matej Bukovinski
A single DOM operation may not be slow, but a bunch of them together can be. The problem is that sometimes I have to do a lot of DOM operations for several pages (walking the DOM three, flagging some DOMNodes, removing and shifting nodes around). I'm currently using grand central dispatch to off

Re: Async NSURLConnection and blocks (was: Running NSURLConnection from within an NSOperation?)

2010-06-22 Thread Keith Duncan
> I had a chicken and egg problem wrt initializing the handler (with a > completion block that needed the connection) and the connection (which needed > the handler). In that circumstance you can decorate the variable that you need to reference inside the block as __block, and set it to nil. Th

Re: Async NSURLConnection and blocks (was: Running NSURLConnection from within an NSOperation?)

2010-06-22 Thread Keith Duncan
On 20 Jun 2010, at 21:42, John Heitmann wrote: > > On Feb 9, 2010, at 3:01 PM, Keith Duncan wrote: > >> ...you should create a 'concurrent' NSOperation as described in the >> documentation, and schedule your NSURLConnection on +[NSRunLoop >> mainRunLoop]. This will allow your NSOperation -sta

Re: Async NSURLConnection and blocks (was: Running NSURLConnection from within an NSOperation?)

2010-06-22 Thread Keith Duncan
> Lastly, you should run the thread's run loop until your delegate method gets > called indicating the NSURLConnection is done. Don't do that. That was discussed in the previous thread (search the archives). It irresponsibly consumes a workgroup thread. Keith __

detect NSPopUpButton changes

2010-06-22 Thread Angelo Chen
Hi, How to detect if user has change NSPopupButton's selection? Thanks, Angelo   ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at

Re: detect NSPopUpButton changes

2010-06-22 Thread Angelo Chen
Hi, oic, i'm kind of ignorant:( however, since that even will be called every time when the drop down is selected, is there a way to check if selected item really change? thanks --- 2010年6月22日 星期二,Graham Cox 寫道﹕ 寄件人: Graham Cox 主題: Re: detect NSPopUpButton changes 收件人: "Angelo Chen" 副本(CC): c

can we have own application logo for ad-hoc release.

2010-06-22 Thread Kalyanraju M
Hi,when loading the Ad-Hoc release into iTunes, there is a generic icon shown in the Apps section. Additionally, the label shows "Unknown genre". Can i have my own image and my own label at label "Unknown genre". ___ Cocoa-dev mailing list (Cocoa-

Re: detect NSPopUpButton changes

2010-06-22 Thread Graham Cox
On 22/06/2010, at 3:51 PM, Angelo Chen wrote: > Hi, > How to detect if user has change NSPopupButton's selection? Thanks, > Angelo What have you tried? It's a control like any other - hook it up to a target and an action and you'll get called when the user changes the selection. --Graham

Re: Core data and NSTextView: get the attributed string?

2010-06-22 Thread Bernard Knaepen
On 21 Jun 2010, at 21:35, Michael Babin wrote: > On Jun 20, 2010, at 8:11 AM, Bernard Knaepen wrote: > >> The trouble I have is to access the attributed string within my code to >> later draw in a custom view. I am trying something like this: >> >> NSManagedObjectContext *context = [self mana

Re: DnD International No symbol

2010-06-22 Thread Graham Cox
Sorry to rehash an old thread, but just trying this as stated doesn't work for me. Once I set the cursor in this fashion it never changes to what it should do when a valid drag operation is returned. I should point out that I'm linking against the 10.5 SDK though and testing for this method usi