NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
"Open File at Cursor" for smarty files
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
I absolutely LOVE the new "open File at Cursor" feature. It saves so much time its amazing.

One additional extension that would save even more time is to add support for Open File at Cursor for smarty files.

Smarty files get called using:

$tpl->fetch('smarty.tpl');

or

$tpl->display('smarty.tpl');
View user's profileFind all posts by rudderSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
"Open file at cursor" is available for that code but most probably fails to find that smarty.tpl file and therefore shows File Open dialog. Is it what you're experiencing?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
Yes that is exactly what I am experiencing.

There are some weird symptoms here though:

1) The file in question is in the project along with all other files that Open File at Cursor works for
2) When the File Open dialog appears, it defaults to PHP files even though the file extension clearly matches smarty files. This means that even if I go to the correct directory its not likely to find it.

After some testing I found out that the Open File at Cursor only considers files associated to the PHP4 type (that's my default editing type).

Here's how I tested:

1) Open File at Cursor on a file ending in .tpl - you get the file dialog
2) Go to Settings => Associations => PHP4 and add *.tpl to the associations of PHP4
3) Close PhpEd
4) Open PhpEd again
5) Activate the proper project
6) Open File at Cursor of the .tpl file. It works!

If you go reverse the instructions and remove the .tpl from PHP4 association the file no longer works.

So I would like to suggest that PhpEd consider all file types it is associated to when doing the Open File at Cursor logic.
View user's profileFind all posts by rudderSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
oh, thanks for the detailed explanation.
As far as I see there are two distinct problems:
-Open dialog won't update File Type combo.
-Open File At Cursor won't auto-open anything but php files.

Good news is that both problems are fixed in build 4626.


Last edited by dmitri on Tue Oct 03, 2006 3:49 am; edited 1 time in total

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
Dmitri you guys are awesome!!! Very Happy
View user's profileFind all posts by rudderSend private message
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
Hi Dmitri,

I'm sorry to report another bug directly related to this one.

I think that Open File at Cursor works now for other file types, but only if the files of those filetypes are in a top level folder of the project.

Say you have a project like this (the "nusphere" folder is the project's main folder):


/nusphere/

/nusphere/www/
/nusphere/www/forums/

/nusphere/templates/
/nusphere/templates/admin/
/nusphere/templates/members/


In the above situation Open File at Cursor will ONLY open files which are in the /templates/ folder. If you have files in /templates/admin/ or /templates/members/ they cannot be found and will cause the file dialog to appear.

By contrast, even if PHP files are stored in /www/forums/ they will will properly open up when using Open File at Cursor. So this only affects non-PHP files.

Please consider fixing this bug.
View user's profileFind all posts by rudderSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I'll look into this.
Thanks for the report.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
Thanks Dmitri, I know it must be annoying for another variant of the bug to show up, and appreciate you checking it out!
View user's profileFind all posts by rudderSend private message
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
Just to let anyone following this issue know, as far as I can tell build 4630 (released Nov 23) fixes this bug!!

I can now use "Open File at Cursor" to open up smarty files that are in deeper directories such as:

projectdir/templates/admin/

Thanks for the fix Dmitri!
View user's profileFind all posts by rudderSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
you're welcome Smile

thanks for the report.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
"Open File at Cursor" for smarty files
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic