Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
Hello, Sorry for the noise, it turns out that the bug was in my software after all! thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
On Tue, Sep 27, 2016 at 11:26 AM, Felipe Monteiro de Carvalho wrote: > But to be sure I will test the same thing as you are testing, you are > reading the text via NSTextView.string ? By the way, not sure if this makes a difference, but the original text was added via NSTextView.string

Re: NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
ting is a large cross-platform library, so indeed it could be that the line endings were added by something else, I'll recheck. But to be sure I will test the same thing as you are testing, you are reading the text via NSTextView.string ? -- Felipe Montei

NSTextView read real text content (without 0xA added by wordwrap)

2016-09-27 Thread Felipe Monteiro de Carvalho
Seams like noone had this problem before. And no, manually removing all line endings is not what I want, because some line endings are part of the real text, not added by word-wrap. thanks in advance, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing

Re: runModalForWindow is disabling my menus

2015-09-06 Thread Felipe Monteiro de Carvalho
arget is not the menu item itself? -- Felipe Monteiro de Carvalho ___ 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 He

Re: runModalForWindow is disabling my menus

2015-09-05 Thread Felipe Monteiro de Carvalho
cendent from NSMenuItem), which is its own target (I call item.setTarget(item) ). And I'm sure the target is correct, because otherwise menu items wouldnt respond to click (action) otherwise. thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mai

runModalForWindow is disabling my menus

2015-09-05 Thread Felipe Monteiro de Carvalho
time understanding whats the problem here and why the menus won't just work. I searched Google and other people had this problem, but noone solved it. It seams that few people use modal windows with menus, by the way as there were not that many discussions about it. thanks, -- Felipe Monteiro d

Re: Automatically activate next window after one is closed

2015-08-15 Thread Felipe Monteiro de Carvalho
in code do something to work around the problem with NSApplicationActivationPolicyRegular? I'll try that. I just wonder how to recognize if the app was started by gdb or by app bundle... But it looks like that in the worse case I could just ignore

Automatically activate next window after one is closed

2015-08-14 Thread Felipe Monteiro de Carvalho
NSWindow descendent) thanks, -- Felipe Monteiro de Carvalho ___ 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

Re: mouseMoved/mouseDragged while right button is down

2015-08-14 Thread Felipe Monteiro de Carvalho
Ah, just found rightMouseDragged :D thanks anyway, -- Felipe Monteiro de Carvalho ___ 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

mouseMoved/mouseDragged while right button is down

2015-08-14 Thread Felipe Monteiro de Carvalho
to somehow get mouse move events while the right mouse button is pressed or is this simply impossible an unsupported by Cocoa? thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: Menu item correct size

2009-09-17 Thread Felipe Monteiro de Carvalho
Thanks a lot. That's what I imagined, but I wanted some confirmation =) -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moder

Re: Menu item correct size

2009-09-17 Thread Felipe Monteiro de Carvalho
Hello, > The most reliable way is to ask the menu for its font, via the -[NSMenu > font] method. Thanks, but this method was introduced in Mac OS X 10.6 Is there any solution which works in 10.4? -- Felipe Monteiro de Carvalho ___ Cocoa-dev m

Menu item correct size

2009-09-17 Thread Felipe Monteiro de Carvalho
ibutedTitle(AttrString.Handle); thanks, -- Felipe Monteiro de Carvalho ___ 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.appl

Re: Problem setting the menu

2008-10-06 Thread Felipe Monteiro de Carvalho
hanks, -- Felipe Monteiro de Carvalho ___ 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

Re: Problem setting the menu

2008-10-06 Thread Felipe Monteiro de Carvalho
Hi, Any idea about how to fix the menu problem would be appreciated. thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Crash with toolbars

2008-10-06 Thread Felipe Monteiro de Carvalho
> BOOLs are signed char. Thanks, the toolbar is working now. Does anyone know where BOOL is declared? It's a very common word, so it's hard to find ... -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: Problem setting the menu

2008-10-05 Thread Felipe Monteiro de Carvalho
;); Result.addItem(SaveItem.Handle); ExitItem := CreateMenuItem('Exit'); Result.addItem(ExitItem.Handle); end; procedure TMyView.AddToMenubar(menu: NSMenu); var dummyItem: NSMenuItem; begin dummyItem := NSMenuItem.initWithTitle_action_keyEquivalent(CFEmptyString, nil, CFEmptyString

Re: Problem setting the menu

2008-10-05 Thread Felipe Monteiro de Carvalho
m that it creates the application menu programatically: http://trixul.cvs.sourceforge.net/viewvc/*checkout*/trixul/trixul/layout/cocoa/cocoamenubarimpl.mm?revision=1.6 I am trying to do the same, but it keeps refusing my menu... -- Felipe Mon

Re: Cannot see toolbar buttons

2008-10-05 Thread Felipe Monteiro de Carvalho
Sorry, it actually works =) I cannot see the images when executing the program directly, but they show when executing from the bundle, because they are loaded from it. But I still find it wierd that there is no border in the button, just an image. -- Felipe Monteiro de Carvalho

Cannot see toolbar buttons

2008-10-05 Thread Felipe Monteiro de Carvalho
em.autorelease else if CFStringCompare(itemIdentifier, SaveToolbarItemIdentifier, kCFCompareCaseInsensitive) = kCFCompareEqualTo then Result := SaveToolbarItem.autorelease else if CFStringCompare(itemIdentifier, CloseToolbarItemIdentifier, kCFCompareCaseInsensitive) = kCFComp

Setting automatic alignment

2008-09-29 Thread Felipe Monteiro de Carvalho
system when placing controls? Starting at the bottom-left is rather inconvenient. I would much rather have top-left like most libraries use. Also note that I am not using the Interface Building, so the answer should involve code. thanks, -- Felipe Monteiro de Carvalho

Crash with toolbars

2008-09-29 Thread Felipe Monteiro de Carvalho
end else begin Result := nil; Exit end; Result := ToolbarItem.autorelease; { ToolbarItem.Handle := 0; ToolbarItem.Free;} //Result := Result. [toolbarItem autorelease]; end; thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list

Problem setting the menu

2008-09-29 Thread Felipe Monteiro de Carvalho
lent(ItemText, nil, KeyText); Result.setTarget(ACallbackClass.Handle); Result.setAction(sel_registerName(PChar(ACallbackName))); end; thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Converting a MenuRef to a NSMenu

2008-06-08 Thread Felipe Monteiro de Carvalho
I just meant that maybe, this is possible. -- Felipe Monteiro de Carvalho ___ 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

Re: Learning Cocoa with RubyCocoa (was Regular Expressions)

2008-06-07 Thread Felipe Monteiro de Carvalho
e: Integration with other languages Java's integration with other languages (as using Java libraries in other languages) is about one of the worse I've ever seen. It basically makes any Java library accessible to only Java. And a second one: Performan

Re: Learning Cocoa with RubyCocoa (was Regular Expressions)

2008-06-07 Thread Felipe Monteiro de Carvalho
me_size('my name', 16); (alloc is called automatically) -- Felipe Monteiro de Carvalho ___ 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-admi

Re: Converting a MenuRef to a NSMenu

2008-06-06 Thread Felipe Monteiro de Carvalho
Is this maybe impossible? thanks, -- Felipe Monteiro de Carvalho ___ 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

Converting a MenuRef to a NSMenu

2008-06-05 Thread Felipe Monteiro de Carvalho
recursively convert the menu and all it's items into a NSMenu to insert into a NSStatusItem. thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
On Thu, Jun 5, 2008 at 9:59 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > Are you sure the app is connected to the window server? Did you remember to > call NSApplicationLoad() before locking focus? Thank you very much =) Now it works =P -- Felipe Monteiro

Re: Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
carbonobject.inc:435 #63 0x0002529a in TAPPLICATION__RUN (this=0x18b0020) at application.inc:1073 #64 0x251c in PASCALMAIN () at wndtray.dpr:39 #65 0x00018810 in SYSTEM_FPC_SYSTEMMAIN$LONGINT$PPCHAR$PPCHAR () #66 0x24c2 in _start () #67 0x23e9 in start () -- Felipe Monteiro de

Re: Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
Oh I had forgotten to link to the Cocoa framework =P It was only linked to Carbon... thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
ame code in all other classes covered by the bindings. thanks, -- Felipe Monteiro de Carvalho ___ 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 coco

Re: Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
context _after_ > locking focus, draw the image, then call -unlockFocus. That ought to work. That's exactly what I am trying to do, but [NSGraphicsContext currentContext] returns zero. -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Co

Re: Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
o > an NSImage instance. I would love to, but this method was added in 10.5 I am using 10.4 thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the l

Re: Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
9E0 AcurrentContext.graphicsPort TCarbonBitmap(ATrayIcon.Icon.Handle).CGImage 01B0BEC0 Which means that AcurrentContext.graphicsPort is zero =/ So, what do I have to do to get a CGContextRef? thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-

Converting a CFImageRef to a NSImage

2008-06-05 Thread Felipe Monteiro de Carvalho
t is invalid. Does anyone know why? Here is the debug output: [DBGTGT] :>[TCarbonWSCustomTrayIcon.Show] Jun 5 20:17:03 computador-de-felipe-monteiro-de-carvalho /Users/felipe/Programas/lazarus/examples/trayicon/Wndtray.app/Contents/MacOS/Wndtray: CGContextDrawImage: invalid context

Re: Quit application when window closes

2008-03-11 Thread Felipe Monteiro de Carvalho
if this is the best way to do this ... thanks a lot =) -- Felipe Monteiro de Carvalho ___ 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

Quit application when window closes

2008-03-11 Thread Felipe Monteiro de Carvalho
Hello, How can I implement the behavior that the application closes when my window closes? The application contains no nib files and doesn't use the interface builder, it's every thing done by code. thanks, -- Felipe Monteiro de Carvalho

Re: Handling mouse click event on a NSButton

2008-03-02 Thread Felipe Monteiro de Carvalho
/PasCocoa ), so I can't use objective-c language constructions and need to get this working with just objective-c runtime headers. I tryed to see the assembly for @selector(something:); but it isn't promissing. It calls a objc_meth_ something that I can't find anywhere. thanks, -

Handling mouse click event on a NSButton

2008-03-02 Thread Felipe Monteiro de Carvalho
ing a cross-platform library. I haven't found how to do that in those special circunstances. thank you very much, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

Creating a NSTextField

2008-02-26 Thread Felipe Monteiro de Carvalho
| NSResizableWindowMask backing: NSBackingStoreBuffered defer: NO]; But there is no initialization method for a NSTextField. How can I create a NSTextField? Just alloc? thanks, -- Felipe Monteiro de Carvalho ___ Cocoa-dev mailing list