references and concat

Andreas Unterkircher <[email protected]>
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
Hello,

I encountered one problem concerning resolution and concat of strings. Let 
me illustrate it with a small example (I omit the "#include..." 
statements) consisting of 3 components (file1.sf, file2.sf, file3.sf):

file1.sf:

file1 extends {
 string1 "string1 in file1";
 string2 "string2 in file1";
 string3 (string1 ++ " and " ++ string2);
}

file3.sf

sfConfig extends Compound {
 a extends file1;
}

This works fine, "sfParse file3.sf" yields:

sfCodeBase "default";
sfClass "org.smartfrog.sfcore.compound.CompoundImpl";
a extends  {
	string1 "string1 in file1";
	string2 "string2 in file1";
	string3 "string1 in file1 and string2 in file1";
}

SFParse: SUCCESSFUL

Now I introduce a component file2:

file2 extends {
 string4 file1:string2;
}

I change file3 to:

sfConfig extends Compound {
 a extends file2;
}

This works also fine, "sfParse file3.sf" yields:

Parser - SmartFrog 3.02.002_beta
(C) Copyright 1998-2004 Hewlett-Packard Development Company, LP
 
sfCodeBase "default";
sfClass "org.smartfrog.sfcore.compound.CompoundImpl";
a extends  {
	string4 "string2 in file1";
}

SFParse: SUCCESSFUL

Now I change file2 to reference the concateneted string from file1:

file2 extends {
 string4 file1:string3;
}

This doesn't work, "sfParse file3.sf" yields:

Parser - SmartFrog 3.02.002_beta
(C) Copyright 1998-2004 Hewlett-Packard Development Company, LP
 
ERROR 'file3.sf': 
SmartFrogCompileResolutionException:: Unresolved Reference, data: [string1 
in: HERE sfConfig:a:string4, string2 in: HERE sfConfig:a:string4], source: 
HERE sfConfig, resolutionPhase: link

Error detected. Check report.
SFParse: FAILED

Why doesn't this work ?

Thanks,
Andreas

-- 
http://cern.ch/openlab


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.