CompuServe Thread

Loading CanDo Brushes

6 messages in this thread
#16003From: Nevin LongardnerNov 3, 1991 9:31 PM
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
#16030From: John PendergrassNov 4, 1991 7:45 PM
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–
#16035From: Nevin LongardnerNov 4, 1991 9:25 PM
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
#16048From: Nevin LongardnerNov 5, 1991 12:13 PM
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
#16058From: John PendergrassNov 5, 1991 8:24 PM
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–
#16059From: Nevin LongardnerNov 5, 1991 8:30 PM
Thanks for the reply, John. I'll dig deeper (sigh).