SuperCard 4.8 Format Fun House

SuperCard 4.5 & 4.6 projects (.zip archives only please).

SuperCard 4.8 Format Fun House

Postby codegreen » Tue Mar 29, 2016 8:15 am

A simple sample project to demonstrate the new 4.8b11 locale-related features.

FormatFunHouse.sc45.zip
(11.84 KiB) Downloaded 109 times
codegreen
 
Posts: 1510
Joined: Mon Jul 14, 2008 11:03 pm

Re: SuperCard 4.8 Format Fun House

Postby LorenzT » Wed Mar 30, 2016 12:01 am

Sorry, no fun here, can't run this project as it crashes immediately.

I'll send a crash report...

Lorenz
LorenzT
 
Posts: 176
Joined: Thu Dec 02, 2010 2:32 am
Location: Switzerland

Re: SuperCard 4.8 Format Fun House

Postby codegreen » Wed Mar 30, 2016 6:30 am

Hi Lorenz,

The project seems to get almost all the way through its setup code, then crash somewhere in the convert command. I can't tell much more from just the log though...

Do you think you could run it under the Tracer and tell me what line of script it chokes on (and what isocode is being generated and passed to convert to cause it)?

Either open the proj in SE and stick a trace at the top of the openCard handler, or else just open 4.8b11 and type trace in the msg box, then double-click the proj in the Finder.

Thanks!
-Mark
codegreen
 
Posts: 1510
Joined: Mon Jul 14, 2008 11:03 pm

Re: SuperCard 4.8 Format Fun House

Postby LorenzT » Thu Mar 31, 2016 3:59 am

The project crashes in the indicated line in the code below.
And the values of the variables are in the attached picture.

HTH
Lorenz

Code: Select all
on test localeCode
global isoCode
put cd fld "Value" + 0 into theNum

get theNum
convert it to decimal using isoCode
put it into r1
convert it from decimal using isoCode
put it into n1
convert it to currency using isoCode
put it into r2
convert it from currency using isoCode
put it into n2
convert it to percent using isoCode
put it into r3
convert it from percent using isoCode
put it into n3
convert it to words using isoCode
put it into r5
convert it from words using isoCode -- Crash is in this line
put it into n5
set the numberFormat to "0.######e"
put theNum + 0 & "" into r4
set the numberFormat to "0.######"
put theNum + 0 into n4

set the textstyle of cd fld 1 to plain
put "Style" & tab & "Formatted" & tab & "Parsed" & cr ¬
& "Decimal:" & tab & r1 & tab & n1 & cr & "Currency:" & tab & r2 & tab & n2 & cr & "Percent:" & tab & r3 & tab & n3 ¬
& cr & "Scientific Notation:" & tab & r4 & tab & n4 & cr & "Spelled Out:" & tab & r5 & tab & n5 into cd fld 1
set the textstyle of line 1 of cd fld 1 to underline
end test
Attachments
crash.png
crash.png (54.74 KiB) Viewed 2211 times
LorenzT
 
Posts: 176
Joined: Thu Dec 02, 2010 2:32 am
Location: Switzerland

Re: SuperCard 4.8 Format Fun House

Postby codegreen » Thu Mar 31, 2016 6:45 am

Okay according to Lorenz I seem to have found a workaround for this one.

The fix should be in b12, so everyone please try this puppy again after the next beta drops...

Thanks again,
-Mark
codegreen
 
Posts: 1510
Joined: Mon Jul 14, 2008 11:03 pm


Return to Sample & Demo Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron