Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Dark Edit User Defined Types

Author
Message
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 18th Jul 2004 05:41 Edited at: 18th Jul 2004 08:02
I am trying to convert code from dbpro to DBC. I am using darkedit and I have exten types checked. But I get an unknow command error on variables inside the type. For example say I want to create a rect type, i have

type rect
trx
try
brx
bry
endtype

[edit]
I think that I figured it out

Had to use dimtype command
dimtype type,array()

trx-bry are all integers that hold the coordinates of a rectangle.

How can I get types to work in Darkedit?


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 18th Jul 2004 23:40
Zen, still need help with this?

Anyway, heres what it says in the darkedit.txt file that comes with it...


Pretty simple I guess, and basically what you posted anyway.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 19th Jul 2004 02:19
Jessticular,

Yeah I was working through the text. I still wound up working around certain issues. I don't know if there is a limit of variables you can delcare as a particular type without using an array. What I mean is

Say I have a type called rect that hold the topleft and bottomright coordinates of a rectangle

type rect
trx,try,brx,bry
endtype

now lets say I want to have a few zones for an inter face that utilizes that rect type, so:

dimtype rect, EditFormZone
dimtype rect, ButtonZone
dimtype rect, TileSelZone
dimtype rect, ToolSelZone

etc..

This was still giving me an error. The only work around that I could use was this less discriptive array method

dimtype rect, AZone(4)

It works, but now I have to look at a key i made up for the subscripts to know which zone I am referring to.

~Zenassem


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 19th Jul 2004 12:49
Hmm,
Yes, I could see how that could get confusing.

I guess you'll just have to use that workaround as you said, since DarkEdit won't be changed anytime soon.

Oh well.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-24 23:11:08
Your offset time is: 2025-05-24 23:11:08