<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Below is code that produces an error.
You can add this method to OmniBase on the class side and run it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>test21<BR> "test if btrees mark themselves
dirty when they aren't persistent"<BR> | db col btree |<BR> ^ [db _
OmniBase openOn: self testDir.<BR> [btree _ OmniBase newBTreeDictionary:
5.<BR> btree at: 'test2' put: 'item2'.<BR> col _ OrderedCollection
new.<BR> col add: btree.<BR> OmniBase root at: 'col' put:
col.<BR> ]<BR> evaluateAndCommitIn: db
newTransaction.<BR> [btree _ (OmniBase root at: 'col') first. "Craps out
here"<BR> btree at: 'test1' put:
'item1'.<BR> ]<BR> evaluateAndCommitIn: db
newTransaction.<BR> [btree _ (OmniBase root at: 'col')
first.<BR> ((btree at: 'test1')<BR> = 'item1' and: [(btree
at: 'test2') = 'item2'])<BR> ifFalse: [self error: 'Object was not
stored']]<BR> evaluateIn: db newTransaction]<BR> ensure:
[db close]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here's the stack trace:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>VM: Win32 - Squeak3.4 of 1 March 2003 [latest
update: #5170]<BR>Image: Squeak3.5 [latest update: #5180]</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>ByteArray(Object)>>error:<BR> Receiver:
a ByteArray(58 0 0 0 0)<BR> Arguments and temporary variables:
<BR> aString: 'Improper store into indexable
object'<BR> Receiver's instance variables: <BR>a ByteArray(58 0 0 0
0)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>ByteArray(Object)>>errorImproperStore<BR> Receiver: a
ByteArray(58 0 0 0 0)<BR> Arguments and temporary variables: </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> Receiver's instance variables: <BR>a
ByteArray(58 0 0 0 0)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>ByteArray(Object)>>basicAt:put:<BR> Receiver: a ByteArray(58 0
0 0 0)<BR> Arguments and temporary variables: <BR> index:
2<BR> value: -50<BR> Receiver's instance variables:
<BR>a ByteArray(58 0 0 0 0)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>ByteArray class(Object
class)>>odbLoadVariables:classInfo:<BR> Receiver:
ByteArray<BR> Arguments and temporary variables:
<BR> deserializer: an ODBDeserializer<BR> classInfo:
an ODBClassDescription<BR> stream: an
ODBMemoryReadStream<BR> order: nil<BR> iSize:
nil<BR> object: a ByteArray(58 0 0 0
0)<BR> basicSize: 5<BR> varArray:
nil<BR> i: 2<BR> iLimiT:
nil<BR> Receiver's instance variables: <BR> superclass:
ArrayedCollection<BR> methodDict: a
MethodDictionary(#asBtreeKeyOfSize:->a CompiledMethod (198)
#asBy...etc...<BR> format:
1026<BR> instanceVariables:
nil<BR> organization: ('accessing' atAllPut: byteAt:
byteAt:put: byteSize bytesPerEleme...etc...<BR> subclasses:
#(CompiledMethod CompiledApplescript ExternalAddress
UUID)<BR> name: #ByteArray<BR> classPool: a
Dictionary()<BR> sharedPools: nil<BR> environment:
nil<BR> category: nil</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><BR>--- The full stack
---<BR>ByteArray(Object)>>error:<BR>ByteArray(Object)>>errorImproperStore<BR>ByteArray(Object)>>basicAt:put:<BR>ByteArray
class(Object class)>>odbLoadVariables:classInfo:<BR> - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
-<BR>ODBDeserializer>>newObjectNewClass<BR>ODBNewObjectNewClass
class>>odbDeserialize:<BR>ODBDeserializer>>nextObject<BR>Array
class>>odbDeserialize:<BR>ODBDeserializer>>nextObject<BR>ODBSortedDictionary
class(Object
class)>>odbLoadVariables:classInfo:<BR>ODBDeserializer>>newObjectNewClass<BR>ODBNewObjectNewClass
class>>odbDeserialize:<BR>ODBDeserializer>>nextObject<BR>ODBBTreeDictionary
class(Object
class)>>odbLoadVariables:classInfo:<BR>ODBDeserializer>>newObjectNewClass<BR>ODBNewObjectNewClass
class>>odbDeserialize:<BR>ODBDeserializer>>nextObject<BR>[] in
OrderedCollection
class>>odbDeserialize:<BR>SmallInteger(Integer)>>timesRepeat:<BR>OrderedCollection
class>>odbDeserialize:<BR>ODBDeserializer>>nextObject<BR>ODBDeserializer>>deserializeFrom:referenceManager:transaction:<BR>ODBSerializedDBObjectWithoutReferences>>makeTransactionObject:<BR>[]
in
ODBLocalTransaction(ODBTransaction)>>transactionObjectAt:<BR>BlockContext>>ifCurtailed:<BR>[]
in
ODBLocalTransaction(ODBTransaction)>>transactionObjectAt:<BR>BlockContext>>ensure:<BR>BlockContext>>valueUnpreemptively<BR>ODBLocalTransaction(ODBTransaction)>>transactionObjectAt:<BR>ODBDemandLoader>>getObject<BR>ODBDemandLoader>>perform:withArguments:<BR>ODBReference>>doesNotUnderstand:<BR>[]
in OmniBase class>>DoIt<BR>BlockContext>>ifCurtailed:<BR>[] in
BlockContext>>evaluateAndCommitIn:<BR>BlockContext>>ensure:<BR>BlockContext>>evaluateAndCommitIn:<BR>[]
in OmniBase class>>DoIt<BR>BlockContext>>ensure:<BR>OmniBase
class>>DoIt<BR>Compiler>>evaluate:in:to:notifying:ifFail:<BR>[] in
TextMorphEditor(ParagraphEditor)>>evaluateSelection<BR>BlockContext>>on:do:<BR>TextMorphEditor(ParagraphEditor)>>evaluateSelection<BR>TextMorphEditor(ParagraphEditor)>>doIt<BR>[]
in
TextMorphEditor(ParagraphEditor)>>doIt:<BR>TextMorphEditor(Controller)>>terminateAndInitializeAround:<BR>TextMorphEditor(ParagraphEditor)>>doIt:<BR>TextMorphEditor(ParagraphEditor)>>dispatchOnCharacter:with:<BR>TextMorphEditor>>dispatchOnCharacter:with:<BR>TextMorphEditor(ParagraphEditor)>>readKeyboard<BR>TextMorphEditor>>readKeyboard<BR>[]
in
TextMorphForEditView(TextMorph)>>keyStroke:<BR>TextMorphForEditView(TextMorph)>>handleInteraction:fromEvent:<BR>TextMorphForEditView>>handleInteraction:fromEvent:<BR>TextMorphForEditView(TextMorph)>>keyStroke:<BR>TextMorphForEditView>>keyStroke:<BR>TextMorphForEditView(TextMorph)>>handleKeystroke:<BR>KeyboardEvent>>sentTo:<BR>TextMorphForEditView(Morph)>>handleEvent:<BR>TextMorphForEditView(Morph)>>handleFocusEvent:<BR>--
and more not shown --</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Derek Brans<BR>Nerd on a Wire<BR>Web design that's
anything but square<BR><A
href="http://www.nerdonawire.com">http://www.nerdonawire.com</A> <BR>mailto: <A
href="mailto:brans@nerdonawire.com">brans@nerdonawire.com</A><BR>phone:
604.874.6463<BR>toll-free: 1-877-NERD-ON-A-WIRE</FONT></DIV></BODY></HTML>