Re: Using Flex/Lex in a Cocoa project
Just a thought, I haven't tried it, but the Core Foundation code is pure C, so you could send the NSString as a CFString, which is "toll- free bridged", which should mean you don't even have to make a cast (though, again, I haven't worked with this), but basically, you should be able to create a pure C function that invokes the lexer, and write the flex code to use the Core Foundation libraries, accepting a CFString, and I think that's all you'd need. Dustin KC9MEL On Aug 15, 2008, at 9:53 PM, John Joyce 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 such text handling and reliable unicode aware regexes? I'm seriously not interested in implementing such details in C with Flex. Flex is fast and cool for that, but if it's going to be stupidly difficult to use reliably with other languages on a mac, it's not a good idea for me. ___ 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/mac_vieuxnez %40mac.com This email sent to [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
Re: NSSearchField bindings almost work
Ok, I'm not sure if anyone looked at this at all, but I figured out that I needed my predicate format binding to be "some somePath contains[cd] $value", for it to behave correctly, due to the fact that the paths that were malfunctioning for me were to-many relationships. I still don't understand why the filters worked as expected when I typed in the full string of one of the relationship's path's values, but it doesn't worry me too much, since it's working now. Dustin KC9MEL On Aug 8, 2008, at 6:11 PM, Dustin Robert Kick wrote: I have a program set up with core data, and I have a list of predicates to filter the data shown, which work only if you type in the entire string value of the data item being used to filter, though I'm using "somePath contains[cd] $value" for the binding, where somePath are various paths I'm trying to filter. Is there something besides "contains" I should be using to get the described behavior of "contains"? Dustin KC9MEL smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
Re: Programmatically place cursor within NSTextField
This can also be done with an NSFormatter. I've only worked through one example, long enough ago that I can't give helpful details, but you should be able to find an example on how to do something similar to what you're trying to do. I believe the example I looked at was using an NSFormatter to automatically place the dashes in a phone number... Ok, the example I was thinking of was in "Cocoa Programming" (http://tinyurl.com/cocproggb ) There is also "Introduction to Data Formatting Programming Guide For Cocoa" in the Xcode documentation, I'm sure they'll give a pretty good example in there. Dustin KC9MEL On Aug 13, 2008, at 6:02 AM, [EMAIL PROTECTED] wrote: How can I programmatically position the cursor to an arbitrary position with a NSTextField? For example, placing a cursor within the parentheses '('...')' of a phone number? Regards, Ric. ___ 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/mac_vieuxnez %40mac.com This email sent to [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
Bindings created reference objects
I have a program I'm developing where there will be one list, shown in an NSTableView that has source objects, and a second list that contains counted reference objects from the first list, also shown in an NSTableView, and you add objects by selecting in the first list, and clicking a button that adds (or increments the count of) the objects from the first to the second. Ok, so I've solved how to do this without bindings, I've created a supercontroller to handle two NSArrayControllers, with the required IBAction to send the selected data in the first to the second, after processing. Is there a way to do this without a custom class? I'm thinking there might be with NSButton's bindings for Argument, somehow, but I'm wondering if it'll be a fruitless search, since I don't know how/if such things can be passed to the creation of a Core Data Entity through the add: action without the same or more work than I've already done, or if it would be worth it. Seems like I could just override add: to take the Argument bound by the button, and use addObjects: or whatever lower level function add: uses, to create relationships in the a new entity from the buttons Argument binding. Anyway, just wondering if anyone has thoughts on this line. Dustin KC9MEL smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
NSSearchField bindings almost work
I have a program set up with core data, and I have a list of predicates to filter the data shown, which work only if you type in the entire string value of the data item being used to filter, though I'm using "somePath contains[cd] $value" for the binding, where somePath are various paths I'm trying to filter. Is there something besides "contains" I should be using to get the described behavior of "contains"? Dustin KC9MEL smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
Re: Bindings to display an NSArray of NSStrings as a single NSString?
yes, indeed, that does seem to be the simplest solution, thanks. Dustin KC9MEL On Aug 5, 2008, at 8:14 AM, Hamish Allan wrote: On Mon, Aug 4, 2008 at 6:32 PM, Dustin Robert Kick <[EMAIL PROTECTED] > wrote: This seems like it would be common enough, to me, that it would have bindings for it. You could add a category to NSArray... @implementation NSArray (ArrayOfStringsAsSingleString) - (NSString *)arrayOfStringsAsSingleString { return [self componentsJoinedByString:@", "]; } @end ...and then bind to "values.arrayOfStringsAsSingleString". Hamish smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
Bindings to display an NSArray of NSStrings as a single NSString?
This seems like it would be common enough, to me, that it would have bindings for it. I can't find anything, and am thinking I will write an NSValueTransformer to do this (also thought there might be a value transformer for this, but no). Am I missing something? I thought that there should be either a [EMAIL PROTECTED] operator, or a patternValue binding, or an NSValueTransformer to do this, but I haven't found anything. I thought I might be able to get something by using [EMAIL PROTECTED], or something similar, but that wouldn't work either. Dustin KC9MEL smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
Re: Checking for hackintosh
Why not have the error messages simply be error messages, and leave out the "clever" which I think is always a bad idea, anyway, in almost any domain? Have it report an error that has a number indicating a possible hackintosh, and double check if it is a hackintosh issue, or a bug in your software. Dustin KC9MEL On Jul 30, 2008, at 10:00 PM, Matt Burnett wrote: Then shouldn't you be able to determine if they are using a hackintosh by the descriptions of support requests they are submitting? If not are you sure your code checks return values and is designed to fail gracefully? On Jul 30, 2008, at 9:27 PM, Chris Suter wrote: On Thu, Jul 31, 2008 at 12:00 PM, Michael Ash <[EMAIL PROTECTED]> wrote: On Tue, Jul 29, 2008 at 10:22 PM, John Joyce <[EMAIL PROTECTED]> wrote: 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. I really strongly advise against this. Your code will have bugs, simply because it is code. It is quite likely that one of these bugs will one day prevent a legitimate user who owns a real, legitimate Macintosh from using your software. At that point, I would argue, the harm to that one user far outweighs any minor, undetectable gain you could possibly get from such a scheme. One issue that we have is that we get a lot of support for our products from people who are running our software on Hackintosh's and they aren't usually up front about that fact. They end up wasting our time when it turns out the problem they've got is because they're running on a Hackintosh. So there would be some benefit if we could detect when we're running from a Hackintosh. Unfortunately, as others have pointed out, there is no future proof way of doing that at the moment (that I know of). -- Chris ___ 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/matt.w.burnett%40gmail.com This email sent to [EMAIL PROTECTED] ___ 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/mac_vieuxnez %40mac.com This email sent to [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]