[TxMt] SVN Bug

Allan Odgaard throw-away-1 at macromates.com
Mon Mar 12 08:10:41 UTC 2007


On 12. Mar 2007, at 01:07, Chris Thomas wrote:

> On Mar 11, 2007, at 9:54 AM, Allan Odgaard wrote:
>> On 7. Mar 2007, at 22:44, Eric Coleman wrote:
>>> I found the CMPluginContext bug, and a way to reproduce it.
>> Why do you call it a CMPluginContext bug? I.e. what does  
>> CMPluginContext has to do with this?
> http://article.gmane.org/gmane.editors.textmate.general/17197/ 
> match=cmpluginexaminecontext

Ah, I sort of missed that one.

>>> in your project, have a few items already added, and ready to be  
>>> commited.  Have a new item in your tree.  Bring up the commit  
>>> window.  Click add next to that file, and click the checkbox,  
>>> type your message in and hit enter.  The commit will fail.
>> I’ll try it the next time I get the chance (I ought to have a test  
>> svn repository ;) )
> It does not reproduce for me. It must be that something is writing  
> the text "CMPluginExamineContext" to stdout when you invoke the  
> popup menu,

But weird that someone writing to stdout, fools the process, no?!?

> even though the menu has no intentional relationship to context  
> menu plugins. I'm wondering if there's a third-party contextual  
> menu plugin involved?

Yeah, sadly popUpContextMenu:withEvent:forView: is really all we have  
in Cocoa, for opening a pop-up menu, but that one is a “real” context  
menu, which has context menu plug-ins show in the menu.

An alternative is either using an NSPopUpButtonCell or so, but I ran  
into problems with that approach (it is sort of hacky, because you’d  
use a cell without a view, or a view outside a view hierarchy), so I  
use the Carbon Menu Manager for custom pop-ups, there is some code  
for this in the Dialog plug-in (if you wish to switch the current  
code, or I could do it ;) ) -- the only tricky part with Menu Manager  
is, that it uses global coordinates relative to the main screen,  
where I found, by experimentation, that the main screen is the one  
with its origin in (0, 0), not feeling overly confident though, that  
this is really how it is defined. But [NSMenu mainScreen] was not  
(always) the right one…




More information about the textmate mailing list