COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Prev Previous Post   Next Post Next
Old 03-26-2020, 03:58 AM   #1
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 264
Default Can't serialize (WDL-OL)

Hi,

I was looking for text entry and found AlgDisplay in IPlugEEL. Working fine but can't serialize it to remember entered text after closing and re-opening DAW.

I tried but can't find the way...

Let me know what i'm doing wrong...

Thanks.

Here is my code;

Plug.h

Code:
    
  WDL_String Text01;
  
  char CharText01[4096] = "Track Name";
Plug.cpp

Code:
  mTextControl = new AlgDisplay(this, r, &textProps, CharText01);
  pGraphics->AttachControl(mTextControl);

-
-
-

bool Plug::SerializeState(ByteChunk* pChunk)
{
  TRACE;
  IMutexLock lock(this);
  
  Text01.Set(CharText01);
  
  pChunk->PutStr(Text01.Get());
  
  return IPlugBase::SerializeParams(pChunk);
}

int Plug::UnserializeState(ByteChunk* pChunk, int startPos)
{
  TRACE;
  IMutexLock lock(this);
  
  startPos = pChunk->GetStr(&Text01, startPos);
  
  strcpy(CharText01, Text01.Get());
  
  return IPlugBase::UnserializeParams(pChunk, startPos);
}

Last edited by Tunca; 03-26-2020 at 04:31 AM.
Tunca is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.