NO

Author Topic: Auto-completion???  (Read 6350 times)

Dodge

  • Guest
Auto-completion???
« on: November 27, 2005, 06:05:25 pm »
Is there any way to have auto-completion or is it already installed?

It would be great to have one...cos this is a great tool to use.
But if it`s already implemented then i oppologise , cos that means that i don`t know how to use one.

Eather way it can be of a great help so why not have one?

COME ON PEOPLE WRITE SOMETHING ON THIS SUBJECT!!! =D>

Thnx

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1980
    • http://www.smorgasbordet.com
Auto-completion???
« Reply #1 on: November 28, 2005, 10:36:46 pm »
This seems to mean different things to different people - but provided you have full browse info enabled:
* use Ctrl+Space to complete a word...
* after . or ->, for a struct/union variable, a member list will be displayed... (after small delay)

Look in the help file...

Pelle
/Pelle

Dodge

  • Guest
Auto-completion???
« Reply #2 on: November 29, 2005, 09:02:05 am »
Thnx for the information , but this seems not to work , cos , for example if i start to write a simple project like hello world and i start with #include and then <stdio.h> ... after that i press Ctrl+Space to get the list of functions (including main) but nothing happens? Why is that , and i have my auto-ident on smart (for C only) and also settiong in general are Default ones so I think it should work , but i dont get it why it doesn`t.#-o
If you give me a short example when it works like 100% that would be great  =D>

But thnx for the help. =D>

Dodge

  • Guest
Auto-completion???
« Reply #3 on: November 30, 2005, 09:52:10 am »
What about some sort of CODE ASSIST...that would also be a great feature to have #-o

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1980
    • http://www.smorgasbordet.com
Auto-completion???
« Reply #4 on: December 02, 2005, 07:35:19 am »
At least some info is generated when you *build* the project - so you might have to do that once, to get it started.

CODE ASSIST: see Help -> Pelle C on the Web -> Source code - choose Utilities and CWiz. Maybe helpful?

Pelle
/Pelle

Dodge

  • Guest
Auto-completion???
« Reply #5 on: December 02, 2005, 07:54:08 pm »
Ya mannnn thatsssss heavyyy dutttyyy usefulll thnx ... cool the best...muchos gracias...man u see how little it takes to make boy happy  =D>  :lol:
Thats what i was looking for ... damn why didnt u tell me that at the beging?:wink:

P.S
I know i m like pushing the envelope...but ... hmm such a cool feature would be nice to have implemented like in the program...not as an extra.

Just a thought.

Freddy

  • Guest
Auto-completion???
« Reply #6 on: February 08, 2006, 09:28:31 pm »
I'd like something like:
I'm coding something like this:
Quote
...
case WM_

and the IDE shows a tip:
Quote

WM_COMMAND
WM_CLOSE

and all possibilites.
Take a look at RADasm to see it working with win32asm: www.radasm.com
Also lcc-win32 has it by pressing ESC at some word, and dev-c++ has it but pressing ctrl+space. But Pelles C IDE is much better, and would be very useful to have this feature.

skirby

  • Guest
Auto-completion???
« Reply #7 on: February 09, 2006, 01:45:56 pm »
Hello Freddy,

What's the problem. I tried what you say and it works very well.
I entered case WM_ then press Ctrl+space keys and I chosen WM_CLOSE in the list of propositions made by PellesC.

Be careful, you have to respect the lower and upper case letters.

Freddy

  • Guest
Auto-completion???
« Reply #8 on: February 09, 2006, 05:27:09 pm »
Here it doesn't work. :(

I tried this code:
Code: [Select]

#include <windows.h>
#pragma comment(linker,"/entry:_main")

int CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
EndDialog(hwnd,1);
case WM_ //here it should show some tips list by pressing ctrl+space
}
return 0;
}
int main()
{

return DialogBoxParam(0,MAKEINTRESOURCE(1001),0,(DLGPROC) DlgProc,0);


Also, it would be very good if Pelles C could complete API names just like in RADasm.
Like I write:
Quote
Mess

and it shows options like
Quote

MessageBox
MessageBeep

so if clicked at one option it would complete like this (assuming I choose MessageBox with the mouse click):
Quote
MessageBox(| );

* The "|" is the keyboard cursor.

Well... I must be dreamming... but that's the IDE of my dreams  :lol:


EDIT:
Quote

* use Ctrl+Space to complete a word...
* after . or ->, for a struct/union variable, a member list will be displayed... (after small delay)

while programming winsock, I couldn't see the completion after . or ->. like in this code:
Quote

SOCKADDR_IN saddr;
saddr.

I think the problem is here in my configuration.
How can I solve it and have the completion above working?
The only kind of "completion" that works here is a tip for functions parameters like "int printf(const char * restrict fmt, ...)".

Thanks!

skirby

  • Guest
Auto-completion???
« Reply #9 on: February 09, 2006, 05:54:38 pm »
I tried your piece of code and it works on my computer.
I have created a new "Win32 program (EXE)" project and paste your code
If I press Ctrl+space, the auto-completion window appears.

I don't know what happened with your PC

Otherwise,
Quote
Also, it would be very good if Pelles C could complete API names just like in RADasm.

Pelles C already do it. I think you dontt see that feature due to your previous problem.

Do you see sometime the auto-completion window?

Freddy

  • Guest
Auto-completion???
« Reply #10 on: February 09, 2006, 06:24:29 pm »
I think I got it working now.  :D
I uninstalled Pelles C and installed it again. (Just to have a clean install, but it doesn't resolved the problem.)
I deleted sysdefs.tag and then I created a project and builded the program.
It works now!  :)
I now realized that the info to show code completion is build to this file and it needs to create some kind of cache before using it.

Now, I feel comfortable enough to work with Pelles C. I have been growing up my knowledge on C, win32api and DOS assembly/win32 assembly.
Now I'll work on some snipets, utilities and tutorials on C programming with Pelles C and Win32API, and also some win32asm with FASM.
But I need some free web hosting, because I'm going to create a page to store my work and share it with other people and also help newbies.
Do you know some good and free web hosting for simple HTML page only? (no need for php, cgi, and other things)

Thanks!