Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
wings_shape:delete(WeID, #st{})
12-04-2012, 04:19 PM
Post: #1
wings_shape:delete(WeID, #st{})
wings_shape:delete(WeID, #st{}) when is_integer(WeID) ->


Guys ... dont' you think we should have one of these functions done right ? And inside it if some folder info needs to be massaged (optigon) ... this is the place for it ?

I call a folder reorg routine in about 10-20 places in my plugins and this seems wrong.
Reply
12-12-2012, 04:13 PM
Post: #2
RE: wings_shape:delete(WeID, #st{})
I retract this concern of mine. I think I have a good enough work-around.

Many of my calls could be collected into one call, and some were not needed anyway. My bad.
Reply
12-12-2012, 04:29 PM
Post: #3
RE: wings_shape:delete(WeID, #st{})
No worries.
I seached the wings source and found 15 instances. I think I did it this way due to the save_state atom and changing the folders is the last thing to happen. An object can be deleted and then later the command could fail. So the folders are accessed aftert he command has completed successfully.
Reply
12-12-2012, 04:57 PM
Post: #4
RE: wings_shape:delete(WeID, #st{})
Which of these should I be calling after a #we delete. Currently it is the former, I thing from
old conversation with you.

recreate_folder_system/1,update_folders/1
Reply
12-12-2012, 05:18 PM
Post: #5
RE: wings_shape:delete(WeID, #st{})
Pretty sure it's update_folders/1

Take a look at wings_body.erl commands/2 for examples.
Reply


Forum Jump:


User(s) browsing this thread: 1 Guest(s)