Accessing self in a C static function within an implementation definition

2014-04-07 Thread jonat...@mugginsoft.com
I have a function like macro: #define DBDispatchMonoEvent(KLASS, NAME) \ do { \ [DBManagedEvent dispatchEventFromMonoSender:monoSender \ eventArgs:monoEventArgs \ targetClass:[KLASS class] \

Simple NSDatePicker query

2014-03-17 Thread jonat...@mugginsoft.com
Is it correct that a textual NSDatePicker can only display dates in short format ( dd/mm/ )? Attaching a date formatter and setting say a long date format seems to have no effect. Jonathan ___ Cocoa-dev mailing list

Re: Simple NSDatePicker query

2014-03-17 Thread jonat...@mugginsoft.com
On 17 Mar 2014, at 14:51, Reinhard Segeler macmeid...@googlemail.com wrote: Check the project DatePicker in the documentation. It should allow you, solving your problem. The textual pickers in the example project display as dd/mm/. So no solution that I can see. J

WebView pdf representation - div background colours AWOL

2014-03-11 Thread jonat...@mugginsoft.com
I create local mustache template driven HTML content and display it in my OS X 10.9 app using WebView. I get the WebView PDF representation like so: NSView WebDocumentView *webDocumentView = [[[self.webView mainFrame] frameView] documentView]; NSData *pdfData = [webDocumentView

Re: WebView pdf representation - div background colours AWOL

2014-03-11 Thread jonat...@mugginsoft.com
On 11 Mar 2014, at 16:03, Jens Alfke j...@mooseyard.com wrote: On Mar 11, 2014, at 8:55 AM, jonat...@mugginsoft.com wrote: However, the pdf rendering is missing some simple div background colouring (like alternating backgrounds on table rows). When I print from Safari there’s

Re: WebView pdf representation - div background colours AWOL

2014-03-11 Thread jonat...@mugginsoft.com
On 11 Mar 2014, at 16:03, Jens Alfke j...@mooseyard.com wrote: On Mar 11, 2014, at 8:55 AM, jonat...@mugginsoft.com wrote: However, the pdf rendering is missing some simple div background colouring (like alternating backgrounds on table rows). When I print from Safari there’s

Re: WebView pdf representation - div background colours AWOL

2014-03-11 Thread jonat...@mugginsoft.com
On 11 Mar 2014, at 18:09, Uli Kusterer witness.of.teacht...@gmx.net wrote: On 11 Mar 2014, at 17:12, jonat...@mugginsoft.com wrote: There is WebView -drawsBackground but this has no disernable effect. That property is for the case where you want a transparent webview on screen. Thinking

Re: Best way to make Finder/Mail style toolbars?

2014-03-09 Thread jonat...@mugginsoft.com
On 9 Mar 2014, at 04:08, Jens Alfke j...@mooseyard.com wrote: Is there some setting I’ve overlooked that will give the toolbar this visual style without my having to wrap all the items? Or is this really the way to do it? Unfortunately I think this is the case. What I have done in the

NSDecimalNumber queries

2014-03-09 Thread jonat...@mugginsoft.com
I require to use NSDecimalNumber extensively. When creating NSDecimalNumbers it is advised not to use the NSNumber subclass initWithXXX methods: http://www.cocoabuilder.com/archive/cocoa/227178-question-on-estimating-arraywithcapacity.html#227253 I presume that this still applies. To me it

Re: Inherited Protocols

2014-03-06 Thread jonat...@mugginsoft.com
On 6 Mar 2014, at 15:34, Mike Abdullah mabdul...@karelia.com wrote: On 6 Mar 2014, at 15:30, William Squires wsqui...@satx.rr.com wrote: Can an ObjC protocol be inherited by another protocol? I know the syntax for regular (class) inheritance, and for specifying that a class implements a

Re: Running an NSApplication from a test case

2014-03-05 Thread jonat...@mugginsoft.com
On 4 Mar 2014, at 21:27, Daniel Luis dos Santos daniel.d...@gmail.com wrote: Hello all, I have a test case where I would like to launch a UI. I have a NIB with a window that I load through code in the test case. Here goes the code : - (void)testExample { NSArray* topLevelWidgets =

Re: Debugging insight needed for NSKeyedUnarchiver

2014-03-03 Thread jonat...@mugginsoft.com
On 3 Mar 2014, at 09:47, Graham Cox graham@bigpond.com wrote: IAC, I don’t think it’s exactly about whether initWithCoder returns nil. Surely it’s about the fact that decoding a NSArray can’t deal with a nil element, since it can’t be inserted into the array. Simply dropping nil

Public API method naming for NSString * / const char * parameters

2014-03-03 Thread jonat...@mugginsoft.com
I am pondering the following framework public API method signatures. The API requires a mixture of const char* and NSString * parameters. The question is whether to precede const char * parameter names with UTF8 e.g.: + (MonoClass *)monoClassWithName:(char *)className fromAssemblyName:(const

Re: Public API method naming for NSString * / const char * parameters

2014-03-03 Thread jonat...@mugginsoft.com
On 3 Mar 2014, at 15:19, Daniel DeCovnick danhd...@mac.com wrote: But, assuming for the moment that you have a really good reason for such a Cocoa-unfriendly API: “UTF8Name is highly specific. I’d first consider what your source encoding is (both of the strings that are likely to be

Re: Public API method naming for NSString * / const char * parameters

2014-03-03 Thread jonat...@mugginsoft.com
On 3 Mar 2014, at 19:23, Kyle Sluder k...@ksluder.com wrote: But Jonathan, why are you even exposing raw C pointer access to the identifiers in the first place? Why wouldn't you convert them to NSStrings and only expose them to Objective-C code that way? Jens sort of nailed it. The

Protocols and forwardingTargetForSelector:

2014-02-25 Thread jonat...@mugginsoft.com
I have an NSString subclass as below. If the subclass doesn’t respond to a given selector I want to forward the selector to another object. What is the best way to declare the interfaces for DBManagedString and DBManagedObject? Should I declare a DBManagedObject protocol in which all the

Re: Protocols and forwardingTargetForSelector:

2014-02-25 Thread jonat...@mugginsoft.com
On 25 Feb 2014, at 21:38, Greg Parker gpar...@apple.com wrote: On Feb 25, 2014, at 6:42 AM, jonat...@mugginsoft.com wrote: I have an NSString subclass as below. If the subclass doesn’t respond to a given selector I want to forward the selector to another object. What is the best way

Re: NSNumber : method to return pointer to represented value

2014-02-24 Thread jonat...@mugginsoft.com
On 23 Feb 2014, at 13:15, Graham Cox graham@bigpond.com wrote: Either that or a custom class would actually require very little effort - probably less than the typing in this discussion so far anyway! It actually takes a bit more effort to subclass NSNumber than it does to talk

Re: NSNumber : method to return pointer to represented value

2014-02-23 Thread jonat...@mugginsoft.com
On 23 Feb 2014, at 00:07, Graham Cox graham@bigpond.com wrote: NSNumber's can be slippery buggers, in my experience. Won’t disagree with that. Why are you so determined that you must use NSNumber, rather than your own class? You haven't adequately explained why that isn't a good

Re: NSNumber : method to return pointer to represented value

2014-02-23 Thread jonat...@mugginsoft.com
On 23 Feb 2014, at 10:05, Graham Cox graham@bigpond.com wrote: You might find it happens to work today but it is not contracted to do so I agree that there is some uncertainty going forward. Part of the issue I think is in the nature of class clusters. We rely on the behaviour of an

Re: NSNumber : method to return pointer to represented value

2014-02-22 Thread jonat...@mugginsoft.com
On 22 Feb 2014, at 08:32, Ken Thomases k...@codeweavers.com wrote: There's no one representation of an NSNumber's content. I think that this is the foundation of things. What there is is a reported representation as given by -objCType. The docs say, as I am sure you know: “ NSNumber objCType

Re: NSNumber : method to return pointer to represented value

2014-02-22 Thread jonat...@mugginsoft.com
On 22 Feb 2014, at 14:27, Jonathan Hull jh...@gbis.com wrote: I think the main objection everyone has is that they believe (as did I) that -getValue: is actually returning the internal representation of the object. That is a very pertinent point that we haven’t mentioned. -getValue:

Re: NSNumber : method to return pointer to represented value

2014-02-22 Thread jonat...@mugginsoft.com
On 22 Feb 2014, at 16:55, Jens Alfke j...@mooseyard.com wrote: But there's already a fully functional ObjC-C# bridge in Mono, isn’t there? I know that’s what MonoTouch for iOS is based on. Doesn’t it already handle bridging of NSDictionaries to C# Maps? The MonoTouch bindings are from C#

Re: NSNumber : method to return pointer to represented value

2014-02-22 Thread jonat...@mugginsoft.com
On 22 Feb 2014, at 15:32, Ken Thomases k...@codeweavers.com wrote: NSDecimalNumber can represent values that are outside of the range of doubles. So, _some_ NSDecimalNumber instances _may_ return d for double, but others definitely won't. I don’t think so. It is possible that this

NSNumber : method to return pointer to represented value

2014-02-21 Thread jonat...@mugginsoft.com
I require an pointer to the value represented by an NSNumber. No interior pointer exists as the class is immutable. My best attempt, a category that shadows the represented value, is as follows though I am wondering if I have missed a trick somewhere. NSNumber uses tagged pointers and my unit

Re: NSNumber : method to return pointer to represented value

2014-02-21 Thread jonat...@mugginsoft.com
On 22 Feb 2014, at 00:12, Ken Thomases k...@codeweavers.com wrote: On Feb 21, 2014, at 3:17 PM, jonat...@mugginsoft.com wrote: So I want to be able to send the same message to any class and get an appropriate void* pointer. There's no one representation of its content, so there's no way

Re: auto layout, 10.9, and NSScrollView and friends

2014-02-18 Thread jonat...@mugginsoft.com
On 18 Feb 2014, at 01:48, Rob Nikander rob.nikan...@gmail.com wrote: Hi, Last year I did some work in Cocoa and discovered that the auto layout stuff was not completely supported in some common AppKit classes. I remember having problems with NSScrollView and NSOutlineView. This message

Re: PDFPage init methods not called

2014-02-17 Thread jonat...@mugginsoft.com
On 14 Feb 2014, at 20:32, Antonio Nunes devli...@sintraworks.com wrote: On 14 Feb 2014, at 15:09, jonat...@mugginsoft.com wrote: PDFPage has two declared initialiser methods: - init - InitWithImage:(NSImage *)image When creating a PDFDocument with -initWithURL: neither of the above

NSPDFPanel accessory view validation

2014-02-14 Thread jonat...@mugginsoft.com
NSPDFPanel can display an accessory view. Is there any way to validate the accessory view input prior to closing the panel? In my case the user can can specify that a password should be required when opening the resultant PDF. I want to prevent the panel closing when the password requirement

PDFPage init methods not called

2014-02-14 Thread jonat...@mugginsoft.com
PDFPage has two declared initialiser methods: - init - InitWithImage:(NSImage *)image When creating a PDFDocument with -initWithURL: neither of the above are called on my PDFPage subclass. A bit of digging reveals that what is called is the undocumented: - (id)initWithPageRef:(id)pageRef

Re: VCs in the Responder Chain - Again, but with a good solution?

2014-02-12 Thread jonat...@mugginsoft.com
On 12 Feb 2014, at 00:49, Seth Willits sli...@araelium.com wrote: This is one of those topics I thought about 6 years ago, came across a decent easy-to-use solution that has worked fine so I've never really had to think about it again. Until today. skip long story All the way back to

Re: Xcode 5 Obj-C++

2014-01-30 Thread jonat...@mugginsoft.com
On 30 Jan 2014, at 00:42, Jens Alfke j...@mooseyard.com wrote: Anyone exposing a C++ API in a dynamic library is nuts, IMHO. What is it that makes C++ so unsuited to code sharing? Objective-C has great clarity of purpose (send a guy a message) and openness. Perhaps this is what makes it a

Re: Xcode 5 Obj-C++

2014-01-30 Thread jonat...@mugginsoft.com
On 30 Jan 2014, at 11:53, Rui Pacheco rui.pach...@gmail.com wrote: And isn’t all this message passing pretty much the same as calling methods in classes, just like you’d do in Java, C# or C++? I would say that message sending is very different indeed:

Re: RSA and libcrypto

2014-01-25 Thread jonat...@mugginsoft.com
On 14 Jan 2014, at 09:42, Charles Srstka cocoa...@charlessoft.com wrote: On Jan 14, 2014, at 3:19 AM, jonat...@mugginsoft.com wrote: The only problem with retaining it is the extra complexity involved in integrating the static library build into the project and upgrading the source

Design by contract and cocoa

2014-01-22 Thread jonat...@mugginsoft.com
Does anyone regularly use design by contract in their Cocoa apps? At present I often make use of NSAssert() et al to validate method inputs as a passing nod to design by contract, but that’s it. I know there are some macros available, http://www.roard.com/contracts/, but I haven’t

Re: Design by contract and cocoa

2014-01-22 Thread jonat...@mugginsoft.com
, jonat...@mugginsoft.com wrote: I know there are some macros available, http://www.roard.com/contracts/, but I haven’t experimented further as yet Interesting. I like the idea of dynamically creating a subclass that wraps the methods to be checked, but I don't like doing it with a bunch

Re: RSA and libcrypto

2014-01-14 Thread jonat...@mugginsoft.com
On 13 Jan 2014, at 22:09, Kyle Sluder k...@ksluder.com wrote: On Jan 13, 2014, at 1:57 PM, Jens Alfke j...@mooseyard.com wrote: On Jan 13, 2014, at 1:40 PM, Kyle Sluder k...@ksluder.com wrote: Unfortunately, SecKey{Encrypt,Decrypt} are not available on OS X. Oh crap, is this thread

Re: Fixed format report document building

2014-01-14 Thread jonat...@mugginsoft.com
On 9 Jan 2014, at 22:03, Kyle Sluder k...@ksluder.com wrote: On Thu, Jan 9, 2014, at 01:54 PM, jonat...@mugginsoft.com wrote: What is the best approach for generating fixed format report documents in Cocoa? My thoughts: This is exactly AppKit's document generation API. It's how

Re: RSA and libcrypto

2014-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2014, at 09:42, Charles Srstka cocoa...@charlessoft.com wrote: On Jan 14, 2014, at 3:19 AM, jonat...@mugginsoft.com wrote: The only problem with retaining it is the extra complexity involved in integrating the static library build into the project and upgrading the source

Re: RSA and libcrypto

2014-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2014, at 20:44, Charles Srstka cocoa...@charlessoft.com wrote: On Jan 14, 2014, at 1:09 PM, Jens Alfke j...@mooseyard.com wrote: On Jan 14, 2014, at 9:37 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote: Just in case it was not mentioned in the thread, SecTransform supports

RSA and libcrypto

2014-01-12 Thread jonat...@mugginsoft.com
I am trying to wean my app off libcypto via security.framework and common crypto. My last dependency is on RSA. Is there an alternative non openssl api or will I have to pursue linking a static instance of libcypto? Thanks Jonathan

Re: RSA and libcrypto (sorry - typos fixed)

2014-01-12 Thread jonat...@mugginsoft.com
I am trying to wean my app off libcrypto via security.framework and common crypto. My last dependency is on RSA. Is there an alternative non openssl api or will I have to pursue linking a static instance of libcrypto? Thanks Jonathan ___

Re: Corrected: Bug: Availability bindings on NSTextField cause attached NSNumberFormatter to fail

2014-01-10 Thread jonat...@mugginsoft.com
schrieb jonat...@mugginsoft.com: Hi Peter You say NSTextView. Do you mean NSTextField? Can we take a look at your demo project? Jonathan On 10 Jan 2014, at 09:10, Peter magn...@web.de wrote: This cost me a couple of hours of sleep. OS 10.9.1, Xcode 5.0.2 In my app I have

Re: NSUserDefault crash issue

2014-01-10 Thread jonat...@mugginsoft.com
On 10 Jan 2014, at 13:47, Arjun SM arjun...@gmail.com wrote: Hi all, I am having a crash issue when i am trying to set the dictionary for persistent domain. *Scenario* When user logs in to my application, my app receives a few settings from a server which is updated to

Fixed format report document building

2014-01-09 Thread jonat...@mugginsoft.com
Windows WPF has a fixed format document API. Its documentation states: Fixed documents are intended for applications that require a precise what you see is what you get (WYSIWYG) presentation, independent of the display or printer hardware used. Typical uses for fixed documents include desktop

AutoLayout constraint priorities

2013-12-17 Thread jonat...@mugginsoft.com
Jonathan Mitchell Mugginsoft LLP jonat...@mugginsoft.com - KosmicTask - the Integrated Scripting Environment for OS X. http://www.mugginsoft.com/KosmicTask

Scrollable NSStackView

2013-12-16 Thread jonat...@mugginsoft.com
WWDC 2013 Session Video 213: Best Practices for Cocoa animation briefly describes embedding an NSStackView in an NSScrollView. The commentary mentions in passing that the NSClipView instance must use flipped co-ordinates. Why? Is this a general requirement for using auto layout subviews in an

Re: NSStackView basics

2013-12-04 Thread jonat...@mugginsoft.com
://lists.apple.com/mailman/options/cocoa-dev/jonathan%40mugginsoft.com This email sent to jonat...@mugginsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: MultiBinding

2013-10-29 Thread jonat...@mugginsoft.com
On 28 Oct 2013, at 20:35, jonat...@mugginsoft.com wrote: On 28 Oct 2013, at 17:52, Gerd Knops gerti-cocoa...@bitart.com wrote: In Interface Builder text fields you can use Value with Pattern to combine multiple properties into a single output. Alternatively in code you can do something

Re: NSPopupButton and content values binding transformer

2013-10-28 Thread jonat...@mugginsoft.com
On 26 Oct 2013, at 21:28, jonat...@mugginsoft.com wrote: On 25 Oct 2013, at 10:58, jonat...@mugginsoft.com wrote: Value transformers applied to NSPopupButton have some idiosyncrasies. http://stackoverflow.com/questions/12505764/nspopupbutton-bindings-with-value-transformer I have applied

MultiBinding

2013-10-28 Thread jonat...@mugginsoft.com
Has anyone any suggestions for how to implement something similar to XAMLs MultiBinding class? Essentially this enables multiple bindings to be combined through a transformer to produce the final view output. http://msdn.microsoft.com/en-us/library/system.windows.data.multibinding.aspx

Re: MultiBinding

2013-10-28 Thread jonat...@mugginsoft.com
On 28 Oct 2013, at 17:52, Gerd Knops gerti-cocoa...@bitart.com wrote: In Interface Builder text fields you can use Value with Pattern to combine multiple properties into a single output. Alternatively in code you can do something like this: - (NSString *)fullName { return

Re: NSPopupButton and content values binding transformer

2013-10-26 Thread jonat...@mugginsoft.com
On 25 Oct 2013, at 10:58, jonat...@mugginsoft.com wrote: Value transformers applied to NSPopupButton have some idiosyncrasies. http://stackoverflow.com/questions/12505764/nspopupbutton-bindings-with-value-transformer I have applied a transformer to an NSPopupButton content values binding

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-25 Thread jonat...@mugginsoft.com
Keary On 25 Oct 2013, at 00:21, Keary Suska cocoa-...@esoteritech.com wrote: On Oct 24, 2013, at 9:01 AM, jonat...@mugginsoft.com wrote: Have I missed something or is access to a decent NSFormatter subclass to handle NSTextField string length limiting troublesome? I am currently using

NSPopupButton and content values binding transformer

2013-10-25 Thread jonat...@mugginsoft.com
Value transformers applied to NSPopupButton have some idiosyncrasies. http://stackoverflow.com/questions/12505764/nspopupbutton-bindings-with-value-transformer I have applied a transformer to an NSPopupButton content values binding but the IB configured transformer does not seem to be applied. I

NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread jonat...@mugginsoft.com
Have I missed something or is access to a decent NSFormatter subclass to handle NSTextField string length limiting troublesome? There is some form on this: http://stackoverflow.com/questions/827014/how-to-limit-nstextfield-text-length-and-keep-it-always-upper-case/827598#827598

Re: NSTextField, maximum string length, bindings and NSFormatter

2013-10-24 Thread jonat...@mugginsoft.com
Dmitriy On 24 Oct 2013, at 16:41, Dmitriy Balakirev dmitriy.balaki...@gmail.com wrote: For limiting text in NSTextField this works well: (_limit == 5, 30, etc.) - (BOOL)isPartialStringValid:(NSString *__autoreleasing *)partialStringPtr

NSDocument save customisation and -fileModificationDate

2013-10-22 Thread jonat...@mugginsoft.com
In my document app I prompt users to save when switching views via: NSDocument -canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo I can call this once successfully after which I receive a sheet saying: This document’s file has been changed by another application since you opened or

Re: NSDocument and KVO compliance

2013-10-21 Thread jonat...@mugginsoft.com
On 21 Oct 2013, at 06:01, Seth Willits sli...@araelium.com wrote: On Oct 19, 2013, at 9:27 AM, Jerry Krinock wrote: That's interesting and I've never seen it done. I'd call it a variation of writing custom accessors for each attribute. Custom accessors for each attribute have the

Re: How to change highlight colour on NSTableView row

2013-10-21 Thread jonat...@mugginsoft.com
On 21 Oct 2013, at 16:19, Darren Wheatley dar...@tenjinconsulting.co.uk wrote: Hi, I have a custom subclass of NSTableView in my app. Can anyone suggest a method that will allow me to set a custom highlight colour on on a row when the user clicks on it? I've Googled for a solution,

Re: NSDocument and KVO compliance

2013-10-19 Thread jonat...@mugginsoft.com
On 19 Oct 2013, at 03:58, Jerry Krinock je...@ieee.org wrote: In Core Data documents, I ignore -[NSDocument isDocumentEdited] and instead use -[NSManagedObjectContext hasChanges]. In OS X v10.6 and later, this property is key-value observing compliant. Unfortunately I am not using

Re: NSPopUpButton binding value/selected problem

2013-10-18 Thread jonat...@mugginsoft.com
On 17 Oct 2013, at 19:35, Trygve Inda cocoa...@xericdesign.com wrote: How can I tie the selected index to the Identifier (67897 instead of Hello) since the Identifier will not change? I don't want to bind the Selected Index to a selection in the NSArray Controller, but do want to be able

NSDocument and KVO compliance

2013-10-18 Thread jonat...@mugginsoft.com
Twice recently I have found myself tinkering with NSDocument et al to support observing of certain values. For example, NSDocument -isDocumentEdited is not seemingly KVO compliant. -isDocumentEdited status is driven by -updateChangeCount: so in MYDocument : NSDocument the override is:: -

Re: NSDocument and KVO compliance

2013-10-18 Thread jonat...@mugginsoft.com
On 18 Oct 2013, at 19:49, Seth Willits sli...@araelium.com wrote: That said, it would probably mostly work, but it's not always guaranteed to be bulletproof because those keys could also be influenced by private methods. My instincts agree. I will suck it and see. I don't really want

NSToolbar alternatives

2013-10-10 Thread jonat...@mugginsoft.com
Is anyone aware of any open source alternatives to NSToolbar? I have looked in the usual places and turned up nothing. I need to use InAppStoreWindow to customise the window title bar. That and the requirement for a ribbon-esque style toolbar exclude using NSToolbar. Jonathan

Re: NSUserInterfaceItemIdentification -identifier vs -tag

2013-10-09 Thread jonat...@mugginsoft.com
On 9 Oct 2013, at 05:32, Keary Suska cocoa-...@esoteritech.com wrote: On Oct 8, 2013, at 3:25 PM, Lee Ann Rucker wrote: On Oct 8, 2013, at 1:59 PM, jonat...@mugginsoft.com wrote: -tag and -identifier both have the advantage of being accessible from within IB. J Any simple

Responder chain query

2013-10-08 Thread jonat...@mugginsoft.com
I am building an OS X NSDocument app with a fairly complex view hierarchy and want to interpose my view controllers into the responder chain (this I can do). Some of the displayed views will feature just a button (to enable creation of a new object). This means that the first responder will be

Re: Responder chain query

2013-10-08 Thread jonat...@mugginsoft.com
On 8 Oct 2013, at 17:40, Seth Willits sli...@araelium.com wrote: On Oct 8, 2013, at 8:40 AM, jonat...@mugginsoft.com wrote: My intention is track the status of my top level view controllers and insert/remove these as required in the responder chain between the window and the window

NSUserInterfaceItemIdentification -identifier vs -tag

2013-10-08 Thread jonat...@mugginsoft.com
The NSControl -tag property can be used to identify an action sender. Can the NSUserInterfaceItemIdentification protocol property -identifier be safely used for the same purpose? It was introduced to support window restoration. The docs apply several caveats with regard to the identifier:

Re: NSUserInterfaceItemIdentification -identifier vs -tag

2013-10-08 Thread jonat...@mugginsoft.com
On 8 Oct 2013, at 21:54, Lee Ann Rucker lruc...@vmware.com wrote: On Oct 8, 2013, at 1:47 PM, jonat...@mugginsoft.com wrote: The NSControl -tag property can be used to identify an action sender. Can the NSUserInterfaceItemIdentification protocol property -identifier be safely used

Re: Modal Alert Sheet

2013-10-06 Thread jonat...@mugginsoft.com
On 5 Oct 2013, at 12:28, Jim Elliott sjameselli...@me.com wrote: An odd thing is happening when I invoke the NSAlert method beginSheetModelForWindow:modalDelegate:didEndSelector:conextInfo. It seems that the method returns before calling and returning from the didEndSelector. This is

Re: Autolayout fixed size centering in VFL

2013-10-04 Thread jonat...@mugginsoft.com
On 4 Oct 2013, at 21:52, Kyle Sluder k...@ksluder.com wrote: On Fri, Oct 4, 2013, at 01:31 PM, jonat...@mugginsoft.com wrote: I have a fixed size custom OS X view that I load from a nib and want to centre within a host view using auto layout. Can this be done using VFL alone? No. Thanks

Re: NSValidatesImmediatelyBindingOption confustication

2013-09-26 Thread jonat...@mugginsoft.com
On 26 Sep 2013, at 04:52, Keary Suska cocoa-...@esoteritech.com wrote: No, you have it right. The docs have it wrong. Please file a bug ;-) Bug is in: 15086319 Jonathan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

NSValidatesImmediatelyBindingOption confustication

2013-09-25 Thread jonat...@mugginsoft.com
WRT NSValidatesImmediatelyBindingOption the binding docs say: Q A Boolean value that determines if the contents of the binding are validated immediately. If YES, the value is validated as it is entered. Otherwise, the content is validated only when the user interface item

[ANN] .NET/MONO - ObjC code generation with Dubrovnik

2013-09-24 Thread jonat...@mugginsoft.com
see https://github.com/ThesaurusSoftware/Dubrovnik Dubrovnik is a framework and set of tools to assist with interfacing Obj-C to .NET/Mono. The framework provides Obj-C access to the embedded Mono API and the code generator reflects on managed assemblies to produce Obj-C source. This largely

WebView find panel/bar implementation

2013-04-02 Thread jonat...@mugginsoft.com
I provide some app documentation in both RTF and MarkDown and switch in an NSTextView or WebView for display as required. Text view searching works well using the NSTextFinder find bar. However, implementing a WebView find panel/bar seems difficult. - (void)performFindPanelAction:(id)sender is

Re: WebView find panel/bar implementation

2013-04-02 Thread jonat...@mugginsoft.com
On 2 Apr 2013, at 17:13, Mike Abdullah cocoa...@mikeabdullah.net wrote: On 2 Apr 2013, at 12:43, jonat...@mugginsoft.com wrote: I provide some app documentation in both RTF and MarkDown and switch in an NSTextView or WebView for display as required. But I don't see much in way

Re: NSUserNotificationCenter: Spoofing the app name/icon?

2013-02-13 Thread jonat...@mugginsoft.com
Is it not possible to use IPC to have the helper message the client app so that the client does the actual posting? Regards Jonathan Mitchell Mugginsoft LLP On 12 Feb 2013, at 22:01, Nick Zitzmann n...@chronosnet.com wrote: Short question: How do I spoof the application name icon when a

Re: Best guess at expressing a string as a variable

2013-01-23 Thread jonat...@mugginsoft.com
On 23 Jan 2013, at 01:32, Keary Suska cocoa-...@esoteritech.com wrote: On Jan 22, 2013, at 6:18 PM, Jens Alfke wrote: On Jan 22, 2013, at 3:28 PM, jonat...@mugginsoft.com wrote: Is + (id)letterCharacterSet the best choice here? The API docs say Informally, this set is the set of all

Re: Best guess at expressing a string as a variable

2013-01-23 Thread jonat...@mugginsoft.com
On 23 Jan 2013, at 11:40, Jean Suisse jean.li...@gmail.com wrote: On 23 janv. 2013, at 02:18, jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: My current thinking is, regardless of the language, is to exclude all characters that are not members of NSCharacterSet + (id

Re: Best guess at expressing a string as a variable

2013-01-23 Thread jonat...@mugginsoft.com
On 23 Jan 2013, at 13:07, Uli Kusterer witness.of.teacht...@gmx.net wrote: On Jan 23, 2013, at 2:18 AM, jonat...@mugginsoft.com wrote: Hmm. Maybe not. I want to keep the generated variable name legible. You need to nail down the languages you want to deploy to, and then find out what

Best guess at expressing a string as a variable

2013-01-22 Thread jonat...@mugginsoft.com
I have a generic descriptive title of a parameter and want to express it as a variable name within a script. So if my title is No more awesome today, please! I will likely render this as no-more-awesome-today-please ( I can define the separator style). I am targeting about 20 or so scripting

Re: Best guess at expressing a string as a variable

2013-01-22 Thread jonat...@mugginsoft.com
On 23 Jan 2013, at 00:05, Jean Suisse jean.li...@gmail.com wrote: Dealing with English seems not too troublesome but titles composed in other languages might be a different matter. Do you want to deal with other languages ? For instance Japanese, Chinese, Korean, Arabic, etc. ? The

Re: How to add the cells(views) in a columnwise instead of Rowwise in PXListView?

2013-01-21 Thread jonat...@mugginsoft.com
On 21 Jan 2013, at 09:41, Muthulingam Ammaiappan muthulinga...@gmail.com wrote: i am modifying the PXListView as per my requirement...(please refer the ThumbnailListView.png) the main problem is PXListView having one column and cells are added in a new row. but what i needed is i need a

Re: Changing color in NSColorPanel without message

2013-01-17 Thread jonat...@mugginsoft.com
On 17 Jan 2013, at 00:58, Melvin Walker mwal...@mac.com wrote: On Jan 16, 2013, at 4:45 PM, Andy Lee ag...@mac.com wrote: On Jan 16, 2013, at 6:09 PM, Melvin Walker mwal...@mac.com wrote: [...] When you select a color in the panel, NSColorPanel sends a changeColor: message to the first

Re: Changing color in NSColorPanel without message

2013-01-17 Thread jonat...@mugginsoft.com
On 17 Jan 2013, at 00:58, Melvin Walker mwal...@mac.com wrote: On Jan 16, 2013, at 4:45 PM, Andy Lee ag...@mac.com wrote: On Jan 16, 2013, at 6:09 PM, Melvin Walker mwal...@mac.com wrote: [...] When you select a color in the panel, NSColorPanel sends a changeColor: message to the first

Re: AppleScript in Sandboxed App

2013-01-16 Thread jonat...@mugginsoft.com
On 16 Jan 2013, at 03:44, John Nairn j...@geditcom.com wrote: Thanks. I watched the one on Seccure Automation Techniques in OS X. Near the end it said exactly what I wanted to hear which is that application-run scripts that target only themselves have no restrictions. So far it is half

Re: How do I implement the container view which represent the thumbnail of video having variable cell sizes?

2013-01-16 Thread jonat...@mugginsoft.com
On 16 Jan 2013, at 11:39, Muthulingam Ammaiappan muthulinga...@gmail.com wrote: Hi friends, i am developing cocoa application on mac os x, which will allows the user to import the video clips and make the movie from those video clips.here i need to deal with highly customized

Re: NSString and file system Re: AppleScript in Sandboxed App

2013-01-16 Thread jonat...@mugginsoft.com
On 16 Jan 2013, at 15:50, Fritz Anderson fri...@manoverboard.org wrote: On 16 Jan 2013, at 3:52 AM, jonat...@mugginsoft.com jonat...@mugginsoft.com wrote: Py_SetProgramName((char *)[[scriptRunner launchPath] UTF8String]); If a char* is destined for the file system, you should

Re: Changing color in NSColorPanel without message

2013-01-16 Thread jonat...@mugginsoft.com
On 16 Jan 2013, at 20:47, Melvin Walker mwal...@mac.com wrote: Is it possible to programmatically change color (using -setColor:) in NSColorPanel without it sending a changeColor: message to the first responder? We'd like it to just reflect a color change without telling the responder

Re: How to get registered dragged types from NSWindow?

2013-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2013, at 11:17, Oleg Krupnov oleg.krup...@gmail.com wrote: Unlike NSView, there is no -registeredDraggedTypes method in NSWindow. How do I find out which dragged types a window is registered to? Your window has to know what drag types it will respond to. NSDraggingDestination

Re: AppleScript in Sandboxed App

2013-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2013, at 17:59, Mike Abdullah cocoa...@mikeabdullah.net wrote: Go watch the sandboxing videos from WWDC this year. They cover automation quite a bit, and all will be made much clearer. You want session 206 - Secure automation techniques in OS X. If you don't have access we

Re: simulating enter in a text field by pressing a button

2013-01-07 Thread jonat...@mugginsoft.com
On 2 Jan 2013, at 21:03, Joel Reymont joe...@gmail.com wrote: I have a dialog (sheet) with a single text field and a button. I'm using Cocoa Bindings to validate the value in the text field and set a string field in the File's Owner. This works fine but I would like to trigger the same

Re: Text Field Cells in Table View: Enabled and Editable not working

2013-01-02 Thread jonat...@mugginsoft.com
On 2 Jan 2013, at 04:56, Jerry Krinock je...@ieee.org wrote: This should be easy but I've been stumped for two hours. In the xib, Table columns' Editable checkboxes are switched on. Text field cells' Enabled checkboxes are switched on. Is the text field cell behaviour drop down set

Re: What rect does NSTextFieldCell use to draw its contents?

2012-12-14 Thread jonat...@mugginsoft.com
On 13 Dec 2012, at 23:17, Kyle Sluder k...@ksluder.com wrote: Since I'm comparing the string-drawing methods to NSTextFieldCell drawing, according to this documentation there should be no difference. In my test case I compared the cells rendering with an NSTextField configured as a label.

Re: Bindings validation for NSMutableArray of NSMutableDictionary

2012-12-14 Thread jonat...@mugginsoft.com
On 14 Dec 2012, at 11:13, Mike Abdullah cocoa...@mikeabdullah.net wrote: I'd strongly advise the OP it's better for them to create a custom class for their model objects, rather than go down this route of globally modifying NSMutableDictionary's API. In general I would strongly advise this

Bindings validation for NSMutableArray of NSMutableDictionary

2012-12-13 Thread jonat...@mugginsoft.com
I bind an NSArray of NSMutableDictionary instances to an NSTableView and enable NSTableColumn editing.. How can I best implement KVO based validation when editing the view? Subclassing NSArray controller is a no go as validateValue:forKeyPath:error is never called. Subclassing the

Re: Bindings validation for NSMutableArray of NSMutableDictionary

2012-12-13 Thread jonat...@mugginsoft.com
On 13 Dec 2012, at 11:54, jonat...@mugginsoft.com wrote: I bind an NSArray of NSMutableDictionary instances to an NSTableView and enable NSTableColumn editing.. How can I best implement KVO based validation when editing the view? Subclassing NSArray controller is a no go

Re: blocks and id

2012-12-12 Thread jonat...@mugginsoft.com
On 12 Dec 2012, at 09:57, Andreas Grosam agro...@onlinehome.de wrote: On 12.12.2012, at 10:19, Charles Srstka wrote: On Dec 12, 2012, at 3:03 AM, Andreas Grosam agro...@onlinehome.de wrote: How can I check at runtime whether an object (id) is actually a block, and not another kind of

Re: How to capture a video stream

2012-12-11 Thread jonat...@mugginsoft.com
On 11 Dec 2012, at 05:33, gary.gard...@brokensoftware.com wrote: I need further assistance. I select the capture device, but after I execute run, I get the following: Invalid memory access of location 0x0 rip=0x7fff933e3598 942 Segmentation fault: 11 I am following the AVVideoWall

  1   2   3   4   5   >