Posts tagged with “error”
another AS3 annoyance January 31
XMLLists. What the fuck: from the documentation,
The XMLList class contains methods for working with one or more XML elements. An XMLList object can represent one or more XML objects or elements (including multiple nodes or attributes), so you can call methods on the elements as a group or on the individual elements in the collection.
If an XMLList object has only one XML element, you can use the XML class methods on the XMLList object directly. In the following example, example.two is an XMLList object of length 1, so you can call any XML method on it.
Which is great, if I don't care about properly typing my variables.
TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@1f51a779 to XML.
And of course there's no builtin way to convert a length-of-one XMLList into a normal XML object. Have to resort to the ugly (but simple)
var xml:XML = new XML(bullshitXMLList.toXMLString());
And really. Why wouldn't XMLList inherit from XML? Seriously?
Fuck AS3. January 28
It supports associative arrays, which is great, but they're broken: the length of an associative array is 0. This is because, as far as I can see, length is just a normal property that's updated when you call foo[n]. But it's just fucking ignored if you call foo[string].
Hell, the documentation even says as much, but seriously?
There is no advantage in using the Array constructor to create an associative array. You cannot use the Array.length property or any of the methods of the Array class with associative arrays, even if you use the Array constructor or the Array data type. The use of the Array constructor is best left for the creation of indexed arrays.
Why even write that? As soon as the words hit the screen, you'd think someone would say, "this is bullshit. what the fuck were we thinking?" and file a bug. There's even a stack overflow thread on how to find the length of an associative array. How is this not built in?
I hate Flash February 25
/Users/greay/projs/PROTOTYPES/branches/20090214-reproduction_branch_3D/Part.as(165): col: 34 Error: Type was not found or was not a compile-time constant: TriangleMesh3D.
public function createMesh() : TriangleMesh3D {
^
after much ripping out of hair, I saw what I'd done... Something I keep doing because I'm not used to the idiosyncrasies of Actionscript.
Instead of writing public var model : TriangleMesh3D; I'd written public var TriangleMesh3D : model. And so instead of a useful error or warning, the compiler gave me this shit.
statement still active April 28
hmm... thread 1:
#0 0x944d4318 in sqlite3VdbeExec
#1 0x944d4d6c in sqlite3VdbeExec
#2 0x940ed3b4 in -[NSSQLiteConnection _execute]
#3 0x940ed298 in -[NSSQLiteConnection execute]
#4 0x940effc0 in -[NSSQLChannel selectRowsWithFetchRequest:]
#5 0x94124e14 in -[NSSQLCore _newRowsForSelector:withArgument:andLimit:]
#6 0x940ef71c in -[NSSQLCore objectsForFetchRequest:inContext:]
#7 0x940ef5cc in -[NSSQLCore executeRequest:withContext:]
#8 0x940e36f8 in -[NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:]
#9 0x940e2b20 in -[NSManagedObjectContext executeFetchRequest:error:]
#10 0x00068af0 in -[GATableDataSource population] at GATableDataSource.m:51
#11 0x00068420 in -[GATableDataSource tableView:objectValueForTableColumn:row:] at GATableDataSource.m:12
#12 0x937d23f4 in -[NSTableView _drawContentsAtRow:column:clipRect:]
#13 0x937d1e78 in -[NSTableView drawRow:clipRect:]
#14 0x937d1c34 in -[NSTableView drawRowIndexes:clipRect:]
#15 0x937d12bc in -[NSTableView drawRect:]
#16 0x93765e78 in -[NSView _drawRect:clip:]
#17 0x93765438 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
#18 0x93764a00 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#19 0x93764fc8 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#20 0x93764fc8 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#21 0x93764fc8 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#22 0x93764fc8 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#23 0x93785664 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#24 0x9375e674 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#25 0x93753968 in -[NSView displayIfNeeded]
#26 0x937537d8 in -[NSWindow displayIfNeeded]
#27 0x93753684 in _handleWindowNeedsDisplay
#28 0x907e3cd8 in blogCFRunLoopDoObservers
#29 0x907e3f78 in blogCFRunLoopRun
#30 0x907e3a18 in CFRunLoopRunSpecific
#31 0x9321d980 in RunCurrentEventLoopInMode
#32 0x9321d014 in ReceiveNextEventCommon
#33 0x9321ce80 in BlockUntilNextEventMatchingListInMode
#34 0x93720104 in _DPSNextEvent
#35 0x9371fdc8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#36 0x9371c30c in -[NSApplication run]
#37 0x9380ce68 in NSApplicationMain
#38 0x00011fac in main at main.m:14
thread 2:
#0 0x90005f6c in syscall
#1 0x92991120 in _NSRaiseError
#2 0x940e2ccc in -[NSManagedObjectContext executeFetchRequest:error:]
#3 0x00068af0 in -[GATableDataSource population] at GATableDataSource.m:51
#4 0x00068384 in -[GATableDataSource numberOfRowsInTableView:] at GATableDataSource.m:7
#5 0x937c7178 in -[NSTableView numberOfRows]
#6 0x937c6de0 in -[NSTableView _verifySelectionIsOK]
#7 0x937c6894 in -[NSTableView tile]
#8 0x937c6764 in -[NSTableView _tileAndRedisplayAll]
#9 0x000688ac in -[GATableDataSource update] at GATableDataSource.m:32
#10 0x0003b304 in -[GAThreadController createPopulation] at GAThreadController.m:77
#11 0x0003aa6c in +[GAThreadController createPopulationWithGlob:] at GAThreadController.m:17
#12 0x92976194 in forkThreadForFunction
#13 0x9002ba68 in _pthread_body
It's pretty clear what's happening. So it shouldn't be too difficult to fix. That last problem was bindings-related, and it was happening far too deep inside code that I can't see, so I finally settled on just scrapping bindings altogether and doing all the table updating & stuff by "hand".