Re: Cursor above siblings

2015-01-10 Thread ecir hana
On Sat, Jan 10, 2015 at 6:18 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > — Make sure you *start* by investigating whether the tracking area options > are configured correctly. You’re wasting your time if you go off looking > for interactions between “sibling” tracking areas

Re: Cursor above siblings

2015-01-10 Thread ecir hana
On Sat, Jan 10, 2015 at 4:54 PM, Uli Kusterer wrote: > > I think you’re reading that into the documentation. In most views, > cursor-setting is pretty much predictable, and I think text views are > mainly meant as an example here, and aren’t that special. > Yeah, you are probably right... I di

Re: Cursor above siblings

2015-01-10 Thread ecir hana
ubview of the textarea it wont show up at all..? In any case, I will try to look into this further so if anyone has an idea about this, please let me know. On Sat, Jan 10, 2015 at 3:09 PM, Uli Kusterer wrote: > On 09 Jan 2015, at 14:19, ecir hana wrote: > > I have a window

Cursor above siblings

2015-01-09 Thread ecir hana
Hi! I have a window with a custom view, which contains two children: a textview with scrollbars and a button. I would like to overlay the button over the textview so when I click in that area somewhere, the button receives the event before the textview. It kind of works, except for one thing: the

Few questions about NSTextView

2014-12-22 Thread ecir hana
Hi! I'm trying to work with NSTextView but in the course of my learning I encountered several behaviors which I cannot understand why they are happening. Please, I would greatly appreciate if someone could explain in a few words why do they behave like they do and how to achieve the opposite effec

Re: NSTextView and Syntax Highlighting

2014-12-19 Thread ecir hana
On Fri, Dec 19, 2014 at 6:58 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > On Dec 19, 2014, at 05:36 , Charles Jenkins wrote: > > > > Could it be that even though the layout manager's temporary attributes > are designed for purposes like syntax highlighting, folks don't actua

Re: NSRegularExpression segfault

2014-12-15 Thread ecir hana
On Mon, Dec 15, 2014 at 8:04 PM, Jens Alfke wrote: > > > Anyway, please file a bug report with Apple, as this seems to be a bug in > NSRegularExpression. > Done! I'm no expert on regular expressions, but my understanding is that all the > implementations have a couple of pathological conditions

Re: NSRegularExpression segfault

2014-12-15 Thread ecir hana
On Mon, Dec 15, 2014 at 6:59 PM, ecir hana wrote: > > It's not precisely 11, but yes, I need to have many. > By "many" I mean more than 2 and less than...maybe 10. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: NSRegularExpression segfault

2014-12-15 Thread ecir hana
On Mon, Dec 15, 2014 at 6:50 PM, Stephen J. Butler wrote: > > It seems to be related to the number of capture groups you have. For > example, this also succeeds for me: > > > ((?:1+)|(?:2+)|(?:3+)|(?:4+)|(?:5+)|(?:6+)|(?:7+)|(?:8+)|(?:9+)|(?:0+)|(?:a+)) > > Do you really need the 11 capture groups

Re: NSRegularExpression segfault

2014-12-15 Thread ecir hana
On Mon, Dec 15, 2014 at 6:09 PM, Stephen J. Butler wrote: > > If you read the ICU docs on regular expressions you'll see that it sets an > 8MB limit on head size when evaluating. My guess is that you've run into > this and NSRegularExpression misses a return code somewhere. > I would have thought

Re: NSRegularExpression segfault

2014-12-15 Thread ecir hana
On Mon, Dec 15, 2014 at 5:44 PM, Jens Alfke wrote: > > > What's the backtrace? Whenever investigating a crash you should always > start by looking at the stack. (To get this in a text form you can paste > into a message, use the debugger command "bt".) > I don't seem to have "bt" but I got instea

NSRegularExpression segfault

2014-12-15 Thread ecir hana
Hi! I recently needed to match some patterns but I encountered a problematic situation. Please, can anyone explain to me why does the following program consistently segfault after 5 characters? I'm running 10.9.5... #import int main () { NSString *pattern = @"(1+)|(2+)|(3+)

Re: Size of NSSplitViewDividerStyleThin

2014-12-11 Thread ecir hana
s < quinceymor...@rivergatesoftware.com> wrote: > On Dec 11, 2014, at 02:56 , ecir hana wrote: > > > Btw., when I don't do `setDocumentView` for the textviews, the cursor > shows up as expected. > > Why is this happening? Is it possible to have the resizing cursor ove

Re: Size of NSSplitViewDividerStyleThin

2014-12-11 Thread ecir hana
it possible to have the resizing cursor over the whole divider frame? This is the code I'm using: http://pastebin.com/ZnW8LWyT On Thu, Dec 11, 2014 at 5:35 AM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > On Dec 10, 2014, at 17:54 , ecir hana wrote: > > &

Size of NSSplitViewDividerStyleThin

2014-12-10 Thread ecir hana
Hi, I have two NSTextViews, each of which is wrapped in NSScrollView and both are embedded inside NSSplitView: +--+ |++| ||+--+|| ||| |< NSTextView ||+--+|| |++| +--+<-- divider |+

Re: Dynamic library linking

2013-02-24 Thread ecir hana
/stackoverflow.com/questions/1621451/bundle-framework-with-application-in-xcode > > > > On Sun, Feb 24, 2013 at 2:09 PM, ecir hana wrote: > >> Hello, >> >> I have a simple program which I can compile but when I tried to link it >> with a dynamic library t

Re: Dynamic library linking

2013-02-24 Thread ecir hana
That "-v" switch is a good advice but I cannot really make any sense of this http://pastebin.com/ugWxEWw8 On Sun, Feb 24, 2013 at 9:51 PM, Ken Thomases wrote: > On Feb 24, 2013, at 2:09 PM, ecir hana wrote: > > > and running "file python33" says: > > > &g

Dynamic library linking

2013-02-24 Thread ecir hana
Hello, I have a simple program which I can compile but when I tried to link it with a dynamic library the linker is not able to find the library, despite that it is in the same folder as the program. The longer version: I want to embed Python 3.3 interpreter into simple C program. I'm on MacOS 10

Re: Open untitled file in Document-based app

2012-10-24 Thread ecir hana
On Wed, Oct 24, 2012 at 7:13 PM, Sean McBride wrote: > > That restoring state stuff is new in 10.7, not 10.8. You can test if it > is responsible by turning it off in System Preferences > General. > > Yes, it is! When I turn it off (Close windows when quitting an application) it works as before.

Re: Open untitled file in Document-based app

2012-10-24 Thread ecir hana
On Tue, Oct 23, 2012 at 11:58 PM, Graham Cox wrote: > > If you return YES from -applicationOpenUntitledFile: the application will > NOT open a new file - it has assumed that this method has done it and by > returning YES that's what you're telling it. You want to either return NO > or else not ov

Open untitled file in Document-based app

2012-10-23 Thread ecir hana
Hello, I would like my app to open new untitled document every time it starts. It worked in 10.6 but now I upgraded to 10.8 and when I close the window with cmd+w and then restart the application it wont open any windows. Please, how to make it open a new window every time the app starts, regardl

Re: NSTextView paste:

2012-08-15 Thread ecir hana
On Tue, Aug 14, 2012 at 2:43 AM, Seth Willits wrote: > > - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString > *)type > { > if ([type isEqual:NSStringPboardType]) { > if ([[pboard stringForType:type] isEqual:@"foo"]) { > NSRang

Re: NSTextView paste:

2012-08-13 Thread ecir hana
On Tue, Aug 14, 2012 at 12:55 AM, ecir hana wrote: > > > > aaa > bbb > > > I mean: foo foo ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: NSTextView paste:

2012-08-13 Thread ecir hana
On Mon, Aug 13, 2012 at 11:45 PM, Seth Willits wrote: > > > - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString > *)type > { > if ([type isEqual:NSStringPboardType]) { > if ([[pboard stringForType:type] isEqual:@"foo"]) { > [se

NSTextView paste:

2012-08-13 Thread ecir hana
Dear list, I have a NSTextView, where the user can paste plain text into. When the users has "foo" in the pasteboard I would like "bar" to be pasted. In other words, a user goes to, say, a web browser, selects "foo", cmd+c, switches to my NSTextView, cmd+v and "bar" appears at insertion point. P

Re: NSTextView scrolling

2012-07-31 Thread ecir hana
On Tue, Jul 31, 2012 at 6:19 AM, Richard Somers wrote: > > This might help. > > > http://www.cocoabuilder.com/archive/cocoa/145464-nstextview-auto-scroll-up-behaviour.html > > Thanks for the reply! However, it does not seem to work - it still scrolls half-page up/down, even if I change the "margin

NSTextView scrolling

2012-07-30 Thread ecir hana
middle of the textview. Is it possible to disable this behavior? Is it possible to make it scroll by just one line? So that the current line stays always at the top (bottom)? Thanks in advance, Ecir Hana ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: Getting NSApplicationDelegate protocol

2012-07-06 Thread ecir hana
On Sat, Jul 7, 2012 at 6:30 AM, Ken Thomases wrote: > > > > Thank you. And please, can you explain to me why is it that case? Is it > simply because AppKit includes the definition of NSTextViewDelegate > protocol and not includes one for NSApplicationDelegate? > > Correct. > > > Is it somewhere d

Re: Getting NSApplicationDelegate protocol

2012-07-06 Thread ecir hana
On Fri, Jul 6, 2012 at 8:01 PM, Stephen J. Butler wrote: > > You're positive you're linking against the 10.6 SDK? Even if you're on > 10.6 you might be linking against the 10.5 SDK and that would explain > your problem perfectly. > > NSAppKitVersionNumber says "1038.36" which is 10.6.

Re: Getting NSApplicationDelegate protocol

2012-07-06 Thread ecir hana
On Fri, Jul 6, 2012 at 11:56 AM, Ken Thomases wrote: > > Is there a way to get NSApplicationDelegate protocol besides the > > compile-time "@protocol()"? > > No. The run-time information about the protocol is obtained from > information that would have to have been baked into the executable at b

Re: Getting NSApplicationDelegate protocol

2012-07-06 Thread ecir hana
Sorry I should've said that before: no, I'm on 10.6. But thanks for the reply! On Fri, Jul 6, 2012 at 11:14 AM, Stephen J. Butler wrote: > On Fri, Jul 6, 2012 at 3:30 AM, ecir hana wrote: > > I'm trying to get the methods a protocol specifies and just stumbled u

Getting NSApplicationDelegate protocol

2012-07-06 Thread ecir hana
Hello, I'm trying to get the methods a protocol specifies and just stumbled upon one problem: the following code returns NULL: Protocol *protocol = objc_getProtocol("NSApplicationDelegate"); I saw ( http://stackoverflow.com/questions/10212119/objc-getprotocol-returns-null-for-nsapplicationde

Findbar highlighting

2012-06-18 Thread ecir hana
onality to highlight some string, without actually using the findbar? Have a nice day, Ecir Hana ___ 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

Re: NSTextView

2012-06-07 Thread ecir hana
On Thu, Jun 7, 2012 at 5:47 AM, koko wrote: > On an NSTextView I call -selectAll: and then -insertText: > > This scrolls the view to the end of the text. > > How would I scroll the view to the top of the text? > Just before the insertText: get the current scroll position and then restore it: ht

NSTextView selection

2012-06-04 Thread ecir hana
, i.e. to highlight it from left to very right? I think I need to use "setExtraLineFragmentRect:usedRect:textContainer:" of NSLayoutManager but I'm not sure how to proceed and if it's even the right way of doing this. Thanks in advance, Ecir Hana __

Re: Censoring pasted text

2012-05-25 Thread ecir hana
Oh, sorry for the noise. It's in the NSTextView docs, section "Managing the Pasteboard". On Fri, May 25, 2012 at 9:09 AM, ecir hana wrote: > Hello, > > if I paste some text from clipboard into a textview, is there a way to > replace all the occurrences of "foo

Censoring pasted text

2012-05-25 Thread ecir hana
Hello, if I paste some text from clipboard into a textview, is there a way to replace all the occurrences of "foo" by "bar"? If possible, I don't want to use "textStorageDidProcessEditing:" as it is called every time I type in something. To put it in other words, is there perhaps an event which is

NSTextView row number

2012-05-22 Thread ecir hana
Hello, I have a NSTextView and would like to keep track of where the cursor is in terms of a line number. Please, is there a way to figure this out somehow (akin ti lineRangeForRange:) or do I have to calculate it myself, e.g. by caching newlines locations?

Re: saveDocument:

2012-05-10 Thread ecir hana
It works now! The problem was, that I was creating the window manager with "init:", instead of the initializers from the docs. Thank you all for the replies, they were very helpful! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: saveDocument:

2012-05-10 Thread ecir hana
On Wed, May 9, 2012 at 5:40 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > Very occasionally, it's necessary to subclass the NSDocumentController and > force the singleton to your own subclass, but this is rare. > > This is what I try to do - subclass the NSDocumentController i

Re: saveDocument:

2012-05-10 Thread ecir hana
On Thu, May 10, 2012 at 2:24 AM, Graham Cox wrote: > > If you build a document-based app using Xcode's template, it will work > correctly from the very first time you run it. Then you can see how it's > put together, and all of these things will slowly become obvious. > I'm doing precisely this.

Re: saveDocument:

2012-05-09 Thread ecir hana
On Tue, May 8, 2012 at 6:33 PM, Fritz Anderson wrote: > > I'll get this wrong if I answer in the amount of time I have. Look up > "responder chain" in the Mac OS X documentation. > > To oversimplify: > > Menu commands typically go to the "first responder" — whatever has the UI > focus. If the focu

Re: Window cascading

2012-05-09 Thread ecir hana
On Wed, May 9, 2012 at 5:08 AM, Peter Ammon wrote: > > Hope that helps, > It did. Thanks! ___ 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-

saveDocument:

2012-05-08 Thread ecir hana
[[self currentDocument] saveDocument:sender]; } I think I just need to pass "saveDocument:" from the menu to the document, am I right? Kind regards, Ecir Hana ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: Window cascading

2012-05-08 Thread ecir hana
Thanks! Will look at it. On Tue, May 8, 2012 at 5:22 PM, Richard Somers wrote: > On May 8, 2012, at 8:51 AM, ecir hana wrote: > > > Yes, document-based. > > > > However, not sure if it is an issue, but I have my own subclassed window > controller. The docs al

Re: Window cascading

2012-05-08 Thread ecir hana
luck. I look at the EnhancedDataBurn example but it uses the origin of already shown window, which is slightly different than my case, I believe. On Tue, May 8, 2012 at 4:35 PM, Richard Somers wrote: > On May 8, 2012, at 3:01 AM, ecir hana wrote: > > > I create a window like this: >

Window cascading

2012-05-08 Thread ecir hana
Kind regards, Ecir Hana ___ 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:

Re: Minimal document-based app

2012-05-07 Thread ecir hana
Thank you all very much, it is much clearer to me now. I'm diving into documentation now... ___ 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-a

Re: Minimal document-based app

2012-05-02 Thread ecir hana
Thank you all for the replies! As I said above, I don't want the question to be whether I should better use NIBs, or whether Cocoa is more suitable than assembler. I somewhat know already what the role of NIB is, that it can save time and so on. What I would like to know is what to do if I was not

Re: Minimal document-based app

2012-05-01 Thread ecir hana
et anywhere. > > Just start a new Cocoa app and use the project template for a document based > app. It gives you the necessary starting points, which though it adds a nib, > it's extremely small. There is nothing to be gained by going some other route. > > --Graham > &g

Minimal document-based app

2012-04-30 Thread ecir hana
Dear list, I'm trying to understand how the things in Cocoa works but I'm struggling with one thing. I saw http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html and http://casperbhansen.wordpress.com/2010/08/15/dev-tip-nibless-development/ and I think I somewhat understood. Now, I wo