You are here: PSPad forum > English discussion forum > PSPad extension announcement

PSPad extension announcement

Goto Page: Previous1 2 3 4 5 6 7 8 9 10 11 Next

#21 Re: IntelliTips

Posted by: MrSpock | Date: 2007-08-05 16:53 | IP: IP Logged

@sq: I can't get this to work. I always get a "'tip' is null or not an object" error when I hit CTRL+I.

Options: Reply | Quote | Up ^


#22 Re: IntelliTips

Posted by: sg | Date: 2007-08-05 17:00 | IP: IP Logged

MrSpock:
@sq: I can't get this to work. I always get a "'tip' is null or not an object" error when I hit CTRL+I.

I think the DLL hasn't been registered, this can be done with:

regsvr32 PSPad_IntelliTips.dll

in a command prompt, in same same directory the DLL is.

Options: Reply | Quote | Up ^


#23 Re: IntelliTips

Posted by: vbr | Date: 2007-08-05 18:43 | IP: IP Logged

I have to confirm the behaviour reported by MrSpock; regsvr32 confirmed the registration after executing the command; but after calling the script the above mentioned error arises. ("'tip' is null or not an object")
(python and javascript sources tried).
Are there maybe yet another requirements for this addon?

(BTW, maybe the collision with the common shortcut Ctrl+I for italic tag in HTML could be avoided, but this can be edited easily in the script source.)

Options: Reply | Quote | Up ^


#24 Re: IntelliTips

Posted by: MrSpock | Date: 2007-08-05 18:59 | IP: IP Logged

@Steve: I did register it, and got a success message. Maybe there's a misunderstanding on my part: Is this limited to a certain language, or is it supposed to work with (almost) all languages if there is a context file?

Options: Reply | Quote | Up ^


#25 Re: IntelliTips

Posted by: sg | Date: 2007-08-05 22:24 | IP: IP Logged

OK, I was unable to reproduce the error on the kid's almost-fresh computer, but I have made an installer that includes and installs the VB runtime library, and I've also tweaked the js script a bit:

www.grundell.co.uk

If it still doesn't work, then... I'm sorry!

MrSpock: It just depends on whatever you have in your clip definition files (in the ./Context dir) - just the single-line definitions. I've tested it mostly in PHP, as that's mostly all I use PSPad for. I've noticed Javascript, Perl, and even CSS and HTML work too. Anyway, the reason that you both get that error is due to the DLL not being able to run in the first place, or Javascript not loading it properly.

Good luck!

Steve.

(I've tested on XP + 2000)

Edited 1 time(s). Last edit at 2007-08-05 22:26 by sg.

Options: Reply | Quote | Up ^


#26 Re: IntelliTips

Posted by: MrSpock | Date: 2007-08-06 01:54 | IP: IP Logged

@Steve: I guess the problem is somewhere in the dll, because the try ... catch ... in the script doesn't throw an exception. It should if the dll wasn't loaded, correct?
But never mind, it was worth a try. I think I can live without IntelliSense. "We don't need no stinking IntelliSense!" smoking smiley

Options: Reply | Quote | Up ^


#27 Re: IntelliTips

Posted by: andybridges | Date: 2007-08-09 08:20 | IP: IP Logged

I've just tried the installer, and I also get the error message "'tip' is null or not an object"

As far as I can tell the tip object is not being created in the correct scope. I ran a few tests and the object remains initialised up until the end of the Init routine, but is lost once that routine is finished - exactly what you'd expect if there was a scope issue. Why there's a scope issue I'm not sure since you clearly declare the tip object at the global level.

I've got a fix for this though. Just move the code from the init routine to the top of the module so it reads

var module_name = "IntelliTips";
var module_ver = "1.0";

var tip = null;
try {
tip = new ActiveXObject('PSPad_IntelliTips.Tips');

if (tip) {
tip.Init(global);
} else {
echo('no');
}
} catch(err) {
echo('error: ' + err.message);
}

Now I get no error messages and diagnostics show the tip object exists correctly. Unfortunately I can't actually get any tips to pop up, but maybe I'm not using correctly? Some working examples would be useful.

Edited 1 time(s). Last edit at 2007-08-09 08:21 by andybridges.

Options: Reply | Quote | Up ^


#28 Re: IntelliTips

Posted by: sg | Date: 2007-08-09 20:32 | IP: IP Logged

Thanks. I didn't think of there being a scope issue. What puzzles me more is the fact that it ran OK on my machines, but not on others. JavaScript, eh?

Anyway, as for working example; i know this works:
change the highlighter to 'PHP', type in 'fopen', then press ctrl+I (or whatever you said on the addMenuItem() call.

This is how it works. Perhaps it could give you some hints:
1 ShowTip() method of the tip object is called.
2 The 7th cell on status bar is read, to detect the current highlighter mode
3 The corresponding file in the Context sub directory is read (and cached)
4 The function that the cursor is over or in is found.
5 A clip from the file that matches the function is retreived
6 The screen position of the function is detected
7 A window is displayed

This is just a weekend hack, which probably depends on several things that is unique to my setup. Who knows...

Good luck!

Steve

Options: Reply | Quote | Up ^


#29 Re: IntelliTips

Posted by: andybridges | Date: 2007-08-10 07:50 | IP: IP Logged

aaah. ok. that's why it wasn't doing anything for me. I use HTML Multihighlighter for doing ASP work. This won't pick that up. Shame because your example works perfectly and I could see this being useful.

FYI, I found it caused a crash for me earlier when using another plug in (reg ex tester). When I hit the "(" key in the regex tester window pspad crashed. I guess your dll was trying to grab the status bar of a window that had none perhaps?

never mind.

On a related note, I'm inclined to think there should be a seperate thread for discussuing IntelliTips, and this thread should be kept for posting new versions...

Options: Reply | Quote | Up ^


#30 PSPad extension announcement

Posted by: marcusson | Date: 2007-08-17 10:57 | IP: IP Logged

An update is available for the "Yana Framework".

It includes:
- fresh PHP code snippets with all new functions an arguments introduced in the latest release of PHP + all specific extensions by the Yana Framework
- updated syntax highlighters for the framework, including all new feature introduced in the recent release of version 2.9.6
- new code snippets for database files, that provide support for the new "zerofill" and "unsigned" properties

See the extension download section to get the files.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 4 5 6 7 8 9 10 11 Next





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR