Jake,

Now, when I create a new navigation type, it errors out.
Here's the error I get:
[Macromedia][SQLServer JDBC Driver][SQLServer]Syntax
error converting the varchar value 'false' to a column
of data type int.

You're seeing the error because you're trying to set a boolean value on an
integer field in the DB.  When setting a property type of "boolean" in your
CFC FourQ sets the field type to [int] instead of [bit] like you'd expect (I
never asked why... I always assumed it had to do with database flexibility
(being able to move the DB from one platform to another)).

To fix this you need to make some quick adjustments to your edit.cfm file
and change the values for your boolean fields.

Quick tips:  Many people often prefix their boolean fields with a lower-case
"b".  So the field "statusBar" becomes "bStatusBar".  This has no effect on
FarCry, rather it just makes for easier code readability.  Also, it is
suggested that any core types that you extend go into the
"<project>/packages/system" folder (and leave the types folder for custom
types).  Again, this is not required, but just a suggested coding method in
FarCry.

Okay, so to make the modifications change all values for your boolean form
fields to "1" or "0" (instead of true/false, yes/no, or on/off).

I'll give an example following one of the fields you created called
"statusBar".  Change the following items listed below. ("-" = remove, "+"
replace with):

- <cfparam name="form.statusBar" default="false">
+ <cfparam name="form.statusBar" default="0" />

- <cfif len(trim(statusBar)) eq 0><cfset statusBar = "No">></cfif>
+ <cfif len(trim(statusBar)) eq 0><cfset statusBar = "0" /></cfif>

- <select name="statusBar">
-       <option value="Yes" <cfif statusBar>selected</cfif>>Yes</option>
-       <option value="No" <cfif NOT statusBar>selected</cfif>>No</option>
- </select><br>
+ <select name="statusBar">
+       <option value="1"<cfif statusBar>
selected="selected"</cfif>>Yes</option>
+       <option value="0"<cfif NOT statusBar>
selected="selected"</cfif>>No</option>
+ </select><br />

--------------

Do this with each of your custom boolean properties and you should be all
set.

---
Jeff Coughlin
Web Application Developer
http://www.jeffcoughlin.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to