MacToIso

Trevor DeVore lists at mangomultimedia.com
Wed Dec 23 00:19:39 EST 2009


On Dec 22, 2009, at 6:36 PM, JosepM wrote:

>> on FillInData pData
>>    set the uUTF8Text of field "Name" of me to pData
>> end FillInData
>
> This will be also correct?
>
> set the unicodetext of me to uniencode(pData,"utf8")

Yes, that is correct.

> When opening the field editor in your column behavior you are already
> calling EditFieldText. The Data Grid is going to work with the 'text'
> property of the fields by default. You can override this by setting
> the dgTemplateFieldEditor["utf8text"] property (you can also pass in
> "htmltext", "rtftext", or "unicodetext") before calling
> dgTemplateFieldEditor. Setting the dgTemplateFieldEditor["utf8text"]
> property of the Data Grid will use the value you assign rather than
> the 'text' of the field.
>
> I put this but, to what value override the text?
>
> command EditValue
>    set the dgTemplateFieldEditor["utf8text"] of the dgControl of me  
> to ???

Set it to text that is encoded as UTF8.

> When closing the field editor you will need to extract the UTF8 text
> of the field editor. The example in the manual actually shows how to
> do this. Search for UTF8 on this page:
>
> How Do I Save Changes The User Makes In An Editor Field To An External
> Data Source?:
> <http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7337-How-Do-I-Save-Changes-The-User-Makes-In-An-Editor-Field-To-An-External-Data-Source-
>
> But If I want store into the datagrid I don't need it, isn't?

That is correct. If you are just storing the changes in the Data Grid  
you don't need to do anything. By setting the  
dgTemplateFieldEditor["utf8text"] property the Data Grid knows to  
store whatever text the user enters as UTF8 in the Data Grid array.

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com



More information about the Use-livecode mailing list