HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Deleting fields from classes?  (Read 1686 times)

AlbertF

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Deleting fields from classes?
« on: Jan 22, 14, 01:37:07 PM »

Starting trying to learn the Hero Engine and Hero Blade, but I've run into a problem: I can't delete fields from classes.

I created an afInventoryItem with a field afStackLimit. This class is the parent for an afContainerItem (basically, a bag). I decided that then I needed an afItemStack (not yet created).

So, I need to remove afStackLimit from afInventoryItem, but for whatever reason, I can't.

The console gives me an error

Code: [Select]
13:07:59: SYSTEM:System:World CLI message: MCDRF ERROR 0 : "Error Modifying Class Definition ID: 9223372070617151585 GOM::removeFieldFromClassDef (4911): Cannot remove a field from a class that is used inside another field."

afStackLimit is only a field in afInventoryItem and not used anywhere else. There are methods yet attached to any of the classes, so the field isn't referenced anywhere other than in that one class.

Any ideas?
Logged

Creelin

  • World Owners
  • ****
  • Posts: 6
    • View Profile
Re: Deleting fields from classes?
« Reply #1 on: Jan 22, 14, 01:45:34 PM »

If you're just trying to remove the relation between the field and the class you should be able to in the DOM - find the class and down below in the field area select the line header for the field and press the DEL key on your keyboard to remove the relationship. Then press the save button.
Logged

AlbertF

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Re: Deleting fields from classes?
« Reply #2 on: Jan 22, 14, 02:13:42 PM »

Nope, won't let me delete. The field is highlighted, but nothing happens when I hit Delete.

Logged

Creelin

  • World Owners
  • ****
  • Posts: 6
    • View Profile
Re: Deleting fields from classes?
« Reply #3 on: Jan 22, 14, 03:25:16 PM »

Im not sure on that situation, perhaps someone else has ran into this. It might have something to do with the afSlots (Guessing).
Logged

DragonFist

  • General Accounts
  • *
  • Posts: 140
    • View Profile
Re: Deleting fields from classes?
« Reply #4 on: Jan 22, 14, 03:35:58 PM »

Are you sure you are not in "Read Only" mode?
Logged

AlbertF

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Re: Deleting fields from classes?
« Reply #5 on: Jan 22, 14, 03:37:56 PM »

Not in read-only mode.

afSlots is a list of class afInventoryItem. Seems like I should be able to modify afInventoryItem.
Logged

TGSRofar

  • General Accounts
  • *
  • Posts: 153
    • View Profile
Re: Deleting fields from classes?
« Reply #6 on: Jan 22, 14, 04:27:01 PM »

You have a field that is based on the class you are trying to remove a field from.  First, you must delete the field that is based on your afInventoryItem class.  Then you can modify that class and re-create the field you deleted.  Of course, if you are using the other field in another class then you can't delete it until you remove it from that class.

I have gotten myself in situations before where I had to do a lot of unwinding to get to the point I could remove a field.  It's not fun.
Logged
Ron Farrell
Lead Programmer
Triad Game Studios

AlbertF

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Re: Deleting fields from classes?
« Reply #7 on: Jan 22, 14, 04:37:38 PM »

Found the problem: I work on a Bootcamped Mac. FN+Delete = Delete key. The Delete key by itself functions as Backspace.

Probably should delete this thread.
Logged