Print Thread
Enhancement Request
#32860 11/29/08 06:27 PM
Joined: May 2002
Posts: 27
Chicago, IL
phocai Offline OP
Member
OP Offline
Member
Joined: May 2002
Posts: 27
Chicago, IL
Hi Marco,

Thought of a new (small and easy to add ;-) feature today:

When right-clicking on a table name in the Object Browser, there is an option to Query Data.

When multiple tables are selected, clicking Query Data opens each select query in a separate SQL Window. Would it be possible to include an option to "Query All in a single SQL Window"?

Many thanks as always for an awesome product.

Re: Enhancement Request
phocai #32861 12/01/08 06:33 AM
Joined: Sep 2005
Posts: 11
Y
Member
Offline
Member
Y
Joined: Sep 2005
Posts: 11
It seems a good advice. I don't like a lot of windows be opened also.

Re: Enhancement Request
yzsind #32862 12/01/08 08:29 AM
Joined: Sep 1999
Posts: 212
Warszawa,Poland
J
Member
Offline
Member
J
Joined: Sep 1999
Posts: 212
Warszawa,Poland
Hello,

You can do it easily using Browser Extender plugin.
You can create a simply pascal extension with the following code in OnClick event:

program t1;
begin
If IDE_WindowHasEditor(True) then
IDE_SetSelectedText(IDE_GetEditorHandle, 'select * from #oowner.#oname;' + #13#10);
end.

When a window with editor will be opened - prepared code will be inserted into it.
When you in General tab add a "+" to table name --> "TABLE+" extension will work in multiselection mode.



Last edited by Joachim Rupik; 12/01/08 08:32 AM.

Joachim Rupik

Browser Extender & Plot Window Team
Emberiza Software s.c.
---------------------------------------------------------
Browser Extender home: http://www.browserextender.com
Re: Enhancement Request
Joachim Rupik #44772 10/17/12 05:33 PM
Joined: Oct 2012
Posts: 3
Netherlands
G
Member
Offline
Member
G
Joined: Oct 2012
Posts: 3
Netherlands
Sorry to continue such an old thread, but I'm looking for the IDE_SetSelectedText function and this thread seems to be the only place in the world that refers to it.

Although IDE_GetSelectedText exists, I cannot find IDE_SetSelectedText in the documentation, nor in PlugInIntf.pas.

I now use a trick using the Clipboard and a simulated Ctrl+V keypress, but that is far from ideal.

Re: Enhancement Request
GolezTrol #44773 10/17/12 07:41 PM
Joined: Oct 2012
Posts: 3
Netherlands
G
Member
Offline
Member
G
Joined: Oct 2012
Posts: 3
Netherlands
I've been able to work around it by calling IDE_GetEditorHandle and use it to send an EM_REPLACESEL message to.

Code
procedure PasteText(Text: String);
var
  Handle: THandle;
  StartPos, EndPos: Integer;
begin
  Handle := IDE_GetEditorHandle;
  // Replace selection
  SendMessage(Handle, EM_REPLACESEL, 1, Integer(PChar(Text)));
  // Select pasted text
  SendMessage(Handle, EM_GETSEL, Integer(@StartPos), Integer(@EndPos));
  SendMessage(Handle, EM_SETSEL, StartPos - Length(Text), StartPos);
end;

Last edited by GolezTrol; 10/17/12 08:35 PM. Reason: Added code

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.077s Queries: 14 (0.014s) Memory: 2.5175 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-19 00:38:39 UTC
Valid HTML 5 and Valid CSS