Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / IntelliSense for Dark Game SDK - Where is it?

Author
Message
hackinc 2000
14
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: Puerto Rico
Posted: 3rd Dec 2004 22:55
Its a fact that all the commands coming from Dark Basic the same with an (db) in front. (Ex. MakeObject... , dbMakeObject...), but is more easy guetting the commands from the IntelliSense future on Visual Studio. I'm very new to Dark BAsic and I don't know all the command yet, I buy DGSDK because i'm more familiar whit Visual Studio and C++.

Its this Future On? Or I'm doing somthing wrong here.

Attachments

Login to view attachments
OSX Using Happy Dude
16
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 3rd Dec 2004 23:05
I've always assumed that sort of thing is just controlled by the editor.

Walk softly... and carry a big gun...
roujesky
15
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 3rd Dec 2004 23:31
I would also like to know how to make the dbXXX visible to Intellisense. I also use Whole Tomato Visual Assist (which I HIGHLY recommend). Neither of these 'see' the db commands. Does anyone know how to do this?
Shadow Robert
17
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Dec 2004 23:35
Quote: "I've always assumed that sort of thing is just controlled by the editor"


It is provided you load the headers and libraries into your current project.
In the project solution add 'DarkSDK.h' and in the libraries add the libs you wish to use.

You should've done this anyways to prevent undeclared symbol errors. You also have to make sure you save and reload the project after doing so, as to allow VC++ to load up the keywords into it's project IntelliSense file.


OSX Using Happy Dude
16
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 3rd Dec 2004 23:39 Edited at: 3rd Dec 2004 23:39
Apparently, it appears it works with extra functions only in c++

Walk softly... and carry a big gun...
Shadow Robert
17
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Dec 2004 23:49
What extra functions? IntelliSense is handled by the IDE, and in-fact Visual Studio is the only one with IntelliSense as it's Microsoft's technology.

using Reference Libraries is much easier, cause all the IntelliSensing is done for you without worrying. The method I explained above will put everything available into the IntelliSense for use.


OSX Using Happy Dude
16
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Dec 2004 00:17
According to the documentation, it appears that when extra functions etc are added, they will only be noticed if a C++ project is used.

Walk softly... and carry a big gun...
Rob K
Retired Moderator
17
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 4th Dec 2004 01:35 Edited at: 4th Dec 2004 01:35
@hackInc

The IntelliSense function works by listing all the functions which relate to whatever you have typed before.
So if you have an object called "myObject" and you type "myObject." it will display all the methods myObject supports.
If you have a namespace called std (This contains things like lists, queues and input / output in C++), and you type "std::" a list of all the functions in the std namespace will appear.
This is where the problem lies, the "db" bit in front of the function name is just part of the name, not the name of a namespace or any other "unit" which can contain functions etc.

IanM's plugin used a namespace called "DBPro" if I remember correctly, so typing "DBPro::" would display all the functions in that namespace.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
IanM
Retired Moderator
17
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Dec 2004 02:32
It was the No.1 reason I used namespaces.

I don't know why TGC decided on using a db prefix - it stops name collisions (like namespaces do, except for macros dammit), but doesn't trigger intellisense.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Rob K
Retired Moderator
17
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 4th Dec 2004 02:51
Quote: "except for macros dammit"


Macros are nasty hacks. I don't like using them but they can make code much more readable in places. I wish C++ had a more elegant alternative.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
MiR
16
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 4th Dec 2004 03:21
So why isn´t the namespace thing used? They looked pretty neat on that tutorial I read. I can´t see why the commands can´t use them, then again my knowledge of C is rarther basic...bum bum


A bargain at 900000€ second hand
Libera tu mente y te liberaras.
Rob K
Retired Moderator
17
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 4th Dec 2004 03:44
Lack of planning I guess.

It wouldn't be hard to write a small tool to go through the existing code an namespace-ify it though.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
IanG
15
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 5th Dec 2004 20:38
can other compilers use namespaces? just a thought

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
gdogg2k
15
Years of Service
User Offline
Joined: 20th May 2004
Location: Cornwall, UK
Posted: 5th Dec 2004 20:59
N e compiler that uses ANSI C++ standards should be compatible with namespaces, i've used them in DEVC++ ide which uses the mingw(i think) compiler

Regards
Da Dogg
IanM
Retired Moderator
17
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Dec 2004 21:11
All c++ compilers that I know about can ... and who cares about the rest

More seriously though, there are some functions that are overloaded (dbCLS comes immediately to mind) so no straight C compiler can handle the SDK anyway.

Even those compilers that can handle MS format .lib files will have problems with the name mangling scheme used for function names, so why namespaces weren't used is a little beyond me.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Argon Knight
17
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Gastonia, NC, USA
Posted: 6th Dec 2004 14:22
so then , our first real feature request should be make intellisense work.

You do get use to it, then depend on it, then forget the methods and just remember the key strokes....
gdogg2k
15
Years of Service
User Offline
Joined: 20th May 2004
Location: Cornwall, UK
Posted: 6th Dec 2004 22:16
so how did you get the Intellisense or code completion working in that screenshot? i've tried adding all the .h files and .lib files to the project and its a no go

If i dont know,
I'm sure you will
hackinc 2000
14
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: Puerto Rico
Posted: 6th Dec 2004 23:03
In the screen shot I put, you see the intellisense working because i press the shortcut ctrl+spacebar to show that the commands from the SDK dont appear ther, the ones that you see are not from the DGSKD.

Login to post a reply

Server time is: 2019-11-12 22:18:05
Your offset time is: 2019-11-12 22:18:05