2007-03-28 03:04 PM - last edited on 2023-08-07 10:41 AM by Doreena Deng
2007-03-30 01:14 PM
Marius wrote:Are you allocating space for the handle to store your text when you construct the memo fields? What you are describing suggests your text has been overwritten, which is likely to occur if you haven't allocated space for it - you could easily cause a crash when writing the text to an unallocated handle too. If this is the case, take a look at BMAllocateHandle for a start.
I'm trying to create Text and Label objects from an API script. The Memo.textContent field of the object shoud contain something like 119.45, 280.14, etc. Instead of the expected result, the object contains something like 119ÌÌÌÌÌÌÌÌÌsÌÌÌ or 280ÌÌÌÌÌÌÌÌÌÌÌÌÌ.
2007-03-30 01:51 PM
2007-03-30 02:30 PM
Marius wrote:memset wouldn't be appropriate anyway because it doesn't allocate a block of memory either - that function simply replicates a char for a specified number of times starting at a specified location.
Well, it works. I was using memset function. From now on I'll try to search for an Archicad API function to use instead of the ordinary C++ functions each time I'm in trouble.