imageSource bug?
Brian Yennie
briany at qldlearning.com
Wed Jun 8 19:04:32 EDT 2005
Claudi,
Are you able to post some of your script? It sounds like you are
accidentally setting the imageSource of some characters which you DO
want to display- when you only want to set the imageSource of the "#",
"^", "*", and "•" characters.
Or is it something else?
I would imagine something similar in concept to(pseudo-code, not
tested!):
## check all of the lines in the field
put 1 into lineNumber
repeat for each line l in fld 1
## process all special characters at the front of the line
put 1 into charNumber
repeat for each char c in l
switch (c)
case "#"
put "transparent.gif" into tImage
break
case "^"
put "closearrow.gif" into tImage
break
case "*"
put "openarrow.gif" into tImage
break
case "•"
put "item.gif" into tImage
break
default
exit repeat
end switch
set the imageSource of char charNumber of line lineNumber of fld 1 to
tImage
add 1 to charNumber
end repeat
add 1 to lineNumber
end repeat
> Hi all,
>
> I am working on some sort of outliner. On each line the first word is
> like
> a header. It can have zero or more "#" chars indicating the level of
> indent
> followed by one char which can be "^", "*" or "•". This is followed by
> the
> name of the topic.
> I set the imageSource of all the chars in the first word. # is an
> transparent gif
> and the other 3 chars are images of a triangle.
>
> Ok all works well for a while and suddenly my scripts break.
> The intendetion and the triangles are still ok but the first word
> has disapeared.
> I finaly discovered what happens. All the chars with an imageSource
> get replaced by ascii 32, a space char, so of course my first word,
> or what should be my first word is gone since it has become just some
> spaces.
>
> Has anyone expirienced this before and/or does someone know
> a work around for this unwanted behaviour.
> I checked the archives but found nothing directly. There was some
> mentioning
> of html text to speed things up but that's not quite related.
>
> All help is much apreciated since this has cost me already quite a lot
> of time and frustration.
>
> Sincerly
> Claudi
>
> Ps This is with OS X.2 and both with runrev 2.5.1 and 2.6
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
More information about the use-livecode
mailing list