Re: Speeding up image drawing?

2011-11-01 Thread Mike Abdullah
On 1 Nov 2011, at 01:44, Arbit Richardi wrote: > I'm looking for tips to speed image drawing on OS X — this is a > primary function of my application. I started out naively with > NSImage, switched to CGImage, tried layer backing, and now draw > directly into a hosted layer with Quartz. I have an

Re: Batch Build

2011-11-01 Thread koko
Yes, I got a script working with xcodebuild and subsequently learned that a Scheme can be written to build any Targets desired. Have not done this yet but this is more akin to Visual studio's Batch Build. Thanks to all. -koko On Oct 31, 2011, at 9:32 PM, David Dunham wrote: > On 26 Oct 201

Re: Batch Build

2011-11-01 Thread hufey
sounds great. could you share it once you done it? On Tue, Nov 1, 2011 at 10:33 PM, koko wrote: > Yes, I got a script working with xcodebuild and subsequently learned that a > Scheme can be written to build any Targets desired.  Have not done this yet > but this is more akin to Visual studio's

How to make modal window appear on the screen (not in background) ?

2011-11-01 Thread Vojtěch Meluzín
Hi, I'm using NSApp runModalForWindow to display a modal window, but it appears in background. Also as a response to some action in the window there may be additional modal window shown, so kind of a nested runModalForWindow. In that case the new window, which should be in front doesn't appear in

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
Thanks Jens. I solved the crash problem - I now call setReleasedWhenClosed FALSE for the window and it seems helping. On the other hand now runModalForWindow increases retainCount! Why is that? It makes no sense to me. Also the window still appears in background (code below) and cursor cannot be ch

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Jens Alfke
On Nov 1, 2011, at 8:43 AM, Vojtěch Meluzín wrote: > On the other hand now runModalForWindow increases retainCount! Why is that? > It makes no sense to me. It’s probably being retained and then autoreleased by AppKit. Don’t pay any attention to retainCount, it’s generally not useful for detect

Re: How to make modal window appear on the screen (not in background) ?

2011-11-01 Thread Jens Alfke
On Nov 1, 2011, at 8:36 AM, Vojtěch Meluzín wrote: > 'm using NSApp runModalForWindow to display a modal window, but it appears > in background. Um, you already asked this in another message. Let’s keep this in one thread to avoid confusion. —Jens___

Re: Batch Build

2011-11-01 Thread koko
I will post an answer when I do it. It is not a high priority as I have the xcodebuild scripts. -koko On Nov 1, 2011, at 9:08 AM, hufey wrote: > sounds great. could you share it once you done it? > > On Tue, Nov 1, 2011 at 10:33 PM, koko wrote: >> Yes, I got a script working with xcodebuild

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Scott Ribe
On Nov 1, 2011, at 9:43 AM, Vojtěch Meluzín wrote: > On the other hand now > runModalForWindow > increases retainCount! Why is that? It makes no sense to me. Why wouldn't it? Why would NSApp not retain the window that it's running modally??? -- Scott Ribe scott_r...@elevated-dev.com http://www

Re: How do we get rid of "application downloaded from the internet" warnings?

2011-11-01 Thread Howard Moon
I experienced the exact same symptoms as the OP when trying to open more than just a handful of .png files at once (NONE of which were downloaded from the internet, but created in Photoshop). Perhaps after some number of files is exceeded, the behavior changes? It worked fine when I opened jus

Re: inserting/removing items in NSOutlineView subclass

2011-11-01 Thread Sebastien Boisvert
As you can see from the sample code I provided, I call -beginUpdates and -endUpdates around it. Full stack trace below. Could the fact that it was being done during a notification being handled have something to do with it? I was able to avoid the exception by calling the code async on the main

Re: Write to file Entitlement

2011-11-01 Thread Laurent Etiemble
Hello, In a sandboxed application, you can read/write files without the save dialog by using the "File Access Temporary Exceptions" (cf. http://developer.apple.com/library/mac/#documentation/Miscellaneous/Reference/EntitlementKeyReference/AppSandboxTemporaryExceptionEntitlements/AppSandboxTemporar

Re: Write to file Entitlement

2011-11-01 Thread James Merkel
Why would someone want to base their application on the tenuous availability of a temporary exception ? Jim Merkel On Nov 1, 2011, at 10:30 AM, Laurent Etiemble wrote: > Hello, > > In a sandboxed application, you can read/write files without the save dialog > by using the "File Access Tempora

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
> > On the other hand now > > runModalForWindow > > increases retainCount! Why is that? It makes no sense to me. > > Why wouldn't it? Why would NSApp not retain the window that it's running > modally??? > Why would it? It's AFTER the runModalForWindow ends, so the window is not used anymore, is it

Re: Write to file Entitlement

2011-11-01 Thread Laurent Daudelin
On Nov 1, 2011, at 11:00, James Merkel wrote: > Why would someone want to base their application on the tenuous availability > of a temporary exception ? > > Jim Merkel > > On Nov 1, 2011, at 10:30 AM, Laurent Etiemble wrote: > >> Hello, >> >> In a sandboxed application, you can read/write fi

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
Thanks Jens. On the other hand now runModalForWindow increases retainCount! Why is that? > It makes no sense to me. > > > It’s probably being retained and then autoreleased by AppKit. Don’t pay > any attention to retainCount, it’s generally not useful for detecting > memory issues. > > However, no

Custom NSView binding

2011-11-01 Thread Livio Isaia
I repost this mail because I had problems connecting with mailing lists, sorry if this is someway annoying... I created an IB plug-in with a subclass of NSView with an exposed bind of type NSNumber, and then I bind it to a MyNSImageView through an NSObjectController (this is made directly in IB

Re: Sandboxing question

2011-11-01 Thread Sean McBride
On Sat, 29 Oct 2011 13:39:32 +1000, Gideon King said: >I have an application that I am just moving to using sandboxing, and it >currently (before sandboxing) writes log files to a folder in the >Application Support folder, then if the program crashes, or the user >wants to submit a defect report,

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Scott Ribe
On Nov 1, 2011, at 12:33 PM, Vojtěch Meluzín wrote: > Why would it? It's AFTER the runModalForWindow ends, so the window is not > used anymore, is it? Even so, you agree it should retain it, no? Now, should it release it or autorelease it when it's done? Examining retain counts is almost always

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Gary L. Wade
Did you try calling stopModal or one of its variants before releasing it? And, did you release the window rather than dealloc'ing it? Try those to get rid of your crash. -- Gary L. Wade http://www.garywade.com/ On 11/01/2011 11:41 AM, "Vojtěch Meluzín" wrote: >But the retainCount is needed for

Re: Custom NSView binding

2011-11-01 Thread Quincey Morris
On Nov 1, 2011, at 11:54 , Livio Isaia wrote: > I created an IB plug-in with a subclass of NSView with an exposed bind of > type NSNumber, and then I bind it to a MyNSImageView through an > NSObjectController (this is made directly in IB). > Now, everything works fine, except that when the metho

Re: Write to file Entitlement

2011-11-01 Thread James Merkel
On Nov 1, 2011, at 11:37 AM, Laurent Daudelin wrote: > On Nov 1, 2011, at 11:00, James Merkel wrote: > >> Why would someone want to base their application on the tenuous availability >> of a temporary exception ? >> >> Jim Merkel >> >> On Nov 1, 2011, at 10:30 AM, Laurent Etiemble wrote: >>

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
Sure. I used AbortModal, just in case it's not from the main thread, then performed release once, since I have also allocated it. Still 1 remains. I also used autorelease pool in for the modal processing. But still retainCount is 1 after my release. And after that Mac OS tries to redraw the view...

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/1/11 11:41 AM, Vojtěch Meluzín wrote: > But the retainCount is needed for successful release of the window, > right? I allocate the window and then deallocate it when I'm > finished with it. But runModalForWindow increases retainCount to 2, > so

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Preston Sumner
On Nov 1, 2011, at 12:41 PM, Vojtěch Meluzín wrote: > Thanks Jens. > > On the other hand now runModalForWindow increases retainCount! Why is that? retainCount should not be used to debug memory management issues--or at all, really. > I'm using my own styles. It may be no according to HI guide

Re: Speeding up image drawing?

2011-11-01 Thread Seth Willits
On Oct 31, 2011, at 6:44 PM, Arbit Richardi wrote: > I'm looking for tips to speed image drawing on OS X — this is a > primary function of my application. I started out naively with > NSImage, switched to CGImage, tried layer backing, and now draw > directly into a hosted layer with Quartz. I have

Re: Write to file Entitlement

2011-11-01 Thread Seth Willits
On Nov 1, 2011, at 12:19 PM, James Merkel wrote: >> Well, I maintain a synchronization tool. For me, that seems like a >> reasonable solution. Each time the user decides to synchronize 2 folders, I >> could just use a temporary exception. > > Your're assuming the temporary exception will always

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
> > I'm using my own styles. It may be no according to HI guidelines, but to > be > > honest, I don't care. The app/plugin should look the same on all > platforms. > > That is up to you, but be warned that the Apple userbase in general is > negatively reactive to interfaces that feel non-native. >

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
> I don't really know C++, so there is some generalization here. Since > you are returning a retained NSString, presumably inside your function > are you are doing something like: > > return [[NSString alloc] initWithCString:stringFromCPlusPlusMethod > encoding:someEncoding]; > > To return an auto

Re: inserting/removing items in NSOutlineView subclass

2011-11-01 Thread Corbin Dunn
Hi Sebastien, Your code looked like pseudo code, since it lacked spacing. I think you should still double check if it is called. As I said before, if you think it is a bug in appkit, please log it at bugreporter.apple.com -- but please include a test app, as I haven't been able to reproduce th

NSOutlineView with NSTableCellView not working, what am I missing?

2011-11-01 Thread Gustavo Pizano
Hello. Im trying to set a NSOutlineView not Cell based but View based. Now, I read the documentation and pretty much I had all set up except that the binding doest go to the table column, but to the table view contents. - So I have a class called PGTreeNode with a name and an image properties

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
Ok, here's an interesting development: 1) In a simple "console" application the modal window is initially hidden. 2) In a plugin the window is displayed above and even nested modal windows are displayed correctly. So could it be just by the fact that the testing application was "console" app? Voj

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Jens Alfke
On Nov 1, 2011, at 11:41 AM, Vojtěch Meluzín wrote: > Yaj, ok, can you explain a little more? I don't know much about Objective C, > how should the MStringToNSString be implemented to create the autoreleased > NSString? (sorry for lack of knowledge, but I just don't plan any further > developm

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
Don't worry, the allocation seems working now. A few autorelease pools did the trick. I know just the most basic stuff and don't intend to learn more simply because I'm not planning to use it at all. The simple layer only calls other functions made in C++. That's all I need. Anyway we are getting

Re: Custom NSView binding

2011-11-01 Thread Livio Isaia
Il giorno 01/nov/2011, alle ore 20.16, Quincey Morris ha scritto: > On Nov 1, 2011, at 11:54 , Livio Isaia wrote: > >> I created an IB plug-in with a subclass of NSView with an exposed bind of >> type NSNumber, and then I bind it to a MyNSImageView through an >> NSObjectController (this is mad

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Jens Alfke
On Nov 1, 2011, at 3:06 PM, Vojtěch Meluzín wrote: > Anyway we are getting out of the topic. Does anyone here know why the modal > windows work in a plugin (in a normal application) and not from a console > application? Basically, apps aren’t intended to be launched by a plain exec. A normal l

Re: NSAssert no longer displaying reason in console

2011-11-01 Thread Matt Neuburg
On Sun, 30 Oct 2011 09:45:25 -0700, Matt Neuburg said: >On Mon, 24 Oct 2011 16:01:30 -0700, Ben Kennedy said: >>On 24 Oct 2011, at 3:53 pm, Matt Neuburg wrote: >> >>> That's all! Dude, where's my reason? And without a printing of the reason, >>> what's the good of the assert? (And hey, I wouldn'

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
Thanks Jens. Btw. I fixed it with this: [window setLevel: CGShieldingWindowLevel()]; I googled it, but I'm just not sure if cannot have some "bad" side-effects. Vojtech Dne 2. listopadu 2011 0:31 Jens Alfke napsal(a): > > On Nov 1, 2011, at 3:06 PM, Vojtěch Meluzín wrote: > > Anyway we are g

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Scott Ribe
On Nov 1, 2011, at 4:06 PM, Vojtěch Meluzín wrote: > Does anyone here know why the modal > windows work in a plugin (in a normal application) and not from a console > application? Lack of a run loop? Or did you run one yourself in the console app? -- Scott Ribe scott_r...@elevated-dev.com http:

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
I used runModalForWindow, that should handle the even loop, right? Anyway it seems working now. But still the keyboard events and mouse cursors don't work... Vojtech Dne 2. listopadu 2011 0:41 Scott Ribe napsal(a): > On Nov 1, 2011, at 4:06 PM, Vojtěch Meluzín wrote: > > > Does anyone here know

Re: minor ARC casting question

2011-11-01 Thread Matt Neuburg
On Sun, 30 Oct 2011 15:55:39 +, Igor Mozolevsky said: >On 30 October 2011 15:15, Matt Neuburg wrote: >> In ARC, this is legal: >> >> self.view.layer.contents = (id)[[UIImage imageNamed:@"boat.gif"] CGImage]; >> >> And this is legal: >> >> id ref = (id)[[UIImage imageNamed:@"boat.gif"] CGImag

Re: minor ARC casting question

2011-11-01 Thread David Duncan
On Nov 1, 2011, at 5:06 PM, Matt Neuburg wrote: > Well, the example code there says: > >CAGradientLayer *gradientLayer = (CAGradientLayer *)[self layer]; >gradientLayer.colors = [NSArray arrayWithObjects:[[UIColor darkGrayColor] > CGColor], >

Re: minor ARC casting question

2011-11-01 Thread Greg Parker
On Nov 1, 2011, at 5:06 PM, Matt Neuburg wrote: >CAGradientLayer *gradientLayer = [CAGradientLayer layer]; >gradientLayer.colors = [NSArray arrayWithObjects:(id)[[UIColor > darkGrayColor] CGColor], >(id)[[UIColor lightGrayColor] CGColor], nil]; > > And now we'r

Re: NSAssert no longer displaying reason in console

2011-11-01 Thread Kyle Sluder
On Nov 1, 2011, at 7:38 PM, Matt Neuburg wrote: > > Sorry to keep harping on this, but this is a serious bug. As Ben Kennedy > says, it isn't just NSAssert. iOS often throws a fatal exception with an > absolutely lovely informative log message explaining the problem (e.g., your > view control

Re: Custom NSView binding

2011-11-01 Thread Quincey Morris
On Nov 1, 2011, at 15:27 , Livio Isaia wrote: > Thank you for your answer, > but i can't figure out which method(s) I must implement. I tried with some of > them and still doesn't work (e.g. valueForKey:) It's not very well documented. Start here: http://developer.apple.com/library/mac

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Vojtěch Meluzín
Ok, so even the keyboard input is related to the console application. With normal "bundled" Cocoa app it works. Cursors are still missing though. Anyway a good thing to remember: don't use console app to test GUI stuff :). Vojtech Dne 2. listopadu 2011 0:46 Vojtěch Meluzín napsal(a): > I used ru

Re: minor ARC casting question

2011-11-01 Thread David Duncan
On Nov 1, 2011, at 6:38 PM, Matt Neuburg wrote: > > On Nov 1, 2011, at 5:21 PM, David Duncan wrote: > >> This compiles for me under ARC: >> NSArray *array = [NSArray arrayWithObject:[[UIColor greenColor] CGColor]]; >> > > > Well, not for me. I get: "Implicit conversion of a non-Objective-C po

Re: NSAssert no longer displaying reason in console

2011-11-01 Thread Matt Neuburg
On Nov 1, 2011, at 5:25 PM, Kyle Sluder wrote: > On Nov 1, 2011, at 7:38 PM, Matt Neuburg wrote: > >> >> Sorry to keep harping on this, but this is a serious bug. As Ben Kennedy >> says, it isn't just NSAssert. iOS often throws a fatal exception with an >> absolutely lovely informative log m

Re: Problems with runModalForWindow, looking for alternatives

2011-11-01 Thread Ken Thomases
On Nov 1, 2011, at 6:31 PM, Jens Alfke wrote: > On Nov 1, 2011, at 3:06 PM, Vojtěch Meluzín wrote: > >> Anyway we are getting out of the topic. Does anyone here know why the modal >> windows work in a plugin (in a normal application) and not from a console >> application? > > Basically, apps a

Re: Speeding up image drawing?

2011-11-01 Thread Arbit Richardi
> I'm pretty certain Preview is using IKImageView, or at least it used to. Mike, Preview doesn't use IKImageView in 10.6. That class is really slow, probably because it has a ton of bells and whistles, and it doesn't show up in the stack frames when I look at Preview in Instruments (Preview appear