GEM text tree structor problems

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

GEM text tree structor problems

Postby exxos » Thu Dec 24, 2015 2:33 pm

I have a RSC file with all my text boxes (again this is for Gembench) though the actual text name boxes my code fails to update, in fact it just makes the program go crazy and crash :lol:

The code I have is this..

Code: Select all

'**********************************************
'UPDATE A TEXT OBJECT
'**********************************************
SUB DT(t$,ob)
'string "hello  ", object number
'note all text strings should be 6 letters long (well 7)

static junk,tt$,n,xx,obadr&,obspec&,w,h,x,y,temptree&
shared tree&

'GET INFO

obadr& = tree&+ (ob*24)
obspec&=peekL(obadr&+12)
w=peekW(obadr&+20)
h=peekW(obadr&+22)
junk=objc_offset(tree&,ob,x,y)

   for n=0 to 6
   tt$=mid$(t$,n+1,1)
   xx=asc(tt$)
   pokeB (obspec&+n),xx
   next n

END SUB


'***************************************************
'CLEAR ALL BOXES WITH CHR
'***************************************************
SUB IV
'T1,R1 is the box names not variables
'So box names go from T1 to T14, same with Ratio boxes
'boxes must be 7 letters long!

   for n=0 to 14
   call DT(" 00000 ",T1+n) ' time
   call DT(" 11111 ",R1+n) ' ratio
   next n

'attempt to alter the first test text GEM DIALOG TEST
'test text boxes must be 18 letters long
'this is broke ?
'call DT("HELLO        HELLO",TEST1)

END SUB


This will update all the "time" and "ratio boxes" with "00000" and "11111".

When I come to update the TEST name boxes with call DT("HELLO HELLO",TEST1) It must just corrupt somewhere in RAM rather than update the box. They all seem to be string boxes, they are all in "form1" So clueless as to why those particular boxes won't update.

I can only assume I am not selecting the correct boxes for some reason for the TEST1 box, but no idea why :shrug:
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: GEM text tree structor problems

Postby exxos » Thu Dec 24, 2015 3:53 pm

ahh nevermind! Problem was TEST1 was a sub routine AND and text box name, so it was actually calling the test routine rather than running the text update routine :roll: :roll: :roll: :roll: :roll: :roll: :lol:
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator


Social Media

     

Return to “Other BASIC”

Who is online

Users browsing this forum: No registered users and 2 guests