Property Profiles - differences on Mac and Windows (language issues)

Christian Langers christian.langers at education.lu
Tue Aug 19 02:13:47 EDT 2008


Hi there,

actually it wasn't as difficult as I thought : time to give back to  
the community !

This did it for me :

- created a stack with a button, 2 flds (+1 fld as result output)

- in fld "sta" (stacks) : list of the project's mainstacks (1 short  
name per line)
- in fld "Langs" : list of profile couples (per line) : en,win32_en;  
master,win32_fr; de,win32_de

- button script :

on mouseUp
     if fld "sta" <> "" and fld "Langs" <> ""  then
     doChange fld "sta",fld "Langs"
   else
     exit to top
   end if
end mouseUp

on doChange pStacks, pLangs  --item 1 of pLangs = created on mac ;  
item 2 of pLangs = strings to convert to windows text encoding

   put "" into fld "result"

   repeat for each line thatLine in pStacks
     repeat for each line tLangu in pLangs
       repeat with x=1 to the number of controls of stack (thatLine)
         if item 1 of tLangu = "Master" then
           set the custompropertyset of control x of stack (thatLine)  
to "cREVMaster"
         else
           set the custompropertyset of control x of stack (thatLine)  
to "cREVDiverged" & item 1 of tLangu
         end if
         ---

         if item 2 of tLangu is not in the cREVGeneral[profileList] of  
control x of stack (thatLine) then

           put the customproperties of control x of stack (thatLine)  
into tTempArray
           repeat for each line l in the keys of tTempArray
             put mactoiso(tTempArray[l]) into tTempArray[l]
           end repeat
           ----
           set the custompropertyset of control x of stack (thatLine)  
to "cREVDiverged" & item 2 of tLangu
           set the customproperties of control x of stack (thatLine)  
to tTempArray
           get the cREVGeneral[profileList] of control x of stack  
(thatLine)
           put cr & item 2 of tLangu after it
           set the cREVGeneral[profileList] of control x of stack  
(thatLine) to it
         end if
       end repeat

       if item 1 of tLangu = "Master" then
         set the custompropertyset of stack (thatLine) to "cREVMaster"
       else
         set the custompropertyset of stack (thatLine) to  
"cREVDiverged" & item 1 of tLangu
       end if
       ---

       if item 2 of tLangu is not in the cREVGeneral[profileList] of  
stack (thatLine) then

         put the customproperties of stack (thatLine) into tTempArray
         repeat for each line l in the keys of tTempArray
           put mactoiso(tTempArray[l]) into tTempArray[l]
         end repeat
         ----
         set the custompropertyset of stack (thatLine) to  
"cREVDiverged" & item 2 of tLangu
         set the customproperties of stack (thatLine) to tTempArray
         get the cREVGeneral[profileList] of stack (thatLine)
         put cr & item 2 of tLangu after it
         set the cREVGeneral[profileList] of stack (thatLine) to it
       end if
     end repeat
     put "Done stack"&&thatLine&cr after fld "result"
     save stack (thatLine)
   end repeat
end doChange


Again,

mille grazie to the community !!!

;-)

Christian


Le 18 août 08 à 15:24, Christian Langers a écrit :

> Hi Mark,
>
> thanks for your reply....
>
> Well, that means more work to come....
>
> boy !
>
> Christian
>
>
> Le 18 août 08 à 14:30, Mark Schonewille a écrit :
>>



More information about the use-livecode mailing list