Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-17-2009, 07:12 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Personal preference.
__________________
Reply With Quote
  #2  
Old 05-17-2009, 10:52 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Chompy View Post
Personal preference.
I disagree, more like coding standard.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 05-17-2009, 11:12 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by fowlplay4 View Post
I normally name the GuiWindowCtrl's or GuiBitmapBorderCtrl's after the main title for it.

I.e: JailInformation instead of JailInformation_Window

But everything below that uses your naming convention.

I.e Close button: JailInformation_Close
The reason I would add the _Window is so I can, for example, close all those windows.

PHP Code:
for (temp.control GraalControl.controls) {
  if (
control.name.starts("JailInformation_")) {
    
control.destroy();
  }

without picking up JailInformation2_Window or whatever for a completely different window.

I see what you mean, though.
Quote:
Originally Posted by Chompy View Post
Personal preference.
It's not really personal preference. If you name all your windows "Window", you're going to have problems.
__________________
Reply With Quote
  #4  
Old 05-18-2009, 01:00 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chompy View Post
Personal preference.
Actually, it is completely common sense. If we all had scripts using generic GUI object names like "Window", then everyone's scripts would break everyone else's scripts. At least having the name of the script or something means that the chance of collision is much less likely.

It's actually quite funny how many times I came across this when I was a GST; people's scripts not working because they did the exact same thing and used generic object names, only to later find that the same object name had been used elsewhere and that they were going to conflict.
Reply With Quote
  #5  
Old 05-20-2009, 11:02 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Chompy View Post
Personal preference.
I believe Chompy is referring to this:
Quote:
Originally Posted by fowlplay4 View Post
I normally name the GuiWindowCtrl's or GuiBitmapBorderCtrl's after the main title for it.

I.e: JailInformation instead of JailInformation_Window

But everything below that uses your naming convention.

I.e Close button: JailInformation_Close
... not to using descriptive names.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #6  
Old 05-20-2009, 11:09 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by LoneAngelIbesu View Post
I believe Chompy is referring to this:


... not to using descriptive names.
Indeed, forgot to quote Jerret. D:
Sorry.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.