Page 1 of 1

Addr object

PostPosted: 24. April 2017, 12:23
by tolkien
Hello!
Following with my coding therapy I'm working again with ab3 porting some of my code from ab2.
More or less is all ok but I have a little problem.

I need de address of a bitmap object to can read its attributtes.

In ab2 I do *pb.BitMap = Addr BitMap(0) but that doesn't work in ab3 nor bb2.

I add all necessary res files but the problem persist.

Any idea what is wrong?

Thanks in advance mates.

Re: Addr object

PostPosted: 25. April 2017, 21:43
by tolkien
Well....I now understand the problem.
Simply if I write something like this It doesn't compile:

Code: Select all
bm.b = 0
*pb.BitMap = Addr BitMap(bm)


Obviously if I replace BitMap(bm) with a number in the parameter It works.
The problem is that I use it within a Statement and need to pass a parameter.

Re: Addr object

PostPosted: 9. May 2017, 20:25
by Daedalus
Hmmm, that is a little strange, but it can be worked around with an extra line:

Code: Select all
bm.b = 0
MyAddr.l = Addr BitMap(bm)
*pb.BitMap = MyAddr

Re: Addr object

PostPosted: 9. May 2017, 20:45
by tolkien
Hey! That worked perfectly.
Thanks Daedalus. Didn't now what to do.