-------------------------------------------------------------------------------- -- Title: MyService.lua -- Description: Like a square peg in a round hole -- Author: Raphaël Szwarc http://alt.textdrive.com/lua/ -- Creation Date: February 1, 2005 -- Legal: Copyright (C) 2005 Raphaël Szwarc -------------------------------------------------------------------------------- -- import dependencies local LWObjectService = require( "LWObjectService" ) local MyComponent = require( "MyComponent" ) -- define the class local super = LWObjectService local self = super() -- method to define an object for a given path function self:objectWithPath( aPath, aContext ) return nil end -- method to define a path for a given a object function self:pathWithObject( anObject, aContext ) return nil end -- method to define a value for a given a object function self:valueWithObject( anObject, aContext ) return anObject:toString() end -- method to define a title for given a object function self:titleWithObject( anObject, aContext ) return nil end -- method to define a component for given a object function self:componentWithObject( anObject, aContext ) local someBindings = { object = anObject } local aComponent = MyComponent( aContext, nil, someBindings ) return aComponent end return self