Skip to content

Instantly share code, notes, and snippets.

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:myIdentifier];
if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:myIdentifier] autorelease]; }
2011-03-28 09:44:32.283 ToDo[16526:207] *** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit_Sim/UIKit-1447.6.4/UITableView.m:5613
2011-03-28 09:44:32.288 ToDo[16526:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
*** Call stack at first throw:
(
0 CoreFoundation 0x00ec6be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00cbb5c2 objc_exception_throw + 47
2 CoreFoundation 0x00e7f628 +[NSException raise:format:arguments:] + 136
3 Foundation 0x000ab47b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 UIKit 0x003248f3 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 883
5 UIKit 0x0031a77f -[UITabl
- (UITableViewCell *)tableview:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *myIdentifier = @"myIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:myIdentifier];
if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:myIdentifier] autorelease]; }
cell.textLabel.text = [toDoList objectAtIndex:indexPath.row];
return cell;
}

Syntax

Two things next to each other, as in a b, is called juxtaposition. We will see what this means later.

Any expression may be enclosed within parentheses, as in (a b). This works similarly to parentheses in other languages: it controls the order of evaluation. There is an important difference due to how scope works, or indeed doesn't, in Paws, which we shall understand later.

Any expression may also be enclosed within braces, as in {a b}. This is akin to lambdas/blocks in other languages. It represents an execution value, the meaning of which we shall understand later.

Any sequence of characters that are not whitespace, parentheses, or brackets, as in abcd, is a label.

18:08:51 -!- Rusky [[email protected]] has joined #enigma-dev
18:08:53 <@EnigmaBot> Welcome back, Rusky. Your last visit was 2011-05-24@19:15:25
18:08:53 -!- JoshDreamland [[email protected]] has quit [Ping timeout: 244 seconds]
18:09:13 -!- Rusky [[email protected]] has left #enigma-dev []
18:11:11 < micahjohnston> what
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: Source/Types/Types.h
# new file: Source/Types/label/Magazine.c
# new file: Source/Types/label/Magazine.tests.c
# new file: Source/Types/label/label.c
# new file: Source/Types/label/label.tests.c
#
typedef struct {
enum { JUXTAPOSITION, BLOCK, THING } type;
union {
struct { ast *a; ast *b; } juxtaposition;
ast *block;
thing *thing; } contents;
} ast;
function parse(text) { var i = 0
function expr() { var result = [], t
while (t = term()) { result.push(t) }
return result }
function term() { return paren() || scope() || label() }
function paren() { var result
if (whitespace() && character('(') && (result = expr()) && whitespace() && character(')')) {
ex = room_width / 2
why = room_height / 2
for (exx = 0; ex < room_width; exx += 1) {
for (whyy = 0; whyy < room_height; whyy += 1) {
draw_point_color(exx, whyy, make_color_hsv(0, 0, sqrt(((exx - ex) ^ 2) + ((whyy - why) ^ 2)) * (255 / (room_height/2))))
}
}
y
/
x -- +
\
z