Nitrogen 学习过程实录(13)

 

8、规定元件的行为(actions)

在Elang中,术语“action”含义广泛。元件属性actions可以赋予的任何值,都是action。在网页上,action决定元件的表现。你可以指定各元件的行为,并且,有的行为可以嵌套指定。

Nitrogen在编译大多数行为时,简单地将Javascript命令赋予元件。这些Javascript命令在网页载入后,可能立即执行,改变元件的状态,或者监听特定事件,如鼠标点击、光标位置等等。

(1)、如何指定行为

行为指定的方式有2种,一是直接嵌入,二是调用函数wf:wire。第二种方式需要确定元件的名字。除此之外,两种方式的效果相同。

(2)、直接嵌入的行为

下面的代码以脚本语句Effect.Highlight,生成一级大字标题的HTML内容。例如:

#h1 { text="A Heading", actions=#effect_highlight{} } 

你可以用列表指定多个行为:

#h1 { text="A Heading", actions=[

    #effect_highlight{},

    #effect_appear{}

]}

(3)、通过函数wf:wire(...)指定行为

#h1 { id=headline, text="A Heading" }

...

wf:wire(headline, #effect_highlight{})

你也可以用列表指定多个行为:

#h1 { id=headline, text="A Heading" }

...

wf:wire(headline, [

    #effect_highlight{},

    #effect_appear{}

])

(4)、直接调用Javascript

Nitrogen允许你在元件上直接调用Javascript,并且可在调用过程中引用元件。

你可以用obj('me')得到当前元件,obj('me.child1.child2')得到当前元件的子元件,或者用obj('element1.element2') 引用网页上的其他元件。

下面是个示例,以提示窗口显示当前元件的id:

#h1 { id=headline, text="A Heading", actions="alert(obj('me').id)"} 

或者:

#h1 { id=headline, text="A Heading" }

...

wf:wire(headline, "alert(obj('me').id)")

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Rab GTPases serve as master regulators of membrane trafficking. They can be activated by guanine nucleotide exchange factors (GEF) and be inactivated by GTPase-activating proteins (GAPs). The roles of some GAPs have been explored in Saccharomyces cerevisiae, but are largely unknown in filamentous fungi. Here, we investigated the role of GAP Gyp3 gene, an ortholog of S. cerevisiae Gyp3, in an entomopathogenic fungus, Metarhizium acridum. We found that MaGyp3 is mainly localized to the endoplasmic reticulum (ER) of vegetative hyphae, nuclei of mature conidia, and both ER and nuclei in invasive hyphae. Lack of MaGyp3 caused a decreased tolerance to hyperosmotic stress, heat-shock and UV-B radiation. Moreover, the ΔMaGyp3 mutant showed a significantly decreased pathogenicity owing to delayed germination, reduced appressorium-mediated penetration and impaired invasive growth. Loss of MaGyp3 also caused impaired fungal growth, advanced conidiation and defects in utilization of carbon and nitrogen sources, while overexpression of MaGyp3 exhibited delayed conidiation on nutrient-rich medium and conidiation pattern shift from microcycle conidiation to normal conidiation on nutrient-limited medium. Mavib-1, a tanscription factor invloved in conidiation by affecting nutrient utilizaiton, can directly bind to the promoter of MaGyp3. ΔMaGyp3 and ΔMavib-1 mutants shared similar phenotypes, and overexpression mutants of MaGyp3 and Mavib-1 (Mavib-1-OE) exhibited similar phenotypes in growth, conidiation and pathogenicity. Reintroduction of the Magyp3 driven by strong promoter gpd in ΔMavib-1 mutant recovered the defects in growth and conidiation for dysfunction of Mavib1. Taken together, our findings uncovered the role of GAP3 in a filamentous pathogenic fungus and and illustrated the upstream regulatory mechanism by direct interaction with Mavib-1.请用nature杂志的风格润色成学术论文的形式。
02-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值