@@ -316,10 +316,10 @@ def __init__(self):
316316stuff = '\n \t \t \t \t \t \t Hello Haiku!\n \n \t \t \t \t \t \t \t \t A simple test program\n \t \t \t \t \t \t \t \t for Haiku, version 1.0\n \t \t \t \t \t \t \t \t sample code included!\n \n \t \t \t \t \t \t \t \t by Fabio Tomat aka TmTFx\n \t \t \t \t \t \t \t \t and others\n \t \t \t \t \t \t \t \t \t \t \t \n \n \t \t \t \t \t \t \t \t special thanks to:\n \t \t \t \t \t \t \t \t Zardshard and coolcoder613'
317317#n = stuff.find('Bulletin Gator')
318318#m = stuff.find('This')
319- self .typtap .SetText (stuff ,None )#, [(0, be_plain_font, (0, 0, 0, 0)), (n, be_bold_font, (0, 150, 0, 0)), (n + 14, be_plain_font, (0, 0, 0, 0)),(m,be_plain_font,(100,150,0,0))])
319+ # self.typtap.SetText(stuff,None)#, [(0, be_plain_font, (0, 0, 0, 0)), (n, be_bold_font, (0, 150, 0, 0)), (n + 14, be_plain_font, (0, 0, 0, 0)),(m,be_plain_font,(100,150,0,0))])
320320self .AddChild (self .bckgnd ,None )
321- tra = self .typtap .RunArray (0 ,len (self .typtap .Text ()))
322321self .panel .AddChild (self .list .topview (),None )
322+ ##self.tra=self.typtap.RunArray(0,len(self.typtap.Text()))
323323pittura = rgb_color ()
324324pittura .red = 255
325325pittura .green = 0
@@ -340,14 +340,18 @@ def __init__(self):
340340tr2 .font = BFont (be_bold_font )
341341tr2 .color = pictura
342342mytralist = [tr1 ,tr2 ]
343- tra .count = 2 #now you have 2 text_runs
344- tra .runs [1 ]= tr2 #assign the second one
345- self .typtap .SetRunArray (0 ,len (self .typtap .Text ()),tra )#this doesn't work
346- trb = text_run_array ()
347- trb .count = 2
348- trb .runs = mytralist
349- self .typtap .SetRunArray (0 ,len (self .typtap .Text ()),trb )#this works, why error exiting and why does trb need tra (or it won't work)
343+ ##tra.count=2 #now you have 2 text_runs
344+ ##tra.runs[1] = tr2 #assign the second one
345+ ##print("tra runs modified",tra.runs)
346+ ##self.typtap.SetRunArray(0,len(self.typtap.Text()),tra) #this doesn't work
347+ self .trb = text_run_array ()
348+ #trb=self.typtap.RunArray(0,len(self.typtap.Text()))#this crashes
349+ self .trb .count = 2
350+ self .trb .runs = mytralist
351+ self .typtap .SetText (stuff ,self .trb )
352+ #self.typtap.SetRunArray(0,len(self.typtap.Text()),trb) #this works, why error exiting and why does trb need tra (or it won't work)
350353#print(tra.runs[1].color.green)
354+ #self.typtap.SetText(stuff,trb)
351355###################### add other text_runs
352356###### Example handling refs / BEntry #####
353357a = entry_ref ()