ABCanvas with TCG Game

Is anyone familiar enough with ABCanvas to help me? The original author has completely abandoned Xojo and seems unwilling to help me.

In Tutorial 7 of the Canvas Control on adds a menu control for the canvas elements. I need that but I am not sure where to add the code as my implementation is a little different than his. His has a LoadType Method which loads the menu elements but I am not using that method as it is not needed for my game.

When the user is able to take actions with their cards, clicking on certain cards will bring up this menu I am trying to implement. While my menu is slightly different than what the tutorial shows the code I believe would be very similar. His tutorial uses two side by side picture to demonstrate the play and stop buttons. Mine will be stacked top to bottom and the menu appears above the card.

The tutorial I am referring to is located here:

I have seen Alain Bailleul not long ago in this forum. When you say he is unwilling to help you, have you contacted him ?

Alain Bailleul posted here some weeks ago. he is still alive in Xojo !

I have contacted him, he replied to me once. That was many weeks ago.

He told me he hasn’t used Xojo in over a year and to ask here.

Can anyone help me?

I ones looked at the class but it is not very usable because it is very slow in general (drawing and refreshing that is).
Also, the basic code is pretty simple so not sure were you can get stuck.

What may be simple to you is not simple to me. This works great for what I am using it for.

I dont have time to download / type in the tutorial to see what it is doing in detail.

Essentially: each thing is an object , and you have code that detects when an object is clicked upon.
That switches some ‘active’ state from the previous object to the current one.

the current object is redrawn in some way to show that it is active.

Adding to that, the tutorial changes the border to add one or more icons that suggest play or view options are available,
When one of these is clicked upon, an action should occur.

Which part are you having trouble with?

I know what it’s doing I just don’t understand what it’s doing in code.

This is why you have this thing called debugger. And you hit your head as long as needed on the keyboard until you understand the code.

Or you post the section you have problems with and tell us what you don’t understand.

[quote=291472:@Beatrix Willius]This is why you have this thing called debugger. And you hit your head as long as needed on the keyboard until you understand the code.

Or you post the section you have problems with and tell us what you don’t understand.[/quote]
What kind of response is that. I find that very rude and uncalled for. Just because it comes easy to you doesn’t mean it comes easy for everyone. This drawing on canvas stuff is very difficult for me to understand.

We can’t read your mind. How do you think we learned?

It seems that every time I come here for help I get very nasty people like you which makes me want to give up. I thought this forum was here for people who are having trouble understanding stuff?

Charles: for the last time: post your code and show us what you have problems with.

Personally I thought her response was quite appropriate… How can anyone answer a vague question… You need to tell us what specifically you do not understand, or places where you think you understand it, but it isn’t working the way you thought it should be. This is probably the best and most helpful technically forum of any kind that you will find on the internet.

HOWEVER, that being said, we are all volunteers, and while willing to help, you need to help us help you. We are not going to do the work for you, how are you going to learn that way.
So… tell us what you have done, what errors (if any) you are getting, why you think something is or is not doing what you expect…

But copping an attitude, will get you only one thing… and that is no help at all…

It is… if we knew specifically what the issue was

and remember this… for 3rd party controls such as ABCanvas… if the developer refuses to help (which is sounds is the case), then you are at the mercy of other users that just happened to be using that same control and have access to the code as well… and there is no telling how many or who those people might be… Personally I’d never heard of it until this topic was posted.

Nor do we, without working through the code ourselves. Doesnt look like anyone here has done so.

If you are saying that you want similar buttons but top down rather than left/right, then you need to change the DrawMe code so that it adds more space on the right than to the height.
You need to check the hasmenu option and draw as many buttons downwards as the original code drew left /right
Assuming it has ‘mouse over button’ detection code, that will need to be modified to check where the new buttons are.

What have you tried?

Charles, as frustrating as it can be, you will get absolutely nowhere if you start getting impatient because people don’t have the response you expect. Programming is before anything else, an exercise in perseverance, and foremost, patience.

I know you have been pursuing this TCGGame of yours for quite a while. No need to blame others because they don’t fully understand what you are after. Please consider that apparently, nobody here has ever used ABCanvas, and therefore must ask a minimum of questions to try and understand what it is about. Especially when the author of the class himself does not want to help.

We cannot walk the tutorial for you, and again, as none of us has dealt with it before, you cannot ask any of us, even the most accommodating, to learn for you.

Each of us has hit all sorts of snags before feeling comfortable with the little we master. To give you a live example, I have been working for now three weeks on the Windows 10 DesktopAppConverter, and in spite of spending there hours on it today, go essentially nowhere. And if you think people here are not nice, just try to ask questions in or in the Microsoft forums !

You are visibly too deep in your stuff. Stop and smell the roses. Take a walk. Drink a cup of tea. Drink a beer. Take the dog for a walk. Phone a friend.

Then when you are relaxed, or even tomorrow after sleeping it off, you probably will grasp what was stopping you.


About the ABCanvas. I really think it is very simple code. In fact, if I remember correctly , Alain put a whole tutorial (*) how he made the code on his site explaining each step.
As Michel and other pointed out, try to understand the (very simple) code and if parts are too funky , show it here as a snipped and ask.

(*) You even link to this tutorial explaining each single code step. So you know to find it for sure. :slight_smile: Just start at tutorial 1

To be honest you shouldn’t use that code because it is very slow and don’t offer smooth 60fps frame rates.
If you are coding a game for macOS or iOS you really should take a look at the awesome AppleLib. It has a (almost) full AnimationKit and SpriteKit implementation for macOS and iOS.
Thats the way to go for sure !

Just to clarify some things,

ABCanvas was a 8 step tutorial written in RB2007 for beginners to get started with the Canvas. At that time, things were quite different as RB was not Xojo as it is today. And so was the hardware it was running on. It was the best RB could deliver speedwise. This tutorial has also been a base for Eugenes book on the Canvas. And although today it may lack in speed compared to some libraries, it is still one of the most read parts on my blog, just because the basic rules still apply and it is simple beginners code that can be used for all platforms (not just OSX). It was meant for learning, not to be used for production. Once you grasped how it worked, you could write your own class. Our main product uses a (very) extended version of this principle and can even today still play with the big boys (yes, even on speed).

@Charles Fasano You and I know very well I’ve been very patient in the past every time we talked. You quickly start blaming everyone for not wanting to help you, but you refuse to tell where you’re stuck, what your current code is, even what you want to do. Have you ever followed the tutorial series, or did you just jump in at step 8? Really, Just tell these guys on the forum what you want to accomplish and don’t demand from them to write all the code for you because you don’t understand it (or are unwilling to learn?). All those replying to your post are VERY helpful people. But just as me, they are clueless.

This is my final statement on this subject. I’ve spend to much time (email, twitter, facebook) on this ‘problem’, but still have not the faintest idea what it is. My patience has run out. Apologies.

I have taken an step back from RB/Xojo for about a year now, but I still visit this forum now and then to keep up. It is like visiting an old friend and do some catching up :wink:

[quote]If you are coding a game for macOS or iOS you really should take a look at the awesome AppleLib. It has a (almost) full AnimationKit and SpriteKit implementation for macOS and iOS.
Thats the way to go for sure ![/quote]
Oh wow! Thanks a lot, Christoph!
Indeed, Charles: I could not help you with Alain’s control – it’s very much like Michel said: I didn’t work with it.

I know digging into view animations takes a lot of time, even more as there is no real documentation yet telling you how to.
If you consider switching from ABCanvas to AppleLib I’d be willing to assist you. Be warned that there will probably be bugs and things to add or fix from time to time, but if you can spend some time learning I can surely spend some time fixing and giving advice. Feel free to send me a PM (or we could use this thread or a fresh one so it could become a NSView tutorial for the general public).