<div dir="ltr"><div>I like short variable names and I find prefixes aesthetically more pleasing than postfixes.</div><div>Thus I strongly prefer "btnThis" than "ThisButton". But both are fully understandable.</div><div><br></div><div><br></div><div>Jussi<br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 16, 2019 at 10:53 PM Cedron Dawg <<a href="mailto:cedron@exede.net">cedron@exede.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Roger that.<br>
<br>
I don't generally use prefixes on Control Names, that's part of my (none) group.<br>
<br>
Didn't you mean?<br>
<br>
btnThat_click() <br>
btnThis_click() <br>
btnWhatever_click() <br>
<br>
I would use:<br>
<br>
ThatButton_Click()<br>
ThisButton_Click()<br>
WhateverButton_Click()<br>
<br>
for buttons on the form that say [That][This][Whatever]<br>
<br>
It's more linguistically (at least English style) consistent with natural language.<br>
<br>
Your sort order argument is valid though, but often enough don't you have a group of controls for a single purpose?  So you might have<br>
<br>
NameEntryTextBox<br>
NameEntryButton<br>
NameEntryStyleComboBox<br>
<br>
I am working on fairly large application now.  I am naming all the subroutines and controls with handlers a prefix for the tab they are on.  That way all the routines group in the code routine list drop down.<br>
<br>
Again, the prefix has a where function to it.  Same style as I use for enumerated constants "XX_".<br>
<br>
<br>
----- Original Message -----<br>
From: "gen braga" <<a href="mailto:genbraga1@gmail.com" target="_blank">genbraga1@gmail.com</a>><br>
To: "user" <<a href="mailto:user@lists.gambas-basic.org" target="_blank">user@lists.gambas-basic.org</a>><br>
Sent: Saturday, March 16, 2019 4:00:42 PM<br>
Subject: Re: [Gambas-user] Better use of prefixes<br>
<br>
Cedron, <br>
<br>
I didnt mean a group handler... I mean all buttons grouped sequentialy in the IDE code editor's method selector combo box: <br>
<br>
btnButtonThat_click() <br>
btnButtonThis_click() <br>
btnButtonWhatever_click() <br>
<br>
Any reasonably intelligent person would need a minimun knowledge of Gambas or VB to understand group handlers anyway. Past the needed knowledge to understand prefixes. <br>
<br>
Cheers, <br>
<br>
Gen. <br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>