View Single Post
  #20  
Old 03-04-2011, 07:09 AM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
perhaps load and save the string rather than the lines then.
PHP Code:
// Load and save strings, not lines
function onActionServerSide(afisvar1svar2) {
  switch (
afi) {
    case 
"callTextTypeFile":
      
temp.text_type_file.loadString(svar1);
      
triggerClient("gui"name"displayTextTypeFile"temp.text_type_file);
    break;
    case 
"editTextTypeFile":
      
temp.text_type_file.saveString(svar20);
    break;
  }
}

//#CLIENTSIDE

// Receive the entire text string and display it on the multiline text control
function onActionClientside(cmdparam) {
  switch (
cmd) {
    case 
"displayTextTypeFile":
      
MyGuiMultiLineTextControl.text param;
    break;
  }
}

// Send a string rather than lines
function sendStringToServer() {
  
temp.mytext MyGuiMultiLineTextControl.text;
  
triggerServer("gui"name"editTextTypeFile"temp.mytext"MyFile.txt");

__________________
Reply With Quote