Skip to content

Instantly share code, notes, and snippets.

View Me1000's full-sized avatar

Randy Luecke Me1000

View GitHub Profile
/*
* CPTextField.j
* AppKit
*
* Created by Francisco Tolmasky.
* Copyright 2008, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
<?php
if(isset($_REQUEST['in']) && $_REQUEST['in'] == "yes")
{
$blah = '280NPLIST;1.0;D;K;4;$topD;K;11;dataObjectsD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;12;CPDictionaryK;8;$classesA;S;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;10;CP.objectsD;K;11;allProjectsD;K;6;CP$UIDd;1;4E;K;10;allClientsD;K;6;CP$UIDd;1;5E;K;8;allPrefsD;K;6;CP$UIDd;1;7E;K;13;isValidTTFileD;K;6;CP$UIDd;1;8E;E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;10E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;12E;D;K;6;CP$UIDd;2;13E;D;K;6;CP$UIDd;2;14E;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2
@implementation blah : CPView
{
CPTextField textField1;
CPTextField textField2;
CPImageView image;
}
/*
do your other stuff here
*/
- (id)initWithCoder:(CPCoder)aCoder
sub validIDString
{
while (length(@_[0]) < 5)
{
@_[0] = "0".@_[0];
}
return @_[0];
}
print length(@data);
print @data;
## result
## 2ARRAY(0x8974d10)ARRAY(0x895c880)ARRAY(0x895c9d0)ARRAY(0x895c760)ARRAY(0x89749a0)ARRAY(0x89749b0)ARRAY(0x8980828)ARRAY(0x8980798)ARRAY(0x8975650)ARRAY(0x8975320)
/*
* AppController.j
* blah
*
* Created by You on April 20, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
/*
* AppController.j
* doubleclick
*
* Created by You on April 25, 2010.
* Copyright 2010, Randy Luecke All rights reserved.
*/
@import <Foundation/CPObject.j>
//require("request.js");
exports.app = function(env) {
var text = "Hello world!";
var myRequest = new Jack.Request();
return {
status : 200,
headers : { "Content-Type" : "text/plain", "Content-Length" : String(text.length) },
body : [text]
newLocationType = [[CPPopUpButton alloc] initWithFrame:CGRectMake(105, 70, 200, 24)];
[newLocationType setBordered:NO];
[newLocationType setTitle:@"Select Type"];
// You can add items with just titles like so: (Note: it takes an array)
[newLocationType addItemsWithTitles:[@"Select Type", @"Building", @"Computer", @"Safe", @"Car", @"Bank", @"Yard"]];
// or pass your own menu items as an array
// This is useful if you want custom menu items (with images in them for example)
//[newLocationType addItems:[LocationItemTypes menuItems]];
[contentView addSubview:newLocationType];
var animationDict3 = [CPDictionary new];
[animationDict3 setValue:topArea forKey:CPViewAnimationTargetKey];
[animationDict3 setValue:frame3 forKey:CPViewAnimationStartFrameKey];
[animationDict3 setValue:targetFrame3 forKey:CPViewAnimationEndFrameKey];
[animationDict3 setValue:nil forKey:CPViewAnimationEffectKey];
animation = [[CPViewAnimation alloc] initWithViewAnimations:[animationDict, animationDict2, animationDict3]];
[animation setDuration:.3];
[animation setDelegate:self];