Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
#marginInset {
margin: 15px;
border: medium solid white
}
<%= select_field_view :field => :inviter,
:name_key => 'name',
:value_key => 'bizid',
:bind => { :objects => 'SharedBusiness.Business.arrangeObjects' } %>
popup: function(anchorView, triggerEvent) {
// this will bypass the normal observer machinery, calling the private
// _show method ourselves. To avoid triggering _show twice, we patch up
// the internal _isVisible property.
this._isVisible = true ;
this._show(anchorView, triggerEvent) ;
this.set('isVisible', true);
},
Account cfgTestCall := block( arg1, arg2, # block, so undefined symbols are lexically-scoped when patched
cfg( i32 /* return type*/, i32 arg1, i32 arg2, /* typed arguments */
bb( start, // labeled "start", label only valid within this cfg
tail call int32 %sprintf( i32 arg1, i8 arg2 )
%ignored = opaque %dynamicBB // dynamicBB is a method, but we don't have to call it as one in LLVM if there are no args
br label block2
)
bb( block2, // labeled "block2", label only valid within this cfg
%addresult = add i32 1, %AnArg ; <i32> [#uses=1]
%list = %List* %dynamicBlock // dynamic call (no need to use intrinsics when there are zero args)
- (NSUInteger) countOfArrangedTreeNodes;
{
return [_treeNodes count];
}
- (SCTreeNode *) objectInArrangedTreeNodesAtIndex: (NSUInteger) index
{
return [_treeNodes objectAtIndex: index];
}
emptyElement: [
'<div class="sc-inline-text-field-view">',
'<div class="sizer"></div>',
'<textarea class="inner-field" wrap="virtual"></textarea>',
'</div>'
].join(''),
readAttribute: function(key) {
if (!this._cachedAttributes) this._cachedAttributes = {} ;
var ret = this._cachedAttributes[key] ;
if (ret === undefined) {
var attr = this._attributes ;
ret = (attr) ? attr[key] : undefined ;
if (ret !== undefined) {
var recordType = this._getRecordType(key+'Type') ;
ret = this._propertyFromAttribute(ret, recordType) ;
}
{
interval: 20, // time between animation frames
duration: 400, // length of animation
onComplete: function(){},
onStep: function(){},
transition: Animator.tx.easeInOut
}
<%= slider_view :slider, :minimum => 1, :maximum => 4, :step => 1, :bind => {:value => 'HelloWorld.appController.sliderValue' } %>
from
<% content_for('body') do %>
<div class="sc-welcome">
<img class="logo" src="<%= static_url('images/sproutcore-logo') %>" />
<div class="message">
<%= checkbox_view :clock_checkbox, :label => "Show Clock", :bind => { :value => 'HelloWorld.appController.isClockShowing' } %>
#left {
position: absolute;
top: 0px;
width: 200px;
bottom: 0px;
left: 0px;
padding: 0px;
margin: 0px;
border: none;
}