[Implemented] Constants for network events

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

[Implemented] Constants for network events

Post by Trond »

It would be nicer if the network events 0, 2 and 3 had constants so you didn't have to remember them. It would make sense since everything else in PB has constants.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Yes, concur. For everything where it applies.
@}--`--,-- A rose by any other name ..
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

agree.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

DrawingMode() - do for them, too.
bye,
Daniel
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

DarkDragon wrote:DrawingMode() - do for them, too.
Ah, back in those days: viewtopic.php?t=9455&highlight=drawingmode ;)
<°)))o><²³
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

freedimension wrote:
DarkDragon wrote:DrawingMode() - do for them, too.
Ah, back in those days: viewtopic.php?t=9455&highlight=drawingmode ;)
Yeah, but I just wanted to mention it again here, because this topic is similar ;) .
bye,
Daniel
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

DarkDragon wrote:Yeah, but I just wanted to mention it again here, because this topic is similar ;) .
Yes I know, and I'm quite thankful for that too :)
<°)))o><²³
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Another constant suggestion: #PB_Window_Standard would equal #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget

or something, so that you didn't have to type everything everytime. It would of course also be nice if constants could be removed from the chain, for example if you could remove #PB_Window_ScreenCentered and add #PB_Window_WindowCentered (this may already be possible for all I know).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Until your wish gets considered, you may be interested in this tip:
viewtopic.php?p=120641
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

PB wrote:Until your wish gets considered, you may be interested in this tip:
viewtopic.php?p=120641
Good tip, however it will create a bit of a mess if everyone had their own constants I think...
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

same request for ChangeListIconGadgetDisplay()

Dri
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> it will create a bit of a mess if everyone had their own constants

True; I didn't consider what would happen if someone posted some code here
that made use of their own custom "Residents" file. But if they're not posting
their code, then it's totally fine. Good pick-up, though! :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Post by HeX0R »

If this will really happen, Fred could add the long forgotten Client Event 4.

This request is from 22 Apr 2003 and someone called "AlphaSND" said something like "I will add this. Thanks for the suggestions !" ;)
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

and ClientIP(). :D

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Trond wrote:or something, so that you didn't have to type everything everytime. It would of course also be nice if constants could be removed from the chain, for example if you could remove #PB_Window_ScreenCentered and add #PB_Window_WindowCentered (this may already be possible for all I know).
Yes, you can using the xor binary operator:

Code: Select all

#PB_Window_Standard = #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget

OpenWindow(0, 0, 0, 640, 480, #PB_Window_Standard & ~#PB_Window_SizeGadget, "Test")

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Post Reply