Re: current function in macro

Anton Visser <[email protected]> Wed, 5 Jan 2011 08:47:25 -0600
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
Thanks guys.  I have modified my macros and added them to ticket 88973
(http://bugs.activestate.com/show_bug.cgi?id=88973)

cheers,
Anton

On Mon, Jan 3, 2011 at 2:42 PM, Eric Promislow <[email protected]> wrote:
> This question came in just before I went on break.  Please excuse the delay.
>
> How about this code:
>
> var view = ko.views.manager.currentView;
> var scimoz = view.scimoz;
> var ciBuf = view.koDoc.ciBuf;
> var x = ciBuf.curr_section_from_line(view.currentLine);
> alert(x); // => "[xpconnect wrapped koICodeIntelSection]"
> alert(x.title); => gives name of current method.
>
> Happy New Year,
> Eric
>
> On 12/22/2010 11:02 AM, Anton Visser wrote:
>> I have a PHP class with several methods in it.  Is it possible using a
>> macro to get the method that the cursor is in?
>>
>> for instance
>>
>> class foo {
>>
>> public function a() {
>>
>> }
>>
>> public function b() {
>>     <cursor here>
>> }
>>
>> public function c() {
>>
>> }
>>
>> }
>>
>>
>> The macro function would tell me that the cursor is in method b.
>>
>> cheers,
>> Anton
>> _______________________________________________
>> Komodo-discuss mailing list
>> [email protected]
>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>> Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
> _______________________________________________
> Komodo-discuss mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
>
_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss