Re: NSPopupButton and bindings to NSArrayController

2008-07-27 Thread John Joyce
On Jul 27, 2008, at 9:56 PM, [EMAIL PROTECTED] wrote: When attempting to use NSPopupButton and bindings to NSArrayController, as a means to navigate an array of objects, is there any tutorial or example out there? I don't believe specifically for your case (ie, an NSPopUpButton), but this

Checking for hackintosh

2008-07-29 Thread John Joyce
Does anybody have a means or a tool for checking for hackintoshes? I really don't approve of such things and would like to leave clever messages on my own software if it is run on a hackintosh. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Cocoa / AppleScript Folder Action

2008-08-03 Thread John Joyce
I know I can do awkward things with AppleScript and Folder Action scripts, but is there a strictly Cocoa/Objective-C way to do something like Folder Action scripts short of a daemon? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Controlling line-breaking in a text view

2008-08-10 Thread John Joyce
You might consider subclassing, but you might also want to read a lot more stuff first. Cocoa (and Carbon) text facilities are pretty deep. There is nothing about a bug in the text system. It is just that the text handling in Cocoa is very sophisticated and is designed to handle things depe

Subclassing NSTextView

2008-08-12 Thread John Joyce
In Xcode 3.1, what is the minimum necessary to create a useable subclass of NSTextView ? (before adding/overriding methods) Additionally, in IB, is there any effective difference from using an NSTextView, selecting the text view within its scroll view and changing its class (in the inspector

RE: Subclassing NSTextView

2008-08-12 Thread John Joyce
Ooops, nevermind!! I answered my own question. When adding the class file to the project, start with the NSView subclass template, then change it to subclass NSTextView in the .h and in the .m either call [super drawRect:rect]; or comment out or delete the drawRect method all together. That w

Using Flex/Lex in a Cocoa project

2008-08-15 Thread John Joyce
Right now, I'm toying with using Flex/Lex in a Cocoa project. Unfortunately, I don't see a reliable or easy way to handle NSStrings correctly all the time with Flex. Does anybody have any suggestions for such text handling and reliable unicode aware regexes? I'm seriously not interested in imp

Re: Cocoa-dev Digest, Vol 5, Issue 1470

2008-08-16 Thread John Joyce
On Fri, Aug 15, 2008 at 10:53 PM, John Joyce <[EMAIL PROTECTED]> wrote: Right now, I'm toying with using Flex/Lex in a Cocoa project. Unfortunately, I don't see a reliable or easy way to handle NSStrings correctly all the time with Flex. Does anybody have any suggestions for su

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread John Joyce
On Aug 18, 2008, at 7:01 PM, [EMAIL PROTECTED] wrote: to avoid the splitting problem (c < 128) ? "%c" : "\\u%04x", c); Not quite sure what this is doing. I see it's checking for ASCII range if ( c < 128 ) The conditional is obvious, but what's the other doing exactly? returning a char if it

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread John Joyce
On Aug 18, 2008, at 8:12 PM, Ricky Sharp wrote: On Aug 18, 2008, at 8:01 PM, John Joyce wrote: On Aug 18, 2008, at 7:01 PM, [EMAIL PROTECTED] wrote: to avoid the splitting problem (c < 128) ? "%c" : "\\u%04x", c); Not quite sure what this is doing. I see it

Re: Using Flex/Lex in a Cocoa project

2008-08-19 Thread John Joyce
On Aug 18, 2008, at 9:23 PM, Graham Cox wrote: On 19 Aug 2008, at 11:53 am, John Joyce wrote: I wonder if it wouldn't make sense to just start trying to build some new form of flex in Objective-C... so that it uses NSString and NSMutable string ? I'm looking at the Flex sourc

Core Data Bindings with Table View

2008-08-25 Thread John Joyce
I'm having a little difficulty making sense of the right bindings here. I'm using Core Data. No problem, simple modeling. Entity: App Attribute: name Relationship: relatedFile (to many) Entity: File Attribute: path Relationship: relatedApp (to one) NSArrayControllers: Apps, Files Both are bound

Re: Core Data Bindings with Table View

2008-08-25 Thread John Joyce
Thanks Tim! That did it. It makes sense, but it definitely wasn't the most intuitive. I kept trying to set a key path in the tableView or column bindings, which could logically make sense. I must say that core data itself is easy, conceptually, having worked with Rails and ActiveRecord. It'

App names

2008-08-31 Thread John Joyce
When dealing with applications (application bundles) by name or path, in Cocoa, when does it make a difference whether you use App Name.app example: Front Row.app or: /Applications/Front Row.app versus App Name example: Front Row or: /Applications/Front Row This seems to be pretty important, an

Re: App names

2008-08-31 Thread John Joyce
On Aug 31, 2008, at 4:51 PM, [EMAIL PROTECTED] wrote: If you're dealing with a file path, then of you of course need to specify the extension -- it's part of the file name. You've always had to, and always will have to. -- Seth Willits AppleScript certainly doesn't care about extensions

Accessing SDL Frameworks Bundled with Leopard...

2008-09-04 Thread John Joyce
Does anybody know any official or proper way to link to the SDL framework that is bundled in the root library in Leopard? /Library/Frameworks/SDL.framework is surprisingly, there! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Accessing SDL Frameworks Bundled with Leopard...

2008-09-05 Thread John Joyce
Well, thanks. I guess I must have installed it at some point, but I don't recall downloading it... I wonder if it was packaged with something else... well good to know I hadn't lost my mind in thinking that it was strange that I had not seen that there before ___

Re: How to get Safari Bookmarks in the code

2008-09-29 Thread John Joyce
On Sep 29, 2008, at 9:50 AM, [EMAIL PROTECTED] wrote: Subject: How to get Safari Bookmarks in the code To: [EMAIL PROTECTED], cocoa-dev@lists.apple.com Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 Hi All, I am creating a application that needs to displ

Re: machine with null serial number?

2008-03-28 Thread John Joyce
Indeed it is almost always when a mac has had the logic board replaced/repaired. It does occur. Sometimes even a new batch of macs may ship without serial numbers or even with a system profiler depicting the wrong system. It's pretty rare, but does happen, so it may not be the best thing to

Re: machine with null serial number?

2008-03-29 Thread John Joyce
Indeed, on repair, the computer should have the old serial number. This is why it is also located on the case, exact location depends on the model. The only time there should ever be a new serial number is when a Mac is outright replaced. Definitely, it is a bad idea to depend on the serial

Re: setMenuVisible

2008-03-30 Thread John Joyce
On 27.03.2008, at 08:24, Wesley Smith wrote: I'm trying to make an NSWindow that takes up the entire screen including the menu bar but is not actually a fullscreen window. I know this is possible with Carbon, but I can't figure it out with Cocoa. Whenever I call [NSMenu setMenuVisible:TRUE], t

Custom Buttons - Tutorial/Examples...

2008-04-05 Thread John Joyce
Does anybody know a tutorial or example on creating custom buttons in Cocoa? I can certainly set an image in IB or programmatically, but how can I determine the actual hitmask? Or even set the mouseOver type of event for something like a rollover ? I know I'm talking about stepping on Apple's

Re: Capture youtube image in webview

2008-04-10 Thread John Joyce
You may need to try a different method. The keyboard shortcuts for taking screenshots, as well as the bundled application Grab, are both capable of making an image that includes flash video in a web view. You might simply do it with AppleScript...

Forced Refreshing of WebKit

2008-04-14 Thread John Joyce
On Apr 14, 2008, at 2:02 PM, [EMAIL PROTECTED] wrote: Forced Refreshing of WebKit To force refresh a WebKit view, do the same thing web developers do: JavaScript...? or - reload: example from webview docs: - (IBAction)reload:(id)sender ___ Cocoa

After Unarchive Object Exists, After First GUI Action, gone...

2008-04-20 Thread John Joyce
I apologize for the beginner nature of this, I must be missing something obvious, but I cannot see it. Archiving works fine. The data is there. I've inserted NSLogs everywhere to no avail. When the file is opened (unarchived) the log showed me the first object in my array has the correct data

Re: After Unarchive Object Exists, After First GUI Action, gone...

2008-04-20 Thread John Joyce
Looks like I found a solution... anyone please let me know if my solution stinks. (or any of the rest of this thing!) In the method - (void)windowControllerDidLoadNib:(NSWindowController *) aController I added this: [textView setString:[[stickitNotes objectAtIndex:0] noteBody]]; #import

Re: After Unarchive Object Exists, After First GUI Action, gone...

2008-04-21 Thread John Joyce
On Apr 21, 2008, at 6:45 AM, [EMAIL PROTECTED] wrote: Date: Mon, 21 Apr 2008 01:16:56 -0700 From: Andrew Farmer <[EMAIL PROTECTED]> Subject: Re: After Unarchive Object Exists, After First GUI Action, gone... To: John Joyce <[EMAIL PROTECTED]> Cc: cocoa-dev@lists.apple.co

Re: [Ann] DMG Canvas

2008-04-22 Thread John Joyce
Is there a way using this tool or even programmatically, to have disk images mount without having the collapsed toolbar? The biggest user confusion I see is that they do not even recognize it to be a window since most users don't even know what that capsule shaped button does. There is defi

Re: How is "Apple + Ctrl + D" implemented?

2008-04-28 Thread John Joyce
Graham, Thanks for your reply! But how can I "find the range of the word" given the glyph index? I just can not find an API doing so. So I don't think this is the underlying implementation. Any comments from others? The range of the word is up to you to find and depends on the language.

Re: Cocoa-dev Digest, Vol 5, Issue 727

2008-05-04 Thread John Joyce
I'm struggling and maybe tired, but how do you set the state of and NSMatrix with radio buttons and NSPopUpButton ? Does it go in windowDidLoad or should it be in awakeFromNIB ? This is in a Preference window for my app. I'm having a hard time figuring out how to get it to set state to reflect

Trouble using NSMatrix with radiobuttons and using NSPopUp buttons

2008-05-05 Thread John Joyce
(sorry for the repost, I forgot to change the subject line before) I'm struggling and maybe tired, but how do you set the state of and NSMatrix with radio buttons and NSPopUpButton ? Does it go in windowDidLoad or should it be in awakeFromNIB ? This is in a Preference window for my app. I'm ha

Saving as xml

2008-05-05 Thread John Joyce
What's the best method to save a document as xml? Should NSKeyedArchiver be doing this? My document and its objects are very simple, they can easily be nothing more than BOOLs and NSStrings (as keys). Other issue: If I have an NSDictionary (composed of two NSArrays' objects, keysArray, objec

Re: Problem getting subclass of NSTextContainer working properly [SOLVED]

2008-05-10 Thread John Joyce
Graham, that would be very cool to have posted here! If nothing else, it will be in the archive for others who run into it. (I'm in agreement about the clarity of a large number of docs... there often seems to be a circular relationship of what you need to understand before being able to under

Re: Xcode-like window menu?

2008-05-13 Thread John Joyce
Gerd, What XCode probably does, is simply switch documents, rather than switching windows. But yes, you probably need to programmatically interact with your NSDocument, NSDocumentController, NSWindowController objects. remember the hierarchy NSDocumentController > NSDocument (multiple distinc

Save as and Open conditional code samples? tutorials?

2008-05-13 Thread John Joyce
separators (basically like a CSV file). Handling the text and doing things with it is easy. I just don't know what sort of design patterns exist for handling additional file types. thanks in advance John Joyce ___ Cocoa-dev mailing

Re: Targetting Tiger

2009-01-24 Thread John Joyce
Your best bet is to purchase a used Mac that can run Tiger and use it for test builds. There is a huge installed userbase of Tiger still, remember it has been the longest single incarnation of OS X. (as a result of this long life of Tiger, there are lots of affordable used macs that can do

Re: Targeting Tiger

2009-01-25 Thread John Joyce
On Jan 24, 2009, at 8:31 PM, cocoa-dev-requ...@lists.apple.com wrote: Not sure what you mean by "capable of running tiger". If you have a machine capable of running Leopard, it should be able to run tiger. Not true. In general, any Mac requires the latest OS available at the time it

Using new Cookies

2009-02-28 Thread John Joyce
at is best practice in this regard? Is it something so simple as sending a unique user agent string, or is it something else? Regards, John Joyce ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comme

Re: Running Cocoa applications from file servers

2009-03-01 Thread John Joyce
On Feb 25, 2009, at 12:00 PM, cocoa-dev-requ...@lists.apple.com wrote: On Wed, Feb 25, 2009 at 10:43 AM, Erik Buck wrote: Where did the fetish for installing every single application on the local hard disk come from ? Isn't it insane to have 35 installed copies of OmniGraffle using up

Setting Minimum and Maximum width of Toolbar items

2008-10-11 Thread John Joyce
I've noticed that in IB 3, the Minimum and Maximum width of Toolbar items does not stick. You can enter it, command+S to save and then click done, and everything reverts back to 96px wide. One can only presume this is a bug or I don't know something. Do these things need to be set programmatic

RE: Setting Minimum and Maximum width of Toolbar items

2008-10-11 Thread John Joyce
Never mind. I have found the solution. The "Document" window in IB 3 must be in list view. In List, expand the tree of disclosure triangles from Toolbar Toolbar > Toolbar Item (name if any) With the Toolbar Item highlighted in List View, it is possible to get the sizing to stick in IB 3's Inspe

Re: what do you use to make icons and similar?

2008-10-19 Thread John Joyce
: I believe png are really what I'm trying to make here, they seem to be recommended. PNGs are not resolution independent, although they are perfectly acceptable. Saving as a TIFF then converting it to PDF with Preview works well for me. Please excuse me if I missed something earlier in the

Re: Creating Toolbar Items in IB

2008-10-22 Thread John Joyce
It is still buggy. Sometimes arrangements and sizes stick. Sometimes they don't. Use list/tree view in the "document" window of IB. This is the easy to forget about, but very useful way to be sure you're connecting outlets. Particularly, with toolbar items. __

Re: Turning off Auto Complete feature for NSTextField

2008-10-28 Thread John Joyce
On Oct 28, 2008, at 8:42 AM, [EMAIL PROTECTED] wrote: Turning off Auto Complete feature for NSTextField To: cocoa-dev@lists.apple.com Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii Hi, I am encountering a small problem. I am using a simple NSTextField in my appl

Re: Controller and NIB

2008-10-28 Thread John Joyce
Make sure you're spelling the method signature 100% correctly. I myself have made a minor typo in a method (many times, who hasn't?) and then spent the next 20 minutes or longer bashing my head looking for my mistake. Spelling counts 100% Capitalization ( my mistake has often been NIB instead

Re: Static text over an image

2008-10-30 Thread John Joyce
On Oct 30, 2008, at 7:41 AM, [EMAIL PROTECTED] wrote: Date: Thu, 30 Oct 2008 10:31:03 From: Mark Allan <[EMAIL PROTECTED]> Subject: RE: Re: Static text over an image To: Brandon Walkin <[EMAIL PROTECTED]>, Andre Masse <[EMAIL PROTECTED]> Cc: Cocoa Dev Message-ID: <[EMAIL PROTECTED

Re: Porting from Windows to Mac

2008-10-30 Thread John Joyce
There are many great examples of well-made cross-platform apps out there. One of the best examples I've seen, even in terms of code and organization.. VLC player! It's open source so you can see how they manage things. ___ Cocoa-dev mailing list (C

Notification Vs Delegation

2008-10-31 Thread John Joyce
This may be a pointless and silly question, but is Delegation faster than Notification (generally) ? ___ 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

Full screen filters

2008-11-08 Thread John Joyce
Is there anything documented on what is and is not functional when a view becomes full screen? I have a view that when set to be very very transparent, only appears dark in full screen mode. What I'd like to do is create a layer on top of the screen to apply image filters / effects but still

Re: NSGraphiteControlTint in app

2008-11-10 Thread John Joyce
Hello, I don't think the method setControlTint is the solution I'm looking for, because only a few classes have such a method, NSWindow doesn't. Maybe my question was to general. Is there a way without using private methods to set the complete appearance of an application to NSGraphiteCon

RE : How are we supposed to retrieve the generic bundle icon?

2008-11-11 Thread John Joyce
t clean or pretty, but it worked for me for what I needed. You may need to escape spaces in file/dir names... CoreServices is the source of a large number of icons... sips is an osx command line tool with an undocumented ability to convert icns files to image formats...) # script to get ico

Binding a CoreData string value to an NSTextView

2008-11-18 Thread John Joyce
Has anyone had any success Binding a CoreData string value to an NSTextView? Everything I try seems to be flumoxed by the NSAttributedString of the NSTextStorage backing store. The lame thing is this: in code, it is easy to [aTextView setString: (NSString*)aString] or [aTextView string] So wha

Re: Still unable to work out mouse position

2008-11-28 Thread John Joyce
On Nov 28, 2008, at 11:23 PM, [EMAIL PROTECTED] wrote: From: "Christian Graus" <[EMAIL PROTECTED]> Subject: Still unable to work out mouse position To: cocoa-dev@lists.apple.com Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 Thanks to the person who answer

Converting String Representations at Runtime

2009-04-12 Thread John Joyce
Is there an easy way to take input (user or file based) at runtime and convert unicode strings such as \u8D64 (UTF8 character) or a whole series of these to the human-readable characters they represent? I imagine I should be using NSScanner, but is there not some simple function or method to

Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.

2009-04-19 Thread John Joyce
Currently, I'm using CFStringTransform to convert Java-based strings files (JBoss .properties files) to something human-readable for verification. Works brilliantly. Luckily, these files are short and this function is super fast. This enables me to naively take all the text of a file provided

Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.

2009-04-19 Thread John Joyce
On Apr 19, 2009, at 3:42 PM, John Joyce wrote: Currently, I'm using CFStringTransform to convert Java-based strings files (JBoss .properties files) to something human-readable for verification. Works brilliantly. Luckily, these files are short and this function is super fast. This en

Re: Converting String Representations at Runtime

2009-04-20 Thread John Joyce
Is there an easy way to take input (user or file based) at runtime and convert unicode strings such as \u8D64 (UTF8 character) or a whole series of these to the human-readable characters they represent? I imagine I should be using NSScanner, but is there not some simple function or method to

Re: detect option key on startup

2009-05-10 Thread John Joyce
Depending on why you want to do this, you may want/need to try different approaches with mini-test apps to see what your results are. If you test with iPhoto for example, it does load the main menu nib, but loads a different nib than the usual main window for choosing or creating an iPhoto li

Re: Core Animation warning?

2013-12-04 Thread John Joyce
On Dec 3, 2013, at 10:23 PM, Graham Cox wrote: > I’m seeing quite a few of these being logged: > >> CoreAnimation: warning, deleted thread with uncommitted CATransaction; set >> CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. > > I’m not directly using Core Animation anywhere in thi

CGDisplayIOServicePort

2013-12-24 Thread John Joyce
Hello all, CGDisplayIOServicePort is documented as deprecated but available in 10.9 with no replacement. Is there any known, non-deprecated alternative function? Thanks, JJ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: FlagsChanged while NSMenu is displayed

2014-01-25 Thread John Joyce
So, just to follow up. Timer approach works. It works quite well. Thanks for recommending it. In fact, far better than the CGEventTap approach in terms of reliability. CGEventTaps always seem to be a bit flaky. The NSTimer approach is very responsive and I can constrain it to just the time when t

Re: Display selectd sub-menuItem in NSPopUpButton

2014-02-15 Thread John Joyce
On Feb 15, 2014, at 6:29 AM, Leonardo wrote: > Hi John, > Thank you for the code. I suppose I missed something because it doesn’t work > as expected. > I did: > > I created a popUpMenu on IB and put it on the window and connected to the > outlet popUpButton. > I connected the popUp outlet to

Re: Display selectd sub-menuItem in NSPopUpButton

2014-03-17 Thread John Joyce
On Feb 15, 2014, at 12:29 AM, Keary Suska wrote: > On Feb 14, 2014, at 5:02 AM, Leonardo wrote: > >> I have filled my NSPopUpButton with menu and submenus. >> >> When I select a menuItem on the root menu (so, not a sub-menuItem), it >> propery displays the menuItem selected. And when I re-clic

Re: Excessive open gui graphics files on Mavericks

2014-04-08 Thread John Joyce
On Apr 9, 2014, at 2:28 PM, ChanMaxthon wrote: > The SQLite DB thing is just like a tar archive, and if you dare to you can > even include a cramfs driver in your code and consolidate all your resources > into one optionally encrypted cramfs image. Every file archiving method that > allows in

Re: Need for Swift

2019-10-15 Thread John Joyce via Cocoa-dev
> > On Oct 15, 2019, at 22:58, Turtle Creek Software via Cocoa-dev > wrote: > > Nobody > is every going to write a full CAD, project management or business > accounting app in either Swift or Obj-C. > > TurtleSoft has a big investment in C++ source code that's full of > construction business

Re: Customizing the Notarization Workflow fails

2020-04-25 Thread John Joyce via Cocoa-dev
The life hack for this is to have a Run Script Build Phase that just lists out the build variables and their values. Then you look them up in the help menu to confirm what they mean. > On Apr 26, 2020, at 10:29, Jack Brindle via Cocoa-dev > wrote: > > Before someone reminds me, be sure to u

Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread John Joyce via Cocoa-dev
> > On Jun 29, 2020, at 10:53, Graham Cox via Cocoa-dev > wrote: > > In the “old days”, your app could periodically call UpdateSystemActivity( > UsrActivity ) to prevent the screensaver kicking in. This has been deprecated > since 10.8, but the header for that function says it can be replac

<    1   2   3