Having trouble using an XCmd or XFcn? Post your questions here.


Postby sctell » Mon Jul 04, 2016 1:18 am

There seems to be a bug in the createObject xfcn.

The example script contains this:

Code: Select all
if theDataObject is empty then
    get createobject("this cd", spec)
    get createobject("this cd", spec, theDataObject)
end if

if you force it to call get createobject("this cd", spec) by put empty into theDataObject it crashes SC.

I have noticed this with typText and typField (not checked others).

All the best

Posts: 1130
Joined: Sun Jul 06, 2008 10:41 am

Re: createObject

Postby codegreen » Mon Jul 04, 2016 7:29 am

Actually the bug is not in the external, but in SuperCard itself...

Apparently when you don't pass it a data handle for editable fields or draw text, the IT whuffs up the required object by making an empty TERec and then calling a long-obsolete internal SC function called packtext (which flattens TextEdit records for storage in projects). However packtext was dropped from the internal ProcPtr tables during the Universal Binary port, because I didn't realize it was still in use anywhere...

Posts: 1534
Joined: Mon Jul 14, 2008 11:03 pm

Return to Using Externals

Who is online

Users browsing this forum: No registered users and 1 guest