Re: Xcode 5 Obj-C++
Peter, On Jan 29, 2014, at 12:02 PM, Peter Teeson ptee...@icloud.commailto:ptee...@icloud.com wrote: I have a project in which I want to take advantage of the C++ Standard library (primarily because of the container classes - including the special ones). FWIW the project has to traverse a directed acyclic graph (yes I know about the boost lib). For the rest of the project Obj-C and Cocoa is sufficient. All the searching I've done has not turned up anything current about how things work these days with Xcode 5 and llvm. There is the 2005 ObjC++.pdf which I have but Xcode has changed a lot since those days. I understand that the file extension needs to be .mm to mix Obj-C and C++. But other than a command line template, which is for C++, there does not seem to be one for ObjC++. There are several ways you can do this, I mention two here: 1- As you mentioned, change the file extension to .mm 2- In your build setting (depending on configuration) you will see either of the two below GCC_INPUT_FILETYPE Compile Sources As You can change this setting to compile all your files as Objective-C++, regardless of the file extension. Are there any current docs that my search didn't find and that you can point me to? Or advice you can offer to help me? Well, I’m not clear as to what information you’re trying to find. Can you elaborate? Thanks, Abdul TIA and respect…. Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.commailto: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.comhttp://lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/asowayan%40vectorworks.net This email sent to asowa...@vectorworks.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
Cursor - Unable to use retina image
Hi folks, I have two images, a retina and a non-retina image that I would like to use as a Cursor. I crop the transparency out of the images and combine them into one NSImage that has two representations, a retina and a non-retina one. I then use the combined image to set NSCursor’s image. However, this doesn’t end up displaying a retina Cursor. I’m not sure why that is the case. My sample code can be downloaded from: https://www.dropbox.com/s/k9lj5pjsn253d43/Cursor.zip Any help would be greatly appreciated. Thanks, Abdul ___ 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
configuring Xcode to place products in different locations based on selected Architecture
Hi folks, I have an existing project that I’d like to transition from 32-bit to 64-bit. The current project places the results of builds such as a static library in a folder that I shall call “Output” In Xcode, I see a drop down menu that allows me to select which architecture to builds for “My Mac 32-bit” and “My Mac 64-bit”. I am not interested in building a universal binary. Here is what I’m trying to do but couldn’t figure out. 1- When “My Mac 32-bit” is selected and I build, I want my library libFoo.a to be placed in the folder “Output/32/“ 2- When “My Mac 64-bit” is selected and I build, I want my library libFoo.a to be placed in the folder “Output/64/“ Is this possible? Thanks Abdul ___ 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: 64-bit iOS
Scott, I'm curious, why does 64-bit matter? iPhone memory is still around 1 gig and there is no virtual memory. Until you exceed the 4 gig limit, I don't see why this matters. Abdul Sent from my iPhone On Sep 10, 2013, at 3:44 PM, Scott Ribe scott_r...@elevated-dev.commailto:scott_r...@elevated-dev.com wrote: Well, since nobody else has commented, let me be the first to say: YES! YES! YES! THANK YOU APPLE!! -- Scott Ribe scott_r...@elevated-dev.commailto:scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.commailto: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.comhttp://lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/asowayan%40vectorworks.net This email sent to asowa...@vectorworks.netmailto:asowa...@vectorworks.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: Thread safety, some basic questions about accessing mutable objects across threads
Nick, In your secondary you can use dispatch_async or dispatch_sync to schedule a block of code to execute on the main thread. Below is a simple example: dispatch_async(dispatch_get_main_queue(), ^{ // put your code to modify mutable array here }); I hope this helps. Thanks, Abdul On Aug 6, 2013, at 11:39 AM, Nick Rogers roger...@mac.commailto:roger...@mac.com wrote: Hi, Please look at the following situations: 1. Created a mutable array in main thread, can I read its values in a secondary thread safely, while no other thread is modifying this mutable array? 2. I need to add objects to this mutable array from a secondary thread, and no other thread is modifying it. Can I simply add an object like, [array addObject:obj]; or if this is wrong how to achieve the same? The object to add is mostly NSString or NSNumber or a mutable dictionary of NSString and NSNumber. Please help. Best, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.commailto: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.comhttp://lists.apple.com/ Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/asowayan%40vectorworks.net This email sent to asowa...@vectorworks.netmailto:asowa...@vectorworks.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: view based NSTable View - button not firing
Hi Eric, I actually fixed this. In the nib file, I connected the delegate of the table view to the app delegate. This fixes it. I don't know why. Thanks, Abdul Sent from my iPhone On Jul 23, 2013, at 8:43 PM, Eric Gorr mail...@ericgorr.net wrote: On Jul 23, 2013, at 3:42 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Jul 22, 2013, at 8:31 AM, Abdul Sowayan wrote: I’m am using a view based NSTableView. In the NSTableViewCell, I place a button and hook up its action/target to the App delegate. The problem is, it doesn’t seem to work. If I place the button outside of the NSTableView, it works just fine. I am clueless, any feedback would be greatly appreciated. I’ve attached a sample program that shows this issue. I didn't look at the attachment but is the button the root view for the cell, or is it a subview? I ask as I have encountered that even when you set up a table view as view-based that it will still behave in strange ways as if it were cell-based whenever a cell's root view has an NSCell that is acceptable in a cell-based table view, such as text fields and buttons. If this is the case, the solution is to embed your button in an NSView. I was curious, so I tried out this solution and, strangely enough, it does work. I simply put a the Fire button inside of another NSView and it all started working normally. Would love to know the explanation...it seems like this is a reportable bug. ___ 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: view based NSTable View - button not firing
Hi Kyle, I actually did use NSTableCellView. My button didn't work until I hooked up the delegate outlet. Abdul Sent from my iPhone On Jul 24, 2013, at 1:14 AM, Kyle Sluder k...@ksluder.com wrote: On Tue, Jul 23, 2013, at 12:42 PM, Keary Suska wrote: I didn't look at the attachment but is the button the root view for the cell, or is it a subview? I ask as I have encountered that even when you set up a table view as view-based that it will still behave in strange ways as if it were cell-based whenever a cell's root view has an NSCell that is acceptable in a cell-based table view, such as text fields and buttons. If this is the case, the solution is to embed your button in an NSView. Wouldn't it be better to use an NSTableCellView instead of a plain NSView? --Kyle Sluder ___ 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: ARC and blocks
Hi, So, when myController is nil'ed out, ARC releases it, and it releases the block in turn. No leaks/abandoned memory. A special form of this is the idiom: __block id mySelf = self; ^{ [mySelf doSomething]; } Wouldn't using __weak instead of __block be better and clearer in the above context? Thanks, Abdul This lets you use self in a block without retaining it. -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com ___ 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/asowayan%40vectorworks.net This email sent to asowa...@vectorworks.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: Singletons with ARC
Hi Ben, I'm rather confused by the commonly used implementation of singletons. (Ignoring the fact that perhaps I shouldn't be using singletons) I would appreciate you view on this. Normally I implement a singleton such as.. static MyClass *sharedInstance = nil; + (MyClass *)sharedInstance { @synchronized(self) { if (sharedInstance == nil) sharedInstance = [[self alloc] init]; } return(sharedInstance); } The above will still work in an ARC environment. It is rather inefficient, however. For details please check the Double Check Locking Optimization pattern: http://www.cs.wustl.edu/~schmidt/PDF/DC-Locking.pdf The reason it is inefficient is that locking (mutexes, or @synchronized above) is expensive. And you incur that expense every single time you call sharedInstance method. A better way to write that method is below: + (MyClass *)sharedInstance { static MyClass *sharedInstance = nil; if(sharedInstance == nil) { @synchronized(self) { if (sharedInstance == nil) sharedInstance = [[self alloc] init]; } } return sharedInstance; } The above is a lot more efficient. It does not incur the cost of locking (mutex, or @synchronized) every single time. It is thread safe. Read the paper for detailed analysis. This has fared me well over the years. With the introduction of ARC, I assumed there might be a more suitable implementation out there, and I found this common snippet of code commonly on the net. + (MyClass *)sharedInstance { static MyClass *sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(onceToken, ^{ sharedInstance = [[MyClass alloc] init]; // Do any other initialisation stuff here }); return sharedInstance; } Yes, the above looks correct. Which confuses me because surely it should look more like. static MyClass *sharedInstance = nil; + (MyClass *)sharedInstance { if(sharedInstance==nil){ static dispatch_once_t onceToken; dispatch_once(onceToken, ^{ sharedInstance = [[MyClass alloc] init]; // Do any other initialisation stuff here }); } return sharedInstance; } ...else otherwise the second time I access the singleton, MyClass * sharedInstance is declared a second time and set to nill, removing the first instance from memory under ARC? No, the second time sharedInstance is called it will NOT be set to nil. This is more of a C/C++ detail. It will not be set to nil again because the variable is static. try the following in Xcode and you will see :-) -(void) callMe { static int i = 0; NSLog(@value before increment is: %d, i); ++i; NSLog(@value after increment is: %d, i); } Invoke callMe several times and you will see that it keeps incrementing i. So you will see value before increment is: 0 value after increment is: 1 value before increment is: 1 value after increment is: 2 value before increment is: 2 value after increment is: 3 Thanks, Abdul ___ 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
Changing default file - application association
Hi folks, I have an application that we wrong. There is an older version of the application that I will call V0, and a newer version of the application that I will call V1. I have both V0 and V1 installed on my computer(s) (Mac OS X 10.6 and 10.7). Both V0 and V1 generate application specific documents (files) that can be opened by both V0 and V1. Mac OS X associates the all instances of my application specific documents/files with V1. When I try to change such association using: Right Click on File - Get Info - Open With - Select Application - Change All Mac OS X refused to change the association for an unknown reason (even though it lists V0 as a candidate). It is not clear to me why that is the case. Interestingly, when I try to change the association on just that particular file (not all files of the same type) it works like a charm. Any feedback would be greatly appreciated. Thanks, Abdul ___ 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
How to pass command line parameters to Cocoa App
Hi folks, If I launch my app from the command line, I can pass it options like this (this would be the argc, argv parameters to main): ./Foo.app/Contents/MacOS/Foo -ApplePersistenceIgnoreState YES What I would like to have is launch my application from the GUI and somehow pass the command line parameters to it. If I had to guess, this would be encoded in the Info.plist file in the bundle. It is not clear to me how to do that. Any feedback would be greatly appreciated. Thanks, Abdul ___ 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
Options to defaults or commandline
Hi Folks, I can do: ./Foo.app/Contents/MacOS/Foo -ApplePersistenceIgnoreState YES Or defaults write com.Bar.Foo ApplePersistenceIgnoreState YES My question is regarding options such as ApplePersistenceIgnoreState. Where did this come from? Is there some documentation that lists similar options I can use? The above was helpful for me to disable Lion¹s Resume feature. I would also like to disable Lion¹s resize the Window from all edges. I couldn¹t find any documentation that list such options. Thanks, Abdul ___ 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
Using Multi-Gesture events with Carbon
Hi folks, I have a carbon based application that we are converting overtime to Cocoa. What I would like to do, if possible, is to incorporate multi-gesture events (such as magnify event) into my carbon application. I can see that NSResponder has magnifyWithEvent: selector. I am wondering if there is anyway to do so. Any feedback on how to do so would be greatly appreciated. Thanks, Abdul ___ 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
Re: Cleaning up weak references ( was Re: Odd Crash when adding table columns manually )
Hi folks, I'm trying to figure out a clear guideline on how to handle weak references. Let's consider the following scenarios: 1- Say I have a button, and set its action/target (via a nib file) to call method on the controller. In the controller dealloc method, should the controller set the action/target of the button to nill? 2- Say I have a table view, and set its datasource/delegate (via a nib file) to the controller. In the controller dealloc method, should the controller set the datasource/delegate of the tableview to nill? What I'm interested in is what is the right thing to do here. That is, is the lack of explicit setting to nil of action/datasource/delegate to nill a bug? Thanks, Abdul ___ 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
Re: Cleaning up weak references ( was Re: Odd Crash when adding table columns manually )
Hi Corbin, I wrote that sample, and gave the WWDC talk based on it a few years ago. I also own NSTableView. Yes, please do file a bug. The sample should set the delegate/datasource to nil, as it is good practice to do so, and we can update the sample. Thanks for the clarification, it is very helpful. So the right thing to do with delegates/datasources is to set them to nil. What about target/action on something like a button? Would you say that for every control in a nib, one has to set the delegate/datasource/action to nil? While this might seem like a silly question, most books/examples I read don't do this so I wanted to be clear on what the right thing to do is. Thanks again, Abdul ___ 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
Vertical Asian Text in Cocoa
Hi folks, As I understood it several years ago, there was no native support in Cocoa for rendering vertical Japanese text. Note that certain punctuation and compound characters are supposed to render differently when drawing in the vertical orientation than they normally would when drawing left-to-right (which is how the font normally specifies how the character is rendered) Has anything changed on this front? Is there any support in Quartz for this? Any feedback would be greatly appreciated. Thanks, Abdul ___ 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
Cocoa Borderless Panel causes issues in PowerPlant/Carbon
Hi folks, I am having Carbon/PowerPlant and Cocoa integration issue. I was hoping someone might have an insight into this problem. Any feedback would be greatly appreciated. A reproducer program that shows the problem can be found at: http://ericgorr.net/cocoadev/BorderlessWindow.zip My application is a PowerPlant/Carbon application and I would like to use Cocoa in parts of the application. The program is simple, I have a PowerPlant/Carbon Window and a Cocoa Panel. The PowerPlant/Carbon Window has an ³ON² button, when the user clicks on that button the Cocoa Panel becomes the key window. When the user click back to the PowerPlant/Carbon Window, the Cocoa Panel resigns key window. The issue I¹m facing is that the behavior of this simple application is different if I set the window mask to NSBorderlessWindowMask (that is, if I have a borderless Panel). In the code example, I overrode the PowerPlant/Carbon Window¹s Deactivate method to print ³DEACTIVATING POWERPLANT WINDOW² whenever the PowerPlant/Carbon Window is deactivated. When the Cocoa Panel has a border, I get the below. The Cocoa Window has the title ³Window². Notice that the Cocoa window type is com.apple.HIToolbox.windowgroups.floating and also notice that my PowerPlant/Carbon window never gets deactivated when the ON button is clicked (that is, when the Cocoa Panel becomes key window). This is the behavior I was expecting. (gdb) call (void)DebugPrintWindowList() Flags: V:visible H:highlighted A:active F:user focus S:hide on suspend Avail: T:transient S:stationary A:all spaces M:move to active space Window Class WID Flags Level Avail Title Group -- - - - - - 0x416840 MenuBar 724 S 0x417bc0 com.apple.HIToolbox.windowgroups.menubar 0x52a440 Floating 26E2H S 3 T Window 0x52b2b0 com.apple.HIToolbox.windowgroups.floating 0x40dde0 Floating 26E3 S 0 T 0x52b2b0 com.apple.HIToolbox.windowgroups.floating 0x502af0 Document 26E1 V 0 0x509d80 com.apple.HIToolbox.windowgroups.document ON 2010-09-16 09:51:53.564 testPP[96414:a0f] Panel becomeKeyWindow Panel: 0x519bd0 2010-09-16 09:51:54.603 testPP[96414:a0f] Panel resignKeyWindow (null) ON 2010-09-16 09:51:54.740 testPP[96414:a0f] Panel becomeKeyWindow Panel: 0x519bd0 2010-09-16 09:51:55.612 testPP[96414:a0f] Panel resignKeyWindow (null) ON 2010-09-16 09:51:55.740 testPP[96414:a0f] Panel becomeKeyWindow Panel: 0x519bd0 2010-09-16 09:51:56.652 testPP[96414:a0f] Panel resignKeyWindow (null) ON 2010-09-16 09:51:56.788 testPP[96414:a0f] Panel becomeKeyWindow Panel: 0x519bd0 2010-09-16 09:52:01.997 testPP[96414:a0f] Panel resignKeyWindow (null) When the Cocoa Panel does not have border (that is, when we use NSBorderlessWindowMask), I get the below. The Cocoa Window has the title ³Window². Notice that the Cocoa window type is com.apple.HIToolbox.windowgroups.document and also notice that my PowerPlant/Carbon window now gets deactivated when the ON button is clicked (that is, when the Cocoa Panel becomes key window). This is not the behavior I was expecting. (gdb) call (void)DebugPrintWindowList() Flags: V:visible H:highlighted A:active F:user focus S:hide on suspend Avail: T:transient S:stationary A:all spaces M:move to active space Window Class WID Flags Level Avail Title Group -- - - - - - 0x415cd0 MenuBar 724 S 0x417130 com.apple.HIToolbox.windowgroups.menubar 0x1809ea0 Floating 26C9 S 0 T 0x1824470 com.apple.HIToolbox.windowgroups.floating 0x181f620 Document 26C8 V 0 Window 0x607ef0 com.apple.HIToolbox.windowgroups.document 0x1d02df0 Document 26C7 V 0 0x607ef0 com.apple.HIToolbox.windowgroups.document ON 2010-09-16 09:49:58.119 testPP[96360:a0f] Panel becomeKeyWindow Panel: 0x180ced0 2010-09-16 09:49:58.125 testPP[96360:a0f] DEACTIVATING POWERPLANT WINDOW 2010-09-16 09:49:59.159 testPP[96360:a0f] Panel resignKeyWindow (null) ON 2010-09-16 09:50:02.519 testPP[96360:a0f] Panel becomeKeyWindow Panel: 0x180ced0 2010-09-16 09:50:02.525 testPP[96360:a0f] DEACTIVATING POWERPLANT WINDOW 2010-09-16 09:50:03.752 testPP[96360:a0f] Panel resignKeyWindow (null) ON 2010-09-16 09:50:04.839 testPP[96360:a0f] Panel becomeKeyWindow Panel: 0x180ced0 2010-09-16 09:50:04.844 testPP[96360:a0f] DEACTIVATING POWERPLANT WINDOW 2010-09-16 09:50:06.376 testPP[96360:a0f] Panel resignKeyWindow (null) To summarize: When Cocoa Panel has a border, the Cocoa Panel is considered a ³Floating² Window. When Cocoa Panel does not have a border, the Cocoa Panel is considered a ³Document² Window. When a
Re: Cocoa Borderless Panel causes issues in PowerPlant/Carbon
Hi Kyle, Thanks for your response. Did you try calling -setFloatingPanel: on the panel? Yes I did. When I do so, This is the dump I get: 0x1820f00 Document 283C V 3 Window 0x1822b90 com.apple.HIToolbox.windowgroups.toolbar Without calling -setFloatingPanel: I get the following: 0x181f620 Document 26C8 V 0 Window 0x607ef0 com.apple.HIToolbox.windowgroups.document So you see, after calling -setFloatingPanel: on a Borderless Window, it is still considered a Document Window, but it becomes of type com.apple.HIToolbox.windowgroups.toolbar As a side effect, when I do call -setFloatingDataPanel:, I am no longer able to click on the ON button in my PowerPlant/Carbon application. Below is the the output I get from gdb: (gdb) call (void)DebugPrintWindowList() Flags: V:visible H:highlighted A:active F:user focus S:hide on suspend Avail: T:transient S:stationary A:all spaces M:move to active space Window Class WID Flags Level Avail Title Group -- - - - - - 0x14300ca0 MenuBar 724 S 0x14301be0 com.apple.HIToolbox.windowgroups.menubar 0x1825300 Floating 283D S 0 T 0x1826910 com.apple.HIToolbox.windowgroups.floating 0x1820f00 Document 283C V 3 Window 0x1822b90 com.apple.HIToolbox.windowgroups.toolbar 0x6092d0 Document 283B V 0 0x1806e60 com.apple.HIToolbox.windowgroups.document Thanks, Abdul ___ 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