Loading CanDo Brushes
6 messages in this thread
I have another CanDo 1.5 question… I would like to be able to load a
brush name that's tied directly to the value of an integer variable. For
example:
Let X = 10
LoadBrush dh0:brush/X
In this example the program would look for a brush named
"10" in the brush directory on DH0:
Can this be done? A specific example of how this can be accomplished will
be greatly appreciated.
Thanks,
Nevin
Nevin, you can do what you want. Assume you have a brush called:
"DF0:brushes/10"
Let X = 10
LoadBrush "DF0:brushes/" || X
You were just missing the quotes around the pathname (which makes it
interpreted as a sting, rather than a variable) and the '||' concantenate
operator. CanDo will interpret the '10' as either a string or a number
depending on how you're using it. Good luck.
–jp–seattle–
Alright! I was hoping it was possible. I'm using concatenation in other
places… just never thought to apply it here. This will save me a few
dozen IF statements.
Let X = "Thank You!"
Nevin
Hi John. Your concatenation tip worked just fine for my brush loads. I'm
now experiencing a different type of problem. From time to time, while
"browsing," CanDo will seems to go out to lunch on me. The program fails
to respond to any mouse clicks and the menus, while available, do not work.
When I click on the Design button, nothing happens. It almost makes me
think the program is stuck in an infinite loop, but my scripts appear to be
void of this problem in my eyes.
Is this a known bug in CanDo or should this novice programmer dig deeper?
Thanks,
Nevin
I'd guess that you you do have a loop problem. I've been using CanDo for a
while, and have had this happen plenty of times, and each time it has been
my fault. ie. I doubt if its the progs fault. Check your scripts.
If you can't spot anything quickly, I'd use the Printer utility to print
out a copy of your deck, and then just follow along with it while you click
along. That may help you figure out what's going on? If its a particular
script, you can list it here, and others eyes will look at it to help 🙂
–jp–seattle–
Thanks for the reply, John. I'll dig deeper (sigh).