Author |
Topic  |
Deleted
deleted
    
4116 Posts |
Posted - 07 October 2002 : 07:19:37
|
They are exacly same.
function chkRadio(actualValue, thisValue, boltf)
if isNumeric(actualValue) then actualValue = cLng(actualValue)
if actualValue = thisValue EQV boltf then
chkRadio = " checked"
else
chkRadio = ""
end if
end function
function chkCheckbox(actualValue, thisValue, boltf)
if isNumeric(actualValue) then actualValue = cLng(actualValue)
if actualValue = thisValue EQV boltf then
chkCheckbox = " checked"
else
chkCheckbox = ""
end if
end function
chkRadio is called in 149 places, chkCheckbox is called in 7 places.
Is the idea behind this, the flexibility for future changes?
|
Stop the WAR! |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 07 October 2002 : 07:55:04
|
quote: Is the idea behind this, the flexibility for future changes?
Unlikely, I'd say no more than an oversight. A couple of people wrote similar functions and I think perhaps somehow it just managed to sneak in there twice. |
Kiwihosting.Net - The Forum Hosting Specialists
|
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 07 October 2002 : 08:36:56
|
chkRadio is used with Radio buttons, and chkCheckBox is used with checkboxes. This is not an oversight. It was done on purpose to be consistent. If we had used chkRadio for all of them, then we would have people wondering why we were using chkRadio on a checkbox. If we had used chkCheckBox for all of them, then we would have people wondering why we were using chkCheckBox on a radio button. Are we going to have to explain every single thing that is used in the forum and why it was used? |
 |
|
Deleted
deleted
    
4116 Posts |
|
ajhvdb
Junior Member
 
Netherlands
392 Posts |
|
alex042
Average Member
  
USA
631 Posts |
Posted - 07 October 2002 : 11:01:58
|
quote: Are we going to have to explain every single thing that is used in the forum and why it was used?
Yea, can you explain the chkHumor button? Do I see a radio-in-a-box? What's this "If OddSenseHumor then"?
|
Edited by - alex042 on 07 October 2002 11:24:21 |
 |
|
pweighill
Junior Member
 
United Kingdom
453 Posts |
Posted - 07 October 2002 : 12:18:23
|
quote: Originally posted by RichardKinser
Are we going to have to explain every single thing that is used in the forum and why it was used?
No matter what you do and which way to do it, there will usually be questions.... |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 07 October 2002 : 12:29:12
|
quote: Originally posted by pweighill No matter what you do and which way to do it, there will usually be questions....
Because, there is nothing such as "this is the only way of doing it..."  |
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 07 October 2002 : 16:56:00
|
Excuse me for trying to second guess you Richard :) If its that important to anyone you can always rename one of them to CheckFormObject or something and delete the other. |
Kiwihosting.Net - The Forum Hosting Specialists
|
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 07 October 2002 : 17:41:03
|
It seems everything is being second guessed, that's what annoys me. Why did we even bother to release v3.4 at all? |
 |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 07 October 2002 : 17:50:43
|
Well excuse me again, but thats always going to happen Richard, if you take the view that your way is "the best and I don't need to justify it" then your going to have people alienate you regularly.
The whole point of a community is to share ideas, point out mistakes and help each other become better developers, and as such I think it would be fair to assume people are going to ask "why did do you do such and such this way.." or "why not do it this way instead..".
This is a common issue with Open Source products the people who do the hard work and spend the most time and effort on a project always seem to feel belittled when someone points something out to them even though that persons intentions were perfectly harmless. |
Kiwihosting.Net - The Forum Hosting Specialists
|
Edited by - Gremlin on 07 October 2002 17:51:08 |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 07 October 2002 : 18:42:37
|
I would think of naming the function as IsChecked. Which will not relate to a particular object and IMO everyone will understand it without a confusion. |
 |
|
Deleted
deleted
    
4116 Posts |
Posted - 07 October 2002 : 19:08:58
|
quote: Originally posted by GauravBhabu
I would think of naming the function as IsChecked. Which will not relate to a particular object and IMO everyone will understand it without a confusion.
IsXXX style is usually used to check the status of something, like IsNull, IsNumeric etc.
DoCheck is also not a good choice because the effect is conditional.
chkFormElement is an acceptable name IMO. |
Stop the WAR! |
 |
|
GauravBhabu
Advanced Member
    
4288 Posts |
Posted - 07 October 2002 : 19:20:20
|
How about checkedStatus |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 07 October 2002 : 20:27:19
|
How about ChecksInTheMail()
|
====== Doug G ====== Computer history and help at www.dougscode.com |
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 07 October 2002 : 22:58:43
|
quote: Originally posted by bozden
quote: Originally posted by GauravBhabu
I would think of naming the function as IsChecked. Which will not relate to a particular object and IMO everyone will understand it without a confusion.
IsXXX style is usually used to check the status of something, like IsNull, IsNumeric etc.
DoCheck is also not a good choice because the effect is conditional.
chkFormElement is an acceptable name IMO.
As I said, change it however you would like to in v4.0, but I don't see it as a necessity to change it in v3.4. |
 |
|
Topic  |
|