On Mon, 06 Jul 1998 17:59:07 +0100,
Ian Medland <Ian.Medland@parkplatz.demon.co.uk> said:
> This is a MHEG coding problem, not an implementation problem.
>
> I am trying to read the contents of a text file into a string variable
> so that I can use the DAVIC string progs to break it up, but things are
> not going as planned!
>
> You can not read referenced content into a OctetStringVar, can you?
> (SetVariable does not allow for content)
>
> So instead you can load it into a text object, but then you cann't move
> the content of that object to the variable as GetTextContent puts the
> reference in the OString!
>
> How do you do it? Or are the DAVIC string functions supposed to be able
> to understand referenced content?
You can use GetTextData action instead of GetTextContent because the
TextData attribute in text object initiated by IncludedContent or
_the content of a ReferencedContent_ when the object is prepared.
Here is the sample:
{:Text 10
:CHook 101 // PlainText
:OrigContent :ContentRef("DSMCC://sample.txt")
:OrigBoxSize 300 20
:OrigPosition 145 140
:TextColour "black"
:BackgroundColour "white"
:CharacterSet 102 // MS-JIS
}
{:IntegerVar 1
:OrigValue 0
}
{:OStringVar 2
:OrigValue "InitialStr"
}
{:BooleanVar 3
:OrigValue false
}
{:ResidentPrg 200
:Name GetStringLength
:InitiallyAvailable true
}
{:Link 100
:EventSource 0
:EventType UserInput
:EventData 15 // Select
:LinkEffect (
:GetTextData(10 2)
:Call(200 3 2 :IndirectRef 1)
)
}
Any comment are welcome.
Regards,
-----
Yoshiharu Dewa
Pioneer Corp. Information & Communication Development Center
Network Systems Department Information Technology Section
E-Mail: dewa@crdl.pioneer.co.jp
URL: http://www.pioneer.co.jp/crdl/staff/dewa/profile.html