English 中文(简体)
Aile Toolkit数据库在实地增加的类型
原标题:Types to add in field from database Agile Toolkit

I ve discovering Agile Toolkit and I have problem with finding addField( field )->type(). What kind of types could there be and where can I find them? I need type set , but addField( field )->type( set ) is not working.

事先感谢你。

问题回答

ATK4以简单易懂的基本类型分发,仅限于以下清单:

  • string
  • date
  • datetime
  • text
  • int
  • real
  • boolean
  • password
  • list

关于<条码>>>> /代码类型,最接近的将是<条码>>> /代码类型。

例如:

 $this->addField( month )->type( list )->caption( Month )
    ->listData(array(
        1 =>  Jan ,
        2 =>  Feb ,
        3 =>  Mar ,
        4 =>  Apr ,
        5 =>  May ,
        6 =>  Jun ,
        7 =>  Jul ,
        8 =>  Aug ,
        9 =>  Sep ,
       10 =>  Oct ,
       11 =>  Nov ,
       12 =>  Dec ));

还对<代码>boolean有特殊处理。 ATK4模型中的类型,并不直接与同一boolean。 MySQL的类型完全相当于TINYINT(1)。

为了在ATK4的表格领域使用<代码>boolean的类型,必须将其宣布为<代码>enum(Y ,N ),并附有其外地名称的is_

例如:

 CREATE TABLE foo (
 id INT(11) NOT NULL AUTO_INCREMENT,
 :
 is_active ENUM( Y , N ) NOT NULL DEFAULT  Y ,
 :
 PRIMARY KEY (id)
 ) DEFAULT CHARSET=utf8;

with this, the MVCGrid, MVCForm and CRUD can treat the is_active as a special field and be displayed as a graphical check mark on grids and a check box button on forms.

我发现的哪类领域的最佳来源是:

http://agiletoolkit.org/doc/ref”rel=“nofollow”>ATK4 AP Reference

当然,我更不用说,一个月进入ATK4,是一个良好的起点。 向ATK4提供的例子很有帮助,职业介绍的实例也有一些好坏。 Dive in!





相关问题
How to start to create an application GUI using C#?

HI! I am new to C# and plan to use it for my application GUI. I am trying to make my GUI similar to SPSS:http://www.spss.com/images/08/statistics_screens/ez_rfm-big.jpg Is this easy in C#? Is there ...

Automatic height of edit box

My shoes application has three items stacked on top of each other (with a stack, of course), in order: A banner An edit box Two buttons in a flow What I want to do is have the banner stay at it s ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

UI And TcpClient Issue in vb.net

I m having some problems with a small ircbot i m writing. Basically I connect to the server using a tcpclient in a seperate class, which also runs on its own thread. I want to display the server text ...

UI Convention: Shortcut key for application exit? [closed]

Is there a convention for the shortcut keys for application exit? Some applications uses Alt+X some others use Ctrl+ X and Ctrl+Q. Applications like FF and IE doesnot assign a shortcut at all. So is ...

热门标签