What's going wrong? Hmm.

The main thing is to make sure the myFile component actually gets
deployed -it's in it's sfStart() handler that the absolutePath attribute
gets set. This is also when the file existence and type is validated.

Try commenting out the filePath attribute, deploying MyComp and then
running sfManagementConsole to see what is up and running -and what it's
attributes are.

I suspect that what's happending is your MyCompImpl class is deploying,
but it's not deploying any children. You need to sublass CompoundImpl or
(my preference), EventCompoundImpl, to have the child deployment
handled. If you don't want that, just deploy the file alongside the class


sfSystem extends Compound  {
  myFile extends File { ... }
  myComp extends MyComp {
      sfClass "MyCompImpl";
      filePath LAZY myFile:absolutePath;
  }
}

Try that and see how it works

-steve

On 08/10/10 16:32, [email protected] wrote:
> 
> 
> Hi,
> 
> I have the following component:
> 
> #include "org/smartfrog/services/filesystem/components.sf"
> 
> MyComp extends Prim {
> 
>                  sfClass "MyCompImpl"
> 
>                  [sfLocal] myFile extends File {
> 
>                                  filename LAZY PARENT:fileName
> 
>                                  dir LAZY PARENT:dir
> 
>                                  mustBeFile true
> 
>                                  mustExist true
> 
>                                  testOnStartup true
> 
>                  }
> 
>                  filePath LAZY myFile:absolutePath
> 
> }
> 
> MyComp:fileName and MyComp:dir are later given as LAZY PROPERTY.
> 
> When I try to resolve “filePath” in my component implementation, I get 
> the link resolution exception. I can resolve myFile:filename and 
> myFile:dir though.
> 
> What am I doing wrong?
> 
> Thanks,
> 
> Dmitry
> 
> 
> 
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&  L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> 
> 
> 
> _______________________________________________
> Smartfrog-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/smartfrog-users


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Smartfrog-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartfrog-users

Reply via email to