Skip to content

Instantly share code, notes, and snippets.

View squeedee's full-sized avatar
🚛
Supply Chain Specialist

Rasheed Abdul-Aziz squeedee

🚛
Supply Chain Specialist
View GitHub Profile
@squeedee
squeedee / ItemRendererMediator.as
Created October 4, 2010 18:55
Flex Workaround Workaround
override public function onRegister():void {
addViewListener(Event.REMOVED_FROM_STAGE, onRemoved);
}
private function onRemoved(event:Event):void {
// On account of Robotlegs not removing mediators immediately.
mediatorMap.removeMediator(this);
}
private function compareData(editedVO:AdminDataVO):void
{
var currentStoredVO:AdminDataVO = editingModel.itemBeingEdited;
if(!comparator.areObjectsEqual(currentStoredVO, editedVO))
{
var keepHandler:Function = function():void { editingModel.updateItem(editedVO) };
var discardHandler:Function = function():void {};
override public function areObjectsEqual(accountVO1:AdminDataVO, accountVO2:AdminDataVO):Boolean
{
var result:Boolean = false;
if( (accountVO1.password == accountVO2.password ) &&
(accountVO1.email == accountVO2.email ) &&
(accountVO1.serverID == accountVO2.serverID ) &&
(accountVO1.dataSetID == accountVO2.dataSetID ) &&
(accountVO1.pluginMixID == accountVO2.pluginMixID ) &&
(accountVO1.adminPluginMixID == accountVO2.adminPluginMixID ) &&
private function isACommand(commandClazz:Class):Boolean
{
if(describeType(commandClazz).factory.method.(@name == "execute").length() > 0)
{
return true;
}
return false;
}
@squeedee
squeedee / stack
Created November 1, 2010 20:12
Apologies for the layout. I need a CMD.exe replacement
C:\Users\Rasheed>redcar
Redcar 0.8.1 ( java )
Error loading plugin: <Plugin swt 1.0 depends:[dep(core >0)] 0 files>
cannot link Java class org.eclipse.swt.widgets.Display, probable missing depen
dency: Cannot load 32-bit SWT libraries on 64-bit JVM
C:/Program Files/jruby-1.5.3/lib/ruby/site_ruby/shared/builtin/javasupport/jav
a.rb:51:in `method_missing'
C:/Program Files/jruby-1.5.3/lib/ruby/gems/1.8/gems/redcar-0.8.1/plugins/swt/l
ib/swt.rb:129
C:/Program Files/jruby-1.5.3/lib/ruby/gems/1.8/gems/redcar-0.8.1/plugins/swt/l
gem 'bundler', '0.9.26'
gem 'rails', '2.3.10'
gem 'pg'
gem 'configatron', :require => "configatron"
gem 'authlogic', '2.1.3'
gem 'hoptoad_notifier'
gem 'will_paginate', :require => "will_paginate"
gem 'libxml-ruby', :require => 'libxml'
gem 'aasm'
gem 'swf_fu'
@squeedee
squeedee / Thorfile
Created November 24, 2010 06:54
One of my ant replacements. Next stop, dependency management DSL
require 'flex_compiler'
class VWork < Thor
include FlexCompiler
namespace :vwork
artifact :swf, "vwork.swf"
desc "compile", "Compiles vWork"
package com.visfleet.core {
public function chance(numerator:int = 50, denominator:int = 100):Boolean {
var odds:Number = Number(numerator)/denominator;
return Math.random() <= odds;
}
}
@squeedee
squeedee / CustomerSelection.mxml
Created December 13, 2010 19:57
Looking good :)
<?xml version="1.0"?>
<flextras:AutoCompleteComboBox xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="com.visfleet.vWork.common.customerSelection.*"
xmlns:flextras="http://www.flextras.com/mxml/"
autoCompleteEnabled="true"
autoCompleteRemoteData="true"
labelField="name"
downArrowVisible="false"
styleName="generalTextInputStyle"
autoCompleteTextInputStyleName="generalTextInputStyle"
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:flextras="http://www.flextras.com/mxml/" layout="vertical">
<mx:Script><![CDATA[
import com.flextras.autoCompleteComboBox.AutoCompleteCollectionEvent;
import mx.collections.ArrayCollection;
private function handleFilter(event:AutoCompleteCollectionEvent):void {
event.preventDefault();