archive-org.com » ORG » I » IOKE.ORG

Total: 746

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Kind: DefaultBehavior
    xx Origin mimic xx one 42 yy Hook into xx yy cellRemoved fnx sym sym should one xx removeCell one should yield the previous value of the cell show source xx Origin mimic xx one 42 yy Hook into xx yy cellRemoved fnx prev prev should 42 xx removeCell one cellUndefined obj sym originalValue nil show source method obj sym originalValue nil Hook cellUndefined should be called on the hook when a cell is removed on the observed object show source xx Origin mimic xx val foo xx vax fox yy Hook into xx yy invoked 0 yy cellUndefined method invoked xx undefineCell val yy invoked should 1 xx undefineCell vax yy invoked should 2 should be called after cellChanged show source xx Origin mimic xx val foo yy Hook into xx yy doneCellChanged false yy cellChanged method doneCellChanged true yy cellUndefined method should have doneCellChanged xx undefineCell val should be called after the cell has been undefined show source xx Origin mimic xx one 42 yy Hook into xx yy cellUndefined fnx xx cell one should be false xx undefineCell one should yield the object the cell belonged on show source xx Origin mimic xx one 42 yy Hook into xx yy cellUndefined fnx obj obj should be xx xx undefineCell one should yield the name of the cell show source xx Origin mimic xx one 42 yy Hook into xx yy cellUndefined fnx sym sym should one xx undefineCell one should yield the previous value of the cell show source xx Origin mimic xx one 42 yy Hook into xx yy cellUndefined fnx prev prev should 42 xx undefineCell one connectedObjects returns the objects this hook is connected to Hook connectedObjects should return the connected objects for that hook show source x Origin mimic y Origin mimic z Origin mimic Hook into x connectedObjects 0 should be x Hook into x y connectedObjects 0 should be x Hook into x y connectedObjects 1 should be y Hook into x y z connectedObjects 0 should be x Hook into x y z connectedObjects 1 should be y Hook into x y z connectedObjects 2 should be z Hook into x y z connectedObjects length should 3 hook objectToHookInto Takes one argument and will add that to the list of connected objects Hook hook should add a new observed object to the receiver show source xx Origin mimic yy Hook into xx zz Origin mimic yy hook zz yy connectedObjects 1 should be zz into firstConnected restConnected Takes one or more arguments to hook into and returns a new Hook connected to them Hook into should return a new hook object show source xx Origin mimic yy Hook into xx yy should mimic Hook yy should not be Hook should take one or more arguments show source Hook into Origin mimic Hook into Origin mimic Origin mimic Hook into Origin mimic Origin mimic Origin mimic Hook into Origin mimic Origin mimic Origin mimic Origin mimic Hook into Origin mimic Origin

    Original URL path: https://ioke.org/dok/release/kinds/Hook.html (2016-02-13)
    Open archived version from archive


  • Kind: DefaultBehavior
    Inactive cells details kind IO Active cells details print object Prints a text representation of the argument to the current IO object IO print should validate type of receiver show source IO should checkReceiverTypeOn print foo println object nil Prints a text representation of the argument and a newline to the current IO object IO println should validate type of receiver show source IO should checkReceiverTypeOn println foo read tries

    Original URL path: https://ioke.org/dok/release/kinds/IO.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    nil IOpt imposes no restriction on how an option looks like by default this method handles traditional unix style options f foo But you can easily change that and have your options look like you want for example like Mike tasks or windows style options if you override this method show source method arg if m long name w immediate match arg if m long nil m immediate nil m name length 1 m immediate m name 1 1 m name m name 0 0 m short if m long nil m option if m long m name m IOpt iopt ion should recognize a short option show source m IOpt iopt ion f m should not be nil m long should be nil m option should f m immediate should be nil should recognize a long option show source m IOpt iopt ion foo m should not be nil m long should not be nil m option should foo m immediate should be nil should not recognize something that is not an option show source IOpt iopt ion foo should be nil IOpt iopt ion foo should be nil IOpt iopt ion foo should be nil IOpt iopt ion foo should be nil IOpt iopt ion fo should be nil should obtain the immediate value for a short option using show source m IOpt iopt ion f 22 m should not be nil m long should be nil m option should f m immediate should 22 should obtain the immediate value for a short option using show source m IOpt iopt ion f22 moo m should not be nil m long should be nil m option should f22 m immediate should moo should obtain the immediate value for a short option show source m IOpt iopt ion f22 m should not be nil m long should be nil m option should f m immediate should 22 should obtain the immediate value for a long option using show source m IOpt iopt ion foo bar m should not be nil m long should not be nil m option should foo m immediate should bar iopt key arg Return non nil if the argument is an option keyword If non nil the object should have the following cells defined name The keyword name immediate The value if it has been provided with the keyword show source method arg name w immediate match arg IOpt iopt key should return nil for a non option keyword show source m IOpt iopt key foo m should be nil should return nil for a non option keyword show source m IOpt iopt key jojo m should be nil should recognize an option keyword show source m IOpt iopt key foo m should not be nil m name should foo m immediate should be nil should obtain the immediate value for an option keyword show source m IOpt iopt key foo jojo m should not be nil m name should foo m immediate should jojo on You can use this to create actions having an object as receiver If the first arguments are options the remaining arguments will be used to create a LexicalBlock which will be the action handler These lexical blocks can access and self cells that reference the action receiver in this case the iopt object itself on h help Show help println System exit If only given one argument will return a mimic of self having the given argument as receiver for all actions created with it opts IOpt on myApp opts on me Print myApp println opts on path Set the path cell on myApp path opts on f Call method doSomething on myApp doSomething If the first argument is an object the remaining arguments are used to create a lexicalBlock to handle the action having the first argument as receiver on myApp v Print myApp version version println show source macro argCount call arguments length if argCount 0 self if argCount 1 receiver call argAt 0 other mimic other iopt receiver cell receiver other if argCount 1 receiver call argAt 0 args call arguments 1 1 options list docs list body nil action nil if cell receiver kind Text unless handler iopt ion receiver signal MalformedOption text Not a valid option receiver option receiver receiver nil options handler option while list internal createText internal concatenateText include args first name args first last args first txt args first evaluateOn call ground if handler iopt ion txt options handler option docs txt args args rest body if args last symbol if args last name args last next name call argAt call arguments length 1 if args last name cachedResult args last evaluateOn call ground args inject fn m a m a evaluateOn call ground action options inject cell body a f f cell a if docs empty if cell body documentation action documentation cell body documentation action documentation docs join n if cell receiver action receiver cell receiver action error Condition Error Invocation NoMatch message call message context call currentContext IOpt on should return self if no args given show source o IOpt mimic o on should o IOpt on when given an object as first argument should create a lexical block having that object as receiver show source v Origin mimic o IOpt mimic o on v h help Display Help print System exit o h should mimic IOpt Action ValueActivation o help should mimic IOpt Action ValueActivation o help receiver should v IOpt on when given an object as first argument when the last argument is a symbol should create a cell assingment action if symbol starts with show source v Origin mimic o IOpt mimic o on v set Assign value to a cell on v setMePlease o set should mimic IOpt Action CellAssignment o set receiver should v should create a cell activation action show source v Origin mimic o IOpt mimic o on v call Activating a cell on v pleaseCallMe o call should mimic IOpt Action

    Original URL path: https://ioke.org/dok/release/kinds/IOpt.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    arguments for this action according to its arity The argv list must have its first element be one of the options handled by this action otherwise a NoActionForOption will be signaled This method returns an object with the following cells option The option that was processed remnant The elements from argv that were not taken as arguments for this action positional A list of positional arguments for this action keywords A dict of keyword arguments for this action show source method argv handler iopt iopt ion argv first untilNextOption true coerce nil if handler nil options include handler option error NoActionForOption text Cannot handle option s not in s format if handler handler option argv first options inspect option if handler handler option argv first remnant argv rest currentKey nil args list klist list kmap dict arity arity coerced fn txt if coerce false coerce false txt coerce coerce IOpt CommandLine Coerce mimic coerce txt shouldContinue fn arg cond untilNextOption iopt arg false currentKey true arity rest arity krest true iopt iopt key arg klist length arity keywords length args length arity positionals length if handler short handler immediate arity max abs zero opt iopt iopt get handler short handler immediate if opt opt action opt short remnant handler short handler immediate remnant handler immediate nil if handler immediate arity max abs 0 args coerced handler immediate idx remnant findIndex arg cond shouldContinue arg true key iopt iopt key arg arity krest arity keywords include key name keyword key name if kmap key keyword error OptionKeywordAlreadyProvided text Keyword keyword was specified more than once keyword keyword kmap keyword coerced key immediate if key immediate klist keyword currentKey keyword false currentKey klist currentKey kmap currentKey coerced arg currentKey nil args coerced arg false Origin with option handler option remnant remnant idx

    Original URL path: https://ioke.org/dok/release/kinds/IOpt/Action.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    initialize cellName Specs Inactive cells details kind IOpt Action CellActivation Active cells details argumentsCode nil show source method if receiver receiver cell cellName argumentsCode nil call nil show source macro call resendToValue receiver cell cellName receiver documentation nil show source

    Original URL path: https://ioke.org/dok/release/kinds/IOpt/Action/CellActivation.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    IOpt Action Inactive cells kind Active cells call value initialize cellName Specs Inactive cells details kind IOpt Action CellAssignment Active cells details call value nil show source method value receiver cell cellName value initialize cellName nil show source method cellName

    Original URL path: https://ioke.org/dok/release/kinds/IOpt/Action/CellAssignment.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    IOpt Action MessageEvaluation Active cells details call nil show source macro argCount call arguments length cond argCount 0 messageToEval evaluateOn call ground receiver argCount 1 value call argAt 0 messageToEval evaluateOn call ground with it value receiver error Condition Error

    Original URL path: https://ioke.org/dok/release/kinds/IOpt/Action/MessageEvaluation.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    initialize valueToActivate Specs Inactive cells details kind IOpt Action ValueActivation Active cells details call nil show source macro kargs dict if cell valueToActivate kind LexicalBlock cell valueToActivate kind LexicalMacro kargs kargs self receiver call activateValue cell valueToActivate receiver kargs initialize

    Original URL path: https://ioke.org/dok/release/kinds/IOpt/Action/ValueActivation.html (2016-02-13)
    Open archived version from archive



  •