Re: CFBundleSupportedPlatforms issue
> Am 07.10.2015 um 13:34 schrieb Rick C. : > > Thanks for the help. But how would this work in the future at some point I > will need to use the latest SDK right? Sorry, I’m not an experienced XCoder … I do 4D usually ;-) Anyway, my guess would be, that the precompiled binaries you are using need to use the same SDK as the stuff you want to compile. So if things work with 10.10 SDK and don’t work with 10.11, I would first try to compile the precompiled binaries again with 10.11 or if it works with 10.10, just don’t stay there until you need to upgrade ;-) cheers Matthias > > > >> On 6 Oct 2015, at 5:17 PM, Matthias Schmidt wrote: >> >> >>> Am 05.10.2015 um 16:40 schrieb Rick C. : >>> >>> On existing project that always built without issue on 10.10/Xcode 6 I am >>> now getting this error with 10.11/Xcode 7: >>> >>> Couldn't find platform family in Info.plist CFBundleSupportedPlatforms or >>> Mach-O LC_VERSION_MIN for myBinary >>> >>> I have 3 pre-complied binaries inside of my project. They do have their >>> own entitlements files and they are codesigned but they do not have their >>> own Info.plist. I tried adding CFBundleSupportedPlatforms to the main >>> Info.plist with the value MacOSX but it's not resolving the issue. Any >>> ideas? >>> ___ >> >> did you try to set the SDK back to OS 10.10? >> You need to create a symbolic link from the 10.10 SDK here: >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ >> >> cheers >> Matthias > ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSColorPanel and close box
> Am 01.10.2015 um 18:30 schrieb Matthias Schmidt : > > >> Am 30.09.2015 um 17:09 schrieb Matthias Schmidt : >> >> >>> Am 30.09.2015 um 16:11 schrieb Jens Alfke : >>> >>> >>> >>>> On Sep 30, 2015, at 12:04 AM, Matthias Schmidt wrote: >>>> >>>> while ([NSColorPanel sharedColorPanelExists]) { >>>> PA_Yield(); >>>> } >>> >>> Yikes! That looks very suspicious. You shouldn't be running loops like that >>> in a Cocoa app. AppKit is event driven, so you handle a single event and >>> return. >> so that’s not the reason. If I just open the panel and leave the 4D code, the panel behaves the same. Is there a way I could catch it, when the User is clicking in the closeBox - it actually becomes dark, is just not doing anything? thanks Matthias ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSColorPanel and close box
> Am 30.09.2015 um 17:09 schrieb Matthias Schmidt : > > >> Am 30.09.2015 um 16:11 schrieb Jens Alfke : >> >> >> >>> On Sep 30, 2015, at 12:04 AM, Matthias Schmidt wrote: >>> >>> while ([NSColorPanel sharedColorPanelExists]) { >>> PA_Yield(); >>> } >> >> Yikes! That looks very suspicious. You shouldn't be running loops like that >> in a Cocoa app. AppKit is event driven, so you handle a single event and >> return. > > there is PA_RunInMainProcess((PA_RunInMainProcessProcPtr)… which would run > the panel as modal dialog, that would be one possible approach I guess. > So I need to redesign my code and open the panel like this: > NSInteger result = [ panel runModal ]; it looks like this approach is not working with NSColorPanel it just makes buummm … so I need to go back to the original approach and find a way how to make these buttons work … cheers Matthias > > Another would be to split the tasks, like open panel and get panel values and > close the thing, which would require to return a reference to the panel to 4D. > > I have to think about that. > > >> >> It sounds like PA_Yield is running the run loop modally, which would explain >> why the color panel won't work. If that’s the way their plugin API works, >> it's got some problems. > > > it just keeps the current 4D process away from doing anything. > >> >> (Also, why did you take this off-list? Now no one else can comment.) > (you replied directly to me and I just hit reply ;-) > > Matthias > > > ___ > > 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)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/beta%40admilon.net > > This email sent to b...@admilon.net ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSColorPanel and close box
> Am 30.09.2015 um 16:11 schrieb Jens Alfke : > > > >> On Sep 30, 2015, at 12:04 AM, Matthias Schmidt wrote: >> >> while ([NSColorPanel sharedColorPanelExists]) { >> PA_Yield(); >> } > > Yikes! That looks very suspicious. You shouldn't be running loops like that > in a Cocoa app. AppKit is event driven, so you handle a single event and > return. there is PA_RunInMainProcess((PA_RunInMainProcessProcPtr)… which would run the panel as modal dialog, that would be one possible approach I guess. So I need to redesign my code and open the panel like this: NSInteger result = [ panel runModal ]; Another would be to split the tasks, like open panel and get panel values and close the thing, which would require to return a reference to the panel to 4D. I have to think about that. > > It sounds like PA_Yield is running the run loop modally, which would explain > why the color panel won't work. If that’s the way their plugin API works, > it's got some problems. it just keeps the current 4D process away from doing anything. > > (Also, why did you take this off-list? Now no one else can comment.) (you replied directly to me and I just hit reply ;-) Matthias ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSColorPanel and close box
> Am 30.09.2015 um 15:43 schrieb Jens Alfke : > > >> On Sep 29, 2015, at 11:31 PM, Matthias Schmidt wrote: >> >> the host app is 4D, which is about moving to 64bit. > > Oh my god, the database 4D? I had no idea that still existed. The company I > worked for in the ‚80s used to use it. yes it does and it finally abandons the Carbon code inside :-) Years ago I wrote a plugin in Carbon, which still works, but now 4D is moving to 64bit, which requires rewriting the plugin in Cocoa. 4D still has a good user base and it grew, the server can now serve more than 1000 users - depending on the hardware of course ;-) > >> I thought modal runloop mode is the default for panels or do I need to set >> NSModalPanelRunLoopMode somewhere else in my code? > > No, you don’t want a modal runloop mode unless you have a modal window like > an alert. I just thought of it because it will act much like what you’re > saying — you can’t interact in most ways with windows that aren’t the main > window. You’re not calling any of the NSRunloop -runXXX methods, are you? > no, I don’t. I just call this code here: MyPicker *meinPicker = [[MyPicker alloc] init]; switch (mode) { case kFD_4DMode: // para 2 = 4D Farbe, Para 3 = Alpha Value [meinPicker setMyColorWith4D:col_a withColB:col_b]; break; case kFD_RGB:// needs 5 parameters R-G-B-Alfa [meinPicker setMyColorWithRGB:col_a withColB:col_b withColC:col_c withColD:col_d]; break; case kFD_HSV:// needs 5 parameters H-S-B-Alfa [meinPicker setMyColorWithHSV:col_a withColB:col_b withColC:col_c withColD:col_d]; break; case kFD_CMYK: // needs 6 parameters C-M-Y-K-Alfa [meinPicker setMyColorWithCMYK:col_a withColB:col_b withColC:col_c withColD:col_d withColE:col_e]; break; case kFD_Gray: // needs 3 Parameters [meinPicker setMyColorWithGrey:col_a withColB:col_b]; break; } [meinPicker setPicker:meinPicker]; while ([NSColorPanel sharedColorPanelExists]) { PA_Yield(); } // collecting data and return it to 4D then setPicker looks like that: -(void)setPicker:(id)sender { panel = [ NSColorPanel sharedColorPanel ]; [ panel setColor: myColor ]; [ panel setMode: (NSColorPanelMode)pMode ]; [ panel setContinuous: YES ]; [ panel setTarget: self ]; [ panel setAction: @selector(changeColor:) ]; [ panel setDelegate: sender]; [panel worksWhenModal]; // this makes no difference [ panel makeKeyAndOrderFront: self ]; } when windowWillClose gets fired I remove the observer, close the window and release it. It all works as expected besides the dump closing box and this drives me nuts currently, as I couldn’t find a solution on the net yet. cheers Matthias ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSColorPanel and close box
Hello, it’s been a while :-) I started to rewrite a Plugin from Carbon to Cocoa and I have some trouble with the NSColorPane. The colorPane opens, I can choose any color, change the mode etc, but I can close it only with the ESC key. None of the boxes in the title bar react on a click. Neither the close box (that’s the one I need) nor the resize box. A double click in the title bar is resizing the box. So to see what’s going on I did this: [ panel setDelegate: sender]; and then: -(BOOL)respondsToSelector:(SEL)aSelector { NSString *methodName = NSStringFromSelector(aSelector); NSLog(@"antwortet auf Selector: %@", methodName); return [super respondsToSelector:aSelector]; } and I get all kind of responses, but none, when I click on one of the buttons in the title bar. I also tried this: NSButton *closeButton = [[ NSColorPanel sharedColorPanel] standardWindowButton:NSWindowCloseButton]; [closeButton setTarget:self]; [closeButton setAction:@selector(closePanel:)]; but it doesn’t do anything :( When I press the ESC-key the close buttons nevertheless blinks shortly and then windowWillClose gets fired. I believe I miss something here … thanks for any hint Matthias ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSColorPanel question
Hello, I'm a bit stuck with NSColorPanel, while trying to write a plugin for another app, which should open the color picker, select a color, close it and return the color. I use this code here, but as soon as I click in the panel it is crashing: -(void)setPicker:(id)sender { panel = [NSColorPanel sharedColorPanel ] ; [ panel setColor: myColor ]; [ panel setMode: (NSColorPanelMode)pMode ]; [ panel setContinuous: YES ]; [ panel setTarget: sender ]; //myColor [ panel setAction: @selector( changeColor:) ]; [ panel makeKeyAndOrderFront: nil ]; //self } I'd be happy, if someone could point me in the right direction thanks Matthias ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Converting colors to CGFloat
Hello, how do I convert color values from longint or UInt16 as they were used with the carbon API to CGFloat used with NSColor? thanks Matthias ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com