Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 chkRadio & chkCheckbox
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Deleted
deleted

4116 Posts

Posted - 07 October 2002 :  07:19:37  Show Profile
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  Show Profile  Visit Gremlin's Homepage
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 October 2002 :  08:36:56  Show Profile
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?
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 07 October 2002 :  10:23:21  Show Profile
3 wrong uses reported here: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=36487

Stop the WAR!
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 07 October 2002 :  10:40:36  Show Profile
quote:
Originally posted by bozden

3 wrong uses reported here: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=36487




LOL , This was fun to read. Thank you Bozden and of course Richard.

Richard, hope you can see the humor also
Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 07 October 2002 :  11:01:58  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
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
Go to Top of Page

pweighill
Junior Member

United Kingdom
453 Posts

Posted - 07 October 2002 :  12:18:23  Show Profile
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....
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 07 October 2002 :  12:29:12  Show Profile
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..."
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 07 October 2002 :  16:56:00  Show Profile  Visit Gremlin's Homepage
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 October 2002 :  17:41:03  Show Profile
It seems everything is being second guessed, that's what annoys me. Why did we even bother to release v3.4 at all?
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 07 October 2002 :  17:50:43  Show Profile  Visit Gremlin's Homepage
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
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 07 October 2002 :  18:42:37  Show Profile
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.
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 07 October 2002 :  19:08:58  Show Profile
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!
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 07 October 2002 :  19:20:20  Show Profile
How about checkedStatus
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 07 October 2002 :  20:27:19  Show Profile
How about ChecksInTheMail()

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 October 2002 :  22:58:43  Show Profile
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.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07