Anyone know why this works fine on a PC but causes director to crash on the Macintosh side?

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Apr 13 23:17:59 CDT 2004


On 4/13/04 11:06 PM, "Kristafer Vale" <kristafer at comcast.net> wrote:

Hi Kristafer,

> Here's a function that utilizes Valentina in Director MX 2004 that on the PC
> this works no problem but on the mac it crashes not only the script but
> Director itself. Debbuging I've been able to narrow it down to right when
> the RecCount is about to be set, but it crashes before I can see what is
> going on. Anyone see anything with this function that would be harmful to
> macintoshes?
> 
> on reOrderTheSlides
> global gMyLessonDB, gCurrentSlideShowID
> set query = "select SlideOrder from slides WHERE slideShowID like
> '\A"&gCurrentSlideShowID&"\Z' order by SlideOrder"
> set mySlidesCursor = new(xtra "VCursor", getRef(gMyLessonDB), query, 2,3,2)

> set RecCount = GetRecordCount(mySlidesCursor)

I think that if you set break point and stop just before GetRecordCount()
Then you will see that mySlidesCursor contains not normal value.
E.g. Some big negative integer value.

This means that cursor was not created.
You should always check Valentina Error after cursor creation.

I think you will find some error code that Valentina have return you.


> set FieldCount = getFieldCount(mySlidesCursor)
> FirstRecord(mySlidesCursor)
> repeat with i = 1 to RecCount
>  newSlideOrder = i
>    if newSlideOrder <> 0 then
>     if newSlideOrder <= 9 then
>       newSlideOrder = "00"&string(integer(newSlideOrder))
>     else if newSlideOrder <=99 then
>       newSlideOrder = "0"&string(integer(newSlideOrder))
>     else
>       newSlideOrder = string(integer(newSlideOrder))
>     end if
>   else
>     newSlideOrder = "001"
>   end if
>   put "Formatted NewSlideOrder is:"&&newSlideOrder
>   UpdateRecord(mySlidesCursor, [#SlideOrder:newSlideOrder])
>   nextRecord(mySlidesCursor)
> end repeat
> mySlidesCursor = []
> end

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list